|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.dat.cx.CxComponent
CxComponent provides base definition of all components in the cx framework, all cx components are subclasses of CxComponent.
Field Summary | |
static int |
compactDisplay
|
static int |
noHatDisplay
|
static int |
standardDisplay
|
Constructor Summary | |
CxComponent()
|
Method Summary | |
void |
activate()
Activate the component. |
void |
addChild(CxComponent child)
Add a component as a child |
void |
addChildAt(CxComponent child,
int at)
Add a component as a child at a specific Z position |
void |
addChildAtNoUndo(CxComponent child,
int at)
Add a component as a child at a specific Z position |
void |
addChildNoUndo(CxComponent child)
Add a component as a child |
void |
addChildNoUndoAssign(CxComponent child)
Add a component as a child |
void |
addComponentChangeListener(CxComponentChangeListener listener)
Add a component change listener to the list of listeners. |
void |
addComponentChildrenListener(CxComponentChildrenListener listener)
Add a component children listener to the list of listeners. |
void |
addExtendsListener(CxExtendsListener listener)
Add an extends listener to the list of listeners. |
void |
addSortedChild(CxComponent child)
|
boolean |
canAddComponent(CxExtendsCanAddEvent event)
Test if a component can be added by the name specified in the received event |
boolean |
canExtendsAdd(java.lang.String path,
java.lang.String childName)
Ask all registered listeners if they can add a child by a given name |
void |
componentAdded(CxExtendsAddEvent event)
Receive an CxExtendsAddEvent when a component from which this component is extended has added a descendent component. |
void |
componentLocationChanged(CxExtendsLocationChangeEvent event)
Receive an CxExtendsLocationChangeEvent when a component from which this component is extended has a child whose location has been changed. |
void |
componentNameChanged(CxExtendsNameChangeEvent event)
Receive an CxExtendsNameChangeEvent when a component from which this component is extended has changed its name or the name of any of its contained components. |
void |
componentNodeChanged(CxExtendsNodeChangeEvent event)
Recieve a CxExtendsNodeChangeEvent whenever an extends from component or any of its decendents has a change in a node value. |
void |
componentPropertyChanged(CxExtendsPropertyChangeEvent event)
Receive an CxExtendsPropertyChangeEvent when a component from which this component is extended has changed a property value for it or any contained properties. |
void |
componentRemoved(CxExtendsRemoveEvent event)
Receive an CxExtendsRemoveEvent when a component from which this component is extended has removed a descendent component. |
void |
componentWirePortChanged(CxExtendsWirePortChangeEvent event)
Receive an CxExtendsWirePortChangeEvent when a wire from which this component is extended has changed a port assignment. |
static com.dat.cx.Node |
constructNode(java.lang.String element,
java.lang.String text)
Construct a simple XML document to wrap a string. |
boolean |
contains(CxComponent descendent)
Determine if a component has a decendent of this component |
void |
deactivate()
Deactivate the component. |
void |
decrUnresolved()
Decrement unresolve component count |
XSet |
export(XSet doc,
CxProject project)
Export the definition of this component (only this component) |
void |
exportContent(XSet doc,
CxProject project)
Export configuration content from non-cx xml file. |
void |
exportInfo(com.dat.cx.exec.CxExecComponentInfo info)
Export the definition of the component into a java serializable object. |
CxComponent |
findPath(java.lang.String path)
Find a component by qualified relative path. |
CxComponent |
findPath(java.lang.String path,
boolean searchParent)
Find a component by qualified relative path |
CxComponent |
getBaseType()
Get the base type of the component. |
CxComponent |
getChild(int i)
Get the ith child component |
CxComponent |
getChild(java.lang.String childName)
Get a child given its name |
java.util.Enumeration |
getChildren()
Get an enumeration of the children |
java.lang.String |
getClassClause()
Get the class clause |
CxConfiguration |
getConfig(java.lang.String name)
Get a configuration given its name |
java.lang.String |
getConfigValue(java.lang.String name)
Get a configuration value given its name |
java.lang.String |
getConfigValue(java.lang.String name,
boolean delegate)
Get a configuration value given its name |
java.lang.String |
getDataPath(CxComponent varRoot)
Get the data path of a component relative to an ancestor |
CxDataPort |
getDataPort(java.lang.String dataPath,
boolean portDirection)
Get a data port given is logical path and direction |
com.dat.cx.studio.CxCompDisplay |
getDisplay()
Get the display peer for this component. |
int |
getDisplayStyle()
Get the display style |
com.dat.cx.studio.CxInternalFrame |
getEditFrame(com.dat.cx.studio.CxStudio studio)
Get at edit frame for editing this component. |
CxComponent |
getExtendsFrom()
Get the extends from component |
java.util.Enumeration |
getExtendsListeners()
Get the list of extends listners |
java.lang.String |
getIcon()
Get the icon file name for this component |
javax.swing.ImageIcon |
getImageIcon()
Get the icon image for icon of this component |
int |
getIndexOfChild(java.lang.Object child)
Get the index of a child |
com.dat.cx.exec.CxExecComponentInfo |
getInfo()
Get the defintion of this component into a serializable java object so that is can be sent to a client console. |
java.lang.String |
getName()
Get the name of the component |
java.lang.String |
getNameInAncestor(CxComponent ancestor)
Get the path name of a component relative to an ancestor |
java.lang.String |
getNameInContext()
Get the full name of a component within the current component tree |
CxComponent |
getNextChildTo(CxComponent child)
Get a the next child relative to a given child |
int |
getNoChildren()
Get the number of child components |
CxProject |
getOwnerProject()
Get the project that owns this component |
CxComponent |
getPackage()
|
CxComponent |
getPackage(CxComponent component)
|
CxComponent |
getParent()
Get the components parent component |
CxPort |
getPort(java.lang.String name)
Get a port given its name |
java.lang.String[] |
getPropertyNames()
Get all property names |
java.lang.String[] |
getPropertyValues(java.lang.String[] propertyNames)
Get property values for a set of property names |
CxComponent |
getRoot()
Get the root ancestor component |
java.util.Enumeration |
getRzChildren()
Get an enumeration of the children in reverse order |
java.util.Enumeration |
getRzSortedChildren()
|
CxComponent |
getSortedChild(int i)
|
java.util.Enumeration |
getSortedChildren()
|
int |
getSortedIndexOfChild(java.lang.Object child)
|
com.dat.cx.console.CxConsoleInternalFrame |
getViewFrame(com.dat.cx.console.CxConsole console)
Get at edit frame for editing this component. |
int |
getX()
Get the x coordinate |
int |
getXmlType()
Get the xml type of this component |
int |
getY()
Get the y coordinate |
static void |
handleException(java.lang.Throwable t)
|
boolean |
hasChild(CxComponent child)
Determine if a component has a specific child |
boolean |
hasChild(java.lang.String childName)
Determine if a component has a specific child by name |
boolean |
hasChildren()
Determine if a component has children |
boolean |
hasDisplay()
Determine if this component has a display peer. |
boolean |
hasOverride()
Determine if the inherited component has an override. |
boolean |
hasProperties()
Determine if the component has any properties |
void |
importContent(XSet doc)
Import configuration content from non-cx xml file. |
void |
importInfo(com.dat.cx.exec.CxExecComponentInfo info)
Import the definition of the component from a java serializable object. |
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. |
void |
incrUnresolved()
Increment unresolve component count |
void |
init()
init is called after a CxComponent is added to the component tree in the GUI by an editor. |
CxComponent |
instantiateChildComponent(java.lang.String className,
java.lang.String childName)
Instantiate a new child component given as a clone of another component. |
CxComponent |
instantiateChildComponentAt(java.lang.String className,
java.lang.String childName,
CxPlaceHolder placeHolder)
Instantiate a new child component given its class name replacing a place holder. |
boolean |
isActive()
Determine if the component is currently active. |
boolean |
isAttribute()
Determines if the component is an attribute |
boolean |
isAttributeInstance()
Determines if the component is an attribute instance |
boolean |
isBaseProperty()
Determines if the component is a base property (component defined) |
boolean |
isCompositeComponent()
Determines if the component is a composite component |
boolean |
isConfiguration()
Determines if the component is a configuration property |
boolean |
isContentComponent()
Determines if the component is a content component, ie a component contained in a composite component that is not a port or interface. |
boolean |
isDataMgr()
Determines if the component is a data manager |
boolean |
isDataPort()
Determines if the component is a data port |
boolean |
isErrorCatchPort()
Determines if the component is an error or catch port |
boolean |
isExtendable()
Determine if the component can be used in an extends clause. |
boolean |
isExtended()
|
boolean |
isInherited()
Determine if the component is inherited as part of an extends clause. |
boolean |
isInterface()
Determines if the component is a interface |
boolean |
isLibraryComponent()
Determines if the component is a liberary component |
boolean |
isMiniPort()
Determines if the component is a mini port |
boolean |
isName()
Determines if the component is a name |
boolean |
isNative()
Determine if the component is a native java component, ie defined by java code. |
boolean |
isPackage()
Determines if the component is a package |
boolean |
isPalette()
Determines if the component is a palette |
boolean |
isPin()
Determines if the component is a pin |
boolean |
isPort()
Determines if the component is a port |
boolean |
isPortMgr()
Determines if the component is a port manager |
boolean |
isProperty()
Determines if the component is a property |
boolean |
isRoot()
Determines if the component is the root |
boolean |
isSubPortOf(CxComponent comp)
|
boolean |
isTextInstance()
Determines if the component is a text instance |
boolean |
isTypePackage()
Determines if the component is a type package |
boolean |
isVar()
Determines if the component is a variable |
boolean |
isVarInstance()
Determines if the component is a variable instance |
boolean |
isVarSet()
Determines if the component is a variable |
boolean |
isWire()
Determines if the component is a wire |
boolean |
isXmlPort()
Determines if the component is an xml port |
boolean |
isXmlPrimative()
Determines if the component is of an XML primative type (ie content type String, Integer etc.) |
boolean |
isXmlString()
Determines if the component is of an XML String type |
com.dat.cx.exec.CxExecComponentInfo |
makeInfo()
Make an empty serializable object to hold the components definition. |
boolean |
omitExport(CxComponent child)
Indicate if the specified child is not to be processed by the Cx file export processor. |
void |
removeChild(CxComponent child)
Remove a component from the list of children |
void |
removeChild(int i)
Remove the ith child from the list of children |
void |
removeChildNoUndo(CxComponent child)
Remove a component from the list of children |
void |
removeComponentChangeListener(CxComponentChangeListener listener)
Remove a component change listener to the list of listeners. |
void |
removeComponentChildrenListener(CxComponentChildrenListener listener)
Remove a component children listener to the list of listeners. |
void |
removeExtendsListener(CxExtendsListener listener)
Remove an extends listener to the list of listeners. |
void |
renameSortedChild()
|
java.lang.Class |
resolveClass(java.lang.String identifier)
Returns the Class object identified by "identifier" or null if none exists. |
com.d_a_t.expeval.EEConstructor |
resolveConstructor(java.lang.Class constructorClass,
java.lang.Class[] parameterTypes)
Returns the EEConstruct object identified by "identifier" and the parameter type list or null if none exists. |
com.d_a_t.expeval.EEField |
resolveField(java.lang.String identifier)
Returns the EEField object identified by "identifier" or null if none exists. |
com.d_a_t.expeval.EEMethod |
resolveMethod(java.lang.String identifier,
java.lang.Class[] parameterTypes)
Returns the EEMethod object identified by "identifier" and the parameter type list or null if none exists. |
void |
setClassClause(java.lang.String classClause)
Set the class clause |
void |
setComponentDefinitionServer(com.dat.cx.exec.CxExecInterface componentServer)
Set the component definition server. |
void |
setDisplayStyle(int displayStyle)
Set the display style |
void |
setDisplayStyleFromInfo(int displayStyle)
Set the display style |
void |
setExtendsFrom(CxComponent extendsFrom)
Set the extends from component |
void |
setInherited()
Set the component as inherited. |
void |
setLocation(java.awt.Point newLocation)
Set the location |
void |
setLocationNoUndo(java.awt.Point newLocation)
Set the location |
void |
setName(java.lang.String name)
Set the component |
void |
setNameNoTrigger(java.lang.String name)
Set the component without triggering listeners |
void |
setNameNoUndo(java.lang.String name)
Set the component |
void |
setNative()
Set the component as native. |
void |
setOwnerProject(CxProject project)
Set the project that owns this component |
void |
setParent(CxComponent parent)
Set the parent of this component |
void |
setPropertyValues(java.lang.String[] propertyNames,
java.lang.String[] propertyValues)
Set property values |
void |
setX(int x)
Set the x coordinate |
void |
setY(int y)
Set the y coordinate |
java.lang.String |
toString()
Get string representation |
void |
triggerExtendsNodeChanged(java.lang.String path,
java.lang.String nodeName,
com.dat.cx.Node oldNodeValue,
com.dat.cx.Node newNodeValue)
Send an extends node value changed event to all registered listeners |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int standardDisplay
public static final int noHatDisplay
public static final int compactDisplay
Constructor Detail |
public CxComponent()
Method Detail |
public boolean isRoot()
public boolean isWire()
public boolean isPort()
public boolean isPin()
public boolean isDataPort()
public boolean isXmlPort()
public boolean isMiniPort()
public boolean isErrorCatchPort()
public boolean isInterface()
public boolean isProperty()
public boolean isBaseProperty()
public boolean isName()
public boolean isPackage()
public boolean isPalette()
public boolean isTypePackage()
public boolean isLibraryComponent()
public boolean isCompositeComponent()
public boolean isContentComponent()
public boolean isVar()
public boolean isVarSet()
public boolean isAttribute()
public boolean isVarInstance()
public boolean isAttributeInstance()
public boolean isTextInstance()
public boolean isDataMgr()
public boolean isPortMgr()
public boolean isConfiguration()
public boolean isXmlPrimative()
public boolean isXmlString()
public int getXmlType()
public CxProject getOwnerProject()
public void setOwnerProject(CxProject project)
project
- the project that owns this componentpublic java.lang.String getName()
public void setName(java.lang.String name)
name
- the new name for the componentpublic void setNameNoUndo(java.lang.String name)
name
- the new name for the componentpublic void setNameNoTrigger(java.lang.String name)
name
- the new name for the componentpublic java.lang.String getNameInContext()
public java.lang.String getNameInAncestor(CxComponent ancestor)
ancestor
- some component that is an ancestor of this componentpublic boolean isSubPortOf(CxComponent comp)
public java.lang.String getDataPath(CxComponent varRoot)
varRoot
- some component that is a root variable of this componentpublic com.dat.cx.studio.CxInternalFrame getEditFrame(com.dat.cx.studio.CxStudio studio)
public com.dat.cx.console.CxConsoleInternalFrame getViewFrame(com.dat.cx.console.CxConsole console)
public com.dat.cx.studio.CxCompDisplay getDisplay()
public boolean hasDisplay()
public CxComponent instantiateChildComponent(java.lang.String className, java.lang.String childName)
className
- the java class name stringchildName
- the name to assign the new componentpublic CxComponent instantiateChildComponentAt(java.lang.String className, java.lang.String childName, CxPlaceHolder placeHolder)
className
- the java class name stringchildName
- the name to assign the new componentpublic void addChildNoUndo(CxComponent child)
child
- the component to be added as a childpublic void addChildNoUndoAssign(CxComponent child)
child
- the component to be added as a childpublic void addChild(CxComponent child)
child
- the component to be added as a childpublic void addChildAtNoUndo(CxComponent child, int at)
child
- the component to be added as a childpublic void addChildAt(CxComponent child, int at)
child
- the component to be added as a childpublic java.util.Enumeration getChildren()
public java.util.Enumeration getSortedChildren()
public java.util.Enumeration getRzChildren()
public java.util.Enumeration getRzSortedChildren()
public CxComponent getChild(int i)
i
- the index of the desired childpublic CxComponent getSortedChild(int i)
public int getIndexOfChild(java.lang.Object child)
public int getSortedIndexOfChild(java.lang.Object child)
public boolean hasChild(CxComponent child)
child
- component to be tested as a childpublic boolean contains(CxComponent descendent)
decendent
- component to be testedpublic boolean hasChild(java.lang.String childName)
childName
- name of the childpublic boolean hasChildren()
public int getNoChildren()
public void removeChild(CxComponent child)
child
- the component to be removedpublic void removeChildNoUndo(CxComponent child)
child
- the component to be removedpublic void removeChild(int i)
i
- the index of the child to be removedpublic CxComponent getChild(java.lang.String childName)
childName
- the name of the childpublic CxComponent getNextChildTo(CxComponent child)
child
- the relative childpublic CxComponent findPath(java.lang.String path)
path
- path name to the desire component either relative to this component or
relative to the root component (ie begins with "/")findPath
public CxComponent findPath(java.lang.String path, boolean searchParent)
path
- path name to the desire component either relative to this component or
relative to the root component (ie begins with "/")searchParent
- searches parent for symbol if not found within scopepublic CxComponent getRoot()
public CxComponent getParent()
public void setParent(CxComponent parent)
parent
- the new parent componentpublic CxComponent getExtendsFrom()
public void setExtendsFrom(CxComponent extendsFrom)
extendsFrom
- the extends from componentpublic CxComponent getBaseType()
public void importTemplate(CxComponent from, boolean copy, boolean inherit, boolean inverse)
from
- the component from which to import a definitioncopy
- indicate that this is a copy 'vs' extendsinherit
- indicate that the definition is inherited as part of an extendsinverse
- indicate that polarity is to be inversed (see CxPort and CxInterface)public java.util.Vector importSpec(XSet spec)
spec
- the xml element containing the specificationpublic XSet export(XSet doc, CxProject project)
doc
- the XSet document being constructed. The definition is added to this documentpublic boolean omitExport(CxComponent child)
child
- the child in questionpublic void importContent(XSet doc)
doc
- document containing the configuration info.public void exportContent(XSet doc, CxProject project)
doc
- document where configuration information is to be placed.public boolean hasOverride()
public boolean isExtendable()
public void incrUnresolved()
public void decrUnresolved()
public boolean isInherited()
public void setInherited()
public boolean isNative()
public void setNative()
public boolean isActive()
public void activate()
public void deactivate()
public void addExtendsListener(CxExtendsListener listener)
listener
- the extends listener to addpublic void removeExtendsListener(CxExtendsListener listener)
listener
- the component change listener to removepublic java.util.Enumeration getExtendsListeners()
public boolean canExtendsAdd(java.lang.String path, java.lang.String childName)
path
- path relative to the this component where the child has been addedchild
- the name of the child componentpublic void triggerExtendsNodeChanged(java.lang.String path, java.lang.String nodeName, com.dat.cx.Node oldNodeValue, com.dat.cx.Node newNodeValue)
path
- the path of the descendent property relative to this componentnodeName
- the name used to identify the set and get methods for the node within a componentoldNodeValue
- the original node value within component whose location has been changednewNodeValue
- the new node valuepublic void addComponentChangeListener(CxComponentChangeListener listener)
listener
- the component change listener to addpublic void removeComponentChangeListener(CxComponentChangeListener listener)
listener
- the component change listener to removepublic void addComponentChildrenListener(CxComponentChildrenListener listener)
listener
- the component children listener to addpublic void removeComponentChildrenListener(CxComponentChildrenListener listener)
listener
- the children change listener to removepublic boolean canAddComponent(CxExtendsCanAddEvent event)
canAddComponent
in interface CxExtendsListener
event
- the recieved eventpublic void componentAdded(CxExtendsAddEvent event)
componentAdded
in interface CxExtendsListener
event
- the recieved eventpublic void componentRemoved(CxExtendsRemoveEvent event)
componentRemoved
in interface CxExtendsListener
event
- the recieved eventpublic void componentLocationChanged(CxExtendsLocationChangeEvent event)
componentLocationChanged
in interface CxExtendsListener
event
- the recieved eventpublic void componentNodeChanged(CxExtendsNodeChangeEvent event)
componentNodeChanged
in interface CxExtendsListener
event
- the recieved event.public void componentPropertyChanged(CxExtendsPropertyChangeEvent event)
componentPropertyChanged
in interface CxExtendsListener
event
- the recieved eventpublic void componentWirePortChanged(CxExtendsWirePortChangeEvent event)
componentWirePortChanged
in interface CxExtendsListener
event
- the recieved eventpublic void componentNameChanged(CxExtendsNameChangeEvent event)
componentNameChanged
in interface CxExtendsListener
event
- the recieved eventpublic static com.dat.cx.Node constructNode(java.lang.String element, java.lang.String text)
element
- the outer element nametext
- the text of the elementpublic java.lang.String toString()
toString
in class java.lang.Object
public CxConfiguration getConfig(java.lang.String name)
name
- the name of the configurationpublic java.lang.String getConfigValue(java.lang.String name)
name
- the name of the configurationpublic java.lang.String getConfigValue(java.lang.String name, boolean delegate)
name
- the name of the configurationdelegate
- when true, the parent variable is searched as well.public CxPort getPort(java.lang.String name)
name
- the name of the portpublic CxDataPort getDataPort(java.lang.String dataPath, boolean portDirection)
public boolean hasProperties()
public java.lang.String[] getPropertyNames()
public java.lang.String[] getPropertyValues(java.lang.String[] propertyNames)
propertyNames
- an array of property namespublic void setPropertyValues(java.lang.String[] propertyNames, java.lang.String[] propertyValues)
propertyNames
- an array of property namespropertyValues
- array of new property values to be assigned to the named propertiespublic int getX()
public int getY()
public void setX(int x)
x
- the new x coordinatepublic void setY(int y)
y
- the new y coordinatepublic void setLocationNoUndo(java.awt.Point newLocation)
location
- the new locationpublic void setLocation(java.awt.Point newLocation)
location
- the new locationpublic void setDisplayStyleFromInfo(int displayStyle)
displayStyle
- the new display stylepublic void setDisplayStyle(int displayStyle)
displayStyle
- the new display stylepublic int getDisplayStyle()
public java.lang.String getClassClause()
public void setClassClause(java.lang.String classClause)
classClause
- the new class clausepublic java.lang.String getIcon()
public javax.swing.ImageIcon getImageIcon()
public com.d_a_t.expeval.EEField resolveField(java.lang.String identifier) throws com.d_a_t.expeval.ExpressionException
com.d_a_t.expeval.ExpressionContext
resolveField
in interface com.d_a_t.expeval.ExpressionContext
public com.d_a_t.expeval.EEConstructor resolveConstructor(java.lang.Class constructorClass, java.lang.Class[] parameterTypes) throws com.d_a_t.expeval.ExpressionException
com.d_a_t.expeval.ExpressionContext
resolveConstructor
in interface com.d_a_t.expeval.ExpressionContext
public com.d_a_t.expeval.EEMethod resolveMethod(java.lang.String identifier, java.lang.Class[] parameterTypes) throws com.d_a_t.expeval.ExpressionException
com.d_a_t.expeval.ExpressionContext
resolveMethod
in interface com.d_a_t.expeval.ExpressionContext
public java.lang.Class resolveClass(java.lang.String identifier) throws com.d_a_t.expeval.ExpressionException
com.d_a_t.expeval.ExpressionContext
resolveClass
in interface com.d_a_t.expeval.ExpressionContext
public static void handleException(java.lang.Throwable t)
public CxComponent getPackage(CxComponent component)
public CxComponent getPackage()
public boolean isExtended()
public void setComponentDefinitionServer(com.dat.cx.exec.CxExecInterface componentServer)
componentServer
- the component server proxy providing access to a remote server.public com.dat.cx.exec.CxExecComponentInfo getInfo()
public com.dat.cx.exec.CxExecComponentInfo makeInfo()
public void exportInfo(com.dat.cx.exec.CxExecComponentInfo info)
info
- the serializable object in which the definition of this component is to be stored.public void importInfo(com.dat.cx.exec.CxExecComponentInfo info)
info
- the serializable object in which the definition of this component is stored.public void addSortedChild(CxComponent child)
public void renameSortedChild()
public void init()
init
is called after a CxComponent is added to the component tree in the GUI by an editor.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |