com.dat.cx
Class CxTextInstance

java.lang.Object
  |
  +--com.dat.cx.CxComponent
        |
        +--com.dat.cx.CxTextInstance
All Implemented Interfaces:
CxExtendsListener, java.util.EventListener, com.d_a_t.expeval.ExpressionContext

public class CxTextInstance
extends CxComponent

CxText provides semantics for a text instance component. A text instance hold the text derived from a DOM text node.


Fields inherited from class com.dat.cx.CxComponent
compactDisplay, noHatDisplay, standardDisplay
 
Constructor Summary
CxTextInstance()
          Default contstuctor
CxTextInstance(java.lang.String text)
          Constructor
 
Method Summary
 XSet export(XSet doc, CxProject project)
          Export the definition of this type.
 com.dat.cx.studio.CxCompDisplay getDisplay()
          Get the display peer for this text.
 com.dat.cx.studio.CxInternalFrame getEditFrame(com.dat.cx.studio.CxStudio studio)
          Get at edit frame for editing this component.
 java.lang.String getIcon()
          Get the icon file name for this component
 java.lang.String getText()
          Get the text of this text instance
 java.util.Vector importSpec(XSet spec)
          Import specification from an XML element
 void importTemplate(CxComponent from, boolean copy, boolean inherit, boolean inverse)
          Import the definition of a component from another component.
 boolean isTextInstance()
          Determines if the component is a text instance
 void setText(java.lang.String text)
          Set the text of this text instance
 
Methods inherited from class com.dat.cx.CxComponent
activate, addChild, addChildAt, addChildAtNoUndo, addChildNoUndo, addChildNoUndoAssign, addComponentChangeListener, addComponentChildrenListener, addExtendsListener, addSortedChild, canAddComponent, canExtendsAdd, componentAdded, componentLocationChanged, componentNameChanged, componentNodeChanged, componentPropertyChanged, componentRemoved, componentWirePortChanged, constructNode, contains, deactivate, decrUnresolved, exportContent, exportInfo, findPath, findPath, getBaseType, getChild, getChild, getChildren, getClassClause, getConfig, getConfigValue, getConfigValue, getDataPath, getDataPort, getDisplayStyle, getExtendsFrom, getExtendsListeners, getImageIcon, getIndexOfChild, getInfo, getName, getNameInAncestor, getNameInContext, getNextChildTo, getNoChildren, getOwnerProject, getPackage, getPackage, getParent, getPort, getPropertyNames, getPropertyValues, getRoot, getRzChildren, getRzSortedChildren, getSortedChild, getSortedChildren, getSortedIndexOfChild, getViewFrame, getX, getXmlType, getY, handleException, hasChild, hasChild, hasChildren, hasDisplay, hasOverride, hasProperties, importContent, importInfo, incrUnresolved, init, instantiateChildComponent, instantiateChildComponentAt, isActive, isAttribute, isAttributeInstance, isBaseProperty, isCompositeComponent, isConfiguration, isContentComponent, isDataMgr, isDataPort, isErrorCatchPort, isExtendable, isExtended, isInherited, isInterface, isLibraryComponent, isMiniPort, isName, isNative, isPackage, isPalette, isPin, isPort, isPortMgr, isProperty, isRoot, isSubPortOf, isTypePackage, isVar, isVarInstance, isVarSet, isWire, isXmlPort, isXmlPrimative, isXmlString, makeInfo, omitExport, removeChild, removeChild, removeChildNoUndo, removeComponentChangeListener, removeComponentChildrenListener, removeExtendsListener, renameSortedChild, resolveClass, resolveConstructor, resolveField, resolveMethod, setClassClause, setComponentDefinitionServer, setDisplayStyle, setDisplayStyleFromInfo, setExtendsFrom, setInherited, setLocation, setLocationNoUndo, setName, setNameNoTrigger, setNameNoUndo, setNative, setOwnerProject, setParent, setPropertyValues, setX, setY, toString, triggerExtendsNodeChanged
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CxTextInstance

public CxTextInstance()
Default contstuctor

CxTextInstance

public CxTextInstance(java.lang.String text)
Constructor
Parameters:
name - the name of the var instance
type - the content type for the type
Method Detail

isTextInstance

public boolean isTextInstance()
Determines if the component is a text instance
Overrides:
isTextInstance in class CxComponent
Returns:
true if the component is a text instance, otherwise false

getEditFrame

public com.dat.cx.studio.CxInternalFrame getEditFrame(com.dat.cx.studio.CxStudio studio)
Get at edit frame for editing this component.
Overrides:
getEditFrame in class CxComponent
Returns:
the edit frame

getDisplay

public com.dat.cx.studio.CxCompDisplay getDisplay()
Get the display peer for this text. The display peer handles the rendering of the text within the studio.
Overrides:
getDisplay in class CxComponent
Returns:
the display peer

importTemplate

public void importTemplate(CxComponent from,
                           boolean copy,
                           boolean inherit,
                           boolean inverse)
Import the definition of a component from another component. For composite components this will result in instantiating new child components for each of the children of the from component and importing their definition recursively. Note: special handing is provided by each subclass, CxPort, CxInterface, CxProperty, CxLibraryComponent, etc.
Overrides:
importTemplate in class CxComponent
Parameters:
from - the component from which to import a definition
copy - indicate that this is a copy 'vs' extends
inherit - indicate that the definition is inherited as part of an extends
inverse - indicate that polarity is to be inversed (see CxPort and CxInterface)

importSpec

public java.util.Vector importSpec(XSet spec)
Import specification from an XML element
Overrides:
importSpec in class CxComponent
Parameters:
spec - the xml element containing the specification

export

public XSet export(XSet doc,
                   CxProject project)
Export the definition of this type.
Overrides:
export in class CxComponent
Parameters:
doc - the XSet docuement being constructed. The definition is added to this document.
Returns:
the XSet document relative to the new definition

getText

public java.lang.String getText()
Get the text of this text instance
Returns:
the current text

setText

public void setText(java.lang.String text)
Set the text of this text instance
Parameters:
text - the new text

getIcon

public java.lang.String getIcon()
Get the icon file name for this component
Overrides:
getIcon in class CxComponent
Returns:
the file name for the icon