com.dat.cx
Class CxProperty

java.lang.Object
  |
  +--com.dat.cx.CxComponent
        |
        +--com.dat.cx.CxProperty
All Implemented Interfaces:
CxExtendsListener, java.util.EventListener, com.d_a_t.expeval.ExpressionContext
Direct Known Subclasses:
CxAttributeConstraint, CxAttributeType, CxBaseProperty, CxClearOnSend, CxContentConstraint, CxContentType, CxDefaultRoot, CxDocType, CxName, CxOrIn, CxResourceProperty, CxResourceProviderProperty, CxResourceSupplierProperty, CxSendOnReceipt

public class CxProperty
extends CxComponent

CxProperty provides semantics for a property component. A property hold a configuration value which is used by a parent component.


Fields inherited from class com.dat.cx.CxComponent
compactDisplay, noHatDisplay, standardDisplay
 
Constructor Summary
CxProperty()
          Default contstuctor
CxProperty(java.lang.String name, java.lang.String value)
          Constructor
CxProperty(java.lang.String name, java.lang.String value, boolean significant)
          Constructor
CxProperty(java.lang.String name, java.lang.String value, boolean significant, boolean editable)
          Constructor
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Add a property change listener to the list of listeners.
 XSet export(XSet doc, CxProject project)
          Export the definition of thisproperty.
 void exportInfo(com.dat.cx.exec.CxExecComponentInfo info)
          Export the definition of the component into a java serializable object.
 java.lang.String getCompiledValue()
          Get the value of the property.
 com.dat.cx.studio.CxCompDisplay getDisplay()
          Get the display peer for this property.
 com.dat.cx.studio.CxInternalFrame getEditFrame(com.dat.cx.studio.CxStudio studio)
          Get at edit frame for editing this component.
 java.lang.String getEditorClassName()
          Get the property editor class name
 java.lang.String getIcon()
          Get the icon file name for this component
 java.lang.String getLiteralValue()
          Get the value of the property.
 com.dat.cx.studio.CxPropertyEditor getPropertyEditor()
          Get the property editor for this property.
 int getXmlType()
          Get the xml type of this component
 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 property from another property.
 boolean isEditable()
          Test if the property is editable,
 boolean isProperty()
          Determines if the component is a property
 boolean isSignificant()
          Test if the property is significant,
 com.dat.cx.exec.CxExecComponentInfo makeInfo()
          Make an empty serializable object to hold the components definition.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Remove a property change listener to the list of listeners.
 void setEditorClassName(java.lang.String editorClassName)
          Set the property editor class name
 void setIsEditable(boolean editable)
          Set the editable property
 void setSignificant(boolean significant)
          Set the significant
 void setValue(java.lang.String value)
          Set the value of the property.
 void setValueNoUndo(java.lang.String value)
          Set the value of the property.
 
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, 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, getY, handleException, hasChild, hasChild, hasChildren, hasDisplay, hasOverride, hasProperties, importContent, 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, isRoot, isSubPortOf, isTextInstance, isTypePackage, isVar, isVarInstance, isVarSet, isWire, isXmlPort, isXmlPrimative, isXmlString, 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

CxProperty

public CxProperty()
Default contstuctor

CxProperty

public CxProperty(java.lang.String name,
                  java.lang.String value)
Constructor
Parameters:
name - the name of the property
value - the intial value for the property

CxProperty

public CxProperty(java.lang.String name,
                  java.lang.String value,
                  boolean significant)
Constructor
Parameters:
name - the name of the property
value - the intial value for the property
significant - indicates that the property is significant and should show up on the component use rendering.

CxProperty

public CxProperty(java.lang.String name,
                  java.lang.String value,
                  boolean significant,
                  boolean editable)
Constructor
Parameters:
name - the name of the property
value - the intial value for the property
significant - indicates that the property is significant and should show up on the component use rendering.
editable - indicates that the property is editable;
Method Detail

isProperty

public boolean isProperty()
Determines if the component is a property
Overrides:
isProperty in class CxComponent
Returns:
true if the component is a property, 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 property. The display peer handles the rendering of the property within the studio.
Overrides:
getDisplay in class CxComponent
Returns:
the display peer

getPropertyEditor

public com.dat.cx.studio.CxPropertyEditor getPropertyEditor()
Get the property editor for this property. The property editor is used within the studio to provide the gui components needed for the studio to edit the given property.
Returns:
the display peer

importTemplate

public void importTemplate(CxComponent from,
                           boolean copy,
                           boolean inherit,
                           boolean inverse)
Import the definition of a property from another property.
Overrides:
importTemplate in class CxComponent
Parameters:
from - the property 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 - (not used)

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 thisproperty.
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

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a property change listener to the list of listeners. All listners will be notified whenever the property changes value.
Parameters:
listener - the property change listener to add

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a property change listener to the list of listeners.
Parameters:
listener - the property change listener to remove

getLiteralValue

public java.lang.String getLiteralValue()
Get the value of the property. No evaluation is done prior to being returned.
Returns:
the current property value

getCompiledValue

public java.lang.String getCompiledValue()
Get the value of the property. If this is an expression, the expression is evaluated prior to being returned.
Returns:
the current property value

setValueNoUndo

public void setValueNoUndo(java.lang.String value)
Set the value of the property. All registered property change listeners will be notified of the change.
Parameters:
value - the new property value

setValue

public void setValue(java.lang.String value)
Set the value of the property. All registered property change listeners will be notified of the change.
Parameters:
value - the new property value

setSignificant

public void setSignificant(boolean significant)
Set the significant
Parameters:
significant - the new significant state of the the component.

isSignificant

public boolean isSignificant()
Test if the property is significant,
Returns:
true if the property is significant

getEditorClassName

public java.lang.String getEditorClassName()
Get the property editor class name
Returns:
the property editor class name

setEditorClassName

public void setEditorClassName(java.lang.String editorClassName)
Set the property editor class name
Parameters:
editorClassName - the new property editor class name

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

getXmlType

public int getXmlType()
Description copied from class: CxComponent
Get the xml type of this component
Overrides:
getXmlType in class CxComponent
Following copied from class: com.dat.cx.CxComponent
Returns:
the xml type, if the component is not of an xml type, returns CxXmlTypes.INVALID

isEditable

public boolean isEditable()
Test if the property is editable,
Returns:
true if the property is editable

setIsEditable

public void setIsEditable(boolean editable)
Set the editable property
Parameters:
editable - the new editable state of the the component.

makeInfo

public com.dat.cx.exec.CxExecComponentInfo makeInfo()
Description copied from class: CxComponent
Make an empty serializable object to hold the components definition. This method should be overridden in any sub class of CxComponent where the definition of such component contains additional information not defined in CxComponent.
Overrides:
makeInfo in class CxComponent
Following copied from class: com.dat.cx.CxComponent
Returns:
an empty serializable object which will hold the defintion of a component.

exportInfo

public void exportInfo(com.dat.cx.exec.CxExecComponentInfo info)
Description copied from class: CxComponent
Export the definition of the component into a java serializable object. This method should be overridden in any sub class of CxComponent where the definition of such component contains additional information not defined in CxComponent. The overridden method should call the superclass exportInfo method and then add in the additional information.
Overrides:
exportInfo in class CxComponent
Following copied from class: com.dat.cx.CxComponent
Parameters:
info - the serializable object in which the definition of this component is to be stored.

importInfo

public void importInfo(com.dat.cx.exec.CxExecComponentInfo info)
Description copied from class: CxComponent
Import the definition of the component from a java serializable object. This method should be overridden in any sub class of CxComponent where the definition of such component contains additional information not defined in CxComponent. The overridden method should call the superclass importInfo method and then import the additional information.
Overrides:
importInfo in class CxComponent
Following copied from class: com.dat.cx.CxComponent
Parameters:
info - the serializable object in which the definition of this component is stored.