com.dat.cx
Class CxVar

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

public class CxVar
extends CxComponent
implements java.beans.PropertyChangeListener

CxType provides semantics for a variable (var). A var provides both definition and instance. When a child of another var or of a type package it provides just definition. When child of a composite component it provides both definition and data.


Field Summary
static java.lang.String CHAR_CONFIG_SETTING
           
static java.lang.String CONFIG_DISABLED
           
static java.lang.String CONFIG_ENABLED
           
static java.lang.String CONFIG_UNDEFINED
           
static java.lang.String TAG_CONFIG
           
static java.lang.String TAG_PROPERTY
           
static java.lang.String TYPE_CONFIG
           
static java.lang.String TYPE_PROPERTY
           
 
Fields inherited from class com.dat.cx.CxComponent
compactDisplay, noHatDisplay, standardDisplay
 
Constructor Summary
CxVar()
          Default contstuctor
CxVar(java.lang.String name, int contentType)
          Constructor
 
Method Summary
 void docReceived(CxEvent evt)
           
 XSet export(XSet doc, CxProject project)
          Export the definition of this type.
 boolean exportChildren()
           
 int getContentConstraint()
          Get the content constraint
 CxContentConstraint getContentConstraintProperty()
          Get the content constraint property
 int getContentType()
          Get the content of this type
 CxContentType getContentTypeProperty()
          Get the content type property
 int getDbType()
          Returns the underlying type of the CxVar as one of the java.sql.Types type.
 com.dat.cx.studio.CxCompDisplay getDisplay()
          Get the display peer for this type.
 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
 boolean getIdentity()
          Get the or identity indicator
 boolean getOrEnabled()
          Get the or enabled indicator
 XSet getSchema()
          Returns an XML representation of the variable and it's elements.
 int getXmlType()
          Get the xml type of this component
 boolean hasOverride()
          Determine if the inherited component has an override.
 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 type from another type.
 boolean isVar()
          Determines if the component is a var
 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
 void propertyChange(java.beans.PropertyChangeEvent event)
           
 void setContentConstraint(int contentConstraint)
          Set the content constraint of the type reference.
 void setContentType(int contentType)
          Set the content type of the type.
 void setIdentity(boolean identity)
           
 void setOrEnabled(boolean orEnabled)
          Set the or enabled indicator.
 
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, getY, handleException, hasChild, hasChild, hasChildren, hasDisplay, 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, isTextInstance, isTypePackage, isVarInstance, isVarSet, isWire, isXmlPort, 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
 

Field Detail

TYPE_CONFIG

public static final java.lang.String TYPE_CONFIG

TYPE_PROPERTY

public static final java.lang.String TYPE_PROPERTY

TAG_CONFIG

public static final java.lang.String TAG_CONFIG

TAG_PROPERTY

public static final java.lang.String TAG_PROPERTY

CHAR_CONFIG_SETTING

public static final java.lang.String CHAR_CONFIG_SETTING

CONFIG_ENABLED

public static final java.lang.String CONFIG_ENABLED

CONFIG_DISABLED

public static final java.lang.String CONFIG_DISABLED

CONFIG_UNDEFINED

public static final java.lang.String CONFIG_UNDEFINED
Constructor Detail

CxVar

public CxVar()
Default contstuctor

CxVar

public CxVar(java.lang.String name,
             int contentType)
Constructor
Parameters:
name - the name of the type
type - the content type for the type
Method Detail

isVar

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

isXmlPrimative

public boolean isXmlPrimative()
Determines if the component is of an XML primative type (ie content type String, Integer etc.)
Overrides:
isXmlPrimative in class CxComponent
Returns:
true if the component is of an XML primative type, otherwise false

isXmlString

public boolean isXmlString()
Determines if the component is of an XML String type
Overrides:
isXmlString in class CxComponent
Returns:
true if the component is of an XML primative type, otherwise false

getXmlType

public int getXmlType()
Get the xml type of this component
Overrides:
getXmlType in class CxComponent
Returns:
the xml type, if the component is not of an xml type, returns CxXmlTypes.INVALID

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 type. The display peer handles the rendering of the type 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 type from another type.
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)

getIdentity

public boolean getIdentity()
Get the or identity indicator
Returns:
true if identity enabled, otherwise false

setIdentity

public void setIdentity(boolean identity)

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

exportChildren

public boolean exportChildren()

hasOverride

public boolean hasOverride()
Determine if the inherited component has an override. That is a property or x/y that is different from the component it was extended from
Overrides:
hasOverride in class CxComponent
Returns:
true if the component has an override, otherwise false

getContentTypeProperty

public CxContentType getContentTypeProperty()
Get the content type property
Returns:
the current type property

getContentType

public int getContentType()
Get the content of this type
Returns:
the current type value

setContentType

public void setContentType(int contentType)
Set the content type of the type.
Parameters:
type - the new content type

getContentConstraintProperty

public CxContentConstraint getContentConstraintProperty()
Get the content constraint property
Returns:
the current constraint property

getContentConstraint

public int getContentConstraint()
Get the content constraint
Returns:
the constent constraint

setContentConstraint

public void setContentConstraint(int contentConstraint)
Set the content constraint of the type reference.
Parameters:
contentConstraint - the new content constraint

getOrEnabled

public boolean getOrEnabled()
Get the or enabled indicator
Returns:
true if or enabled, otherwise false

setOrEnabled

public void setOrEnabled(boolean orEnabled)
Set the or enabled indicator.
Parameters:
orEnabled - true if or is enabled, otherwise false.

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

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent event)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener

getSchema

public XSet getSchema()
Returns an XML representation of the variable and it's elements.

docReceived

public void docReceived(CxEvent evt)

getDbType

public int getDbType()
Returns the underlying type of the CxVar as one of the java.sql.Types type.