com.dat.cx
Class CxMiniPort

java.lang.Object
  |
  +--com.dat.cx.CxComponent
        |
        +--com.dat.cx.CxPort
              |
              +--com.dat.cx.CxMiniPort
All Implemented Interfaces:
CxExtendsListener, CxListener, CxPortInterface, CxSource, java.util.EventListener, com.d_a_t.expeval.ExpressionContext

public class CxMiniPort
extends CxPort

CxMiniPort provides semantics for a data port component. An Xml port may be typed according to the type of xml document it can recieve. If typed, only documents of that type will be processed on recieving a document


Field Summary
static int interfaceSource
           
static int pinSource
           
static int xmlPortSource
           
 
Fields inherited from class com.dat.cx.CxComponent
compactDisplay, noHatDisplay, standardDisplay
 
Fields inherited from interface com.dat.cx.CxPortInterface
COMPOSITE, EVENT, INTERFACE, METHOD, PROVIDES, USES
 
Constructor Summary
CxMiniPort()
          Default constructor
CxMiniPort(java.lang.String name, boolean direction, int type)
          Constructor
 
Method Summary
 XSet export(XSet doc, CxProject project)
          Export the definition of this component (only this component)
 com.dat.cx.studio.CxCompDisplay getDisplay()
          Get the display peer for this port.
 java.lang.String getIcon()
          Get the icon file name for this port
 CxInterface getInterface()
          Get interface.
 int getMiniPortType()
          Get the type of the mini port.
 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 isMiniPort()
          Determines if the component is a mini port
 void setMiniPortType(int type)
          Set the type of the mini port.
 
Methods inherited from class com.dat.cx.CxPort
addCxListener, exportInfo, getCxListeners, getEditFrame, getPortDirection, hasCxListeners, importInfo, inversePortDirection, isPort, makeInfo, recieve, removeCxListener, setPortDirection
 
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, getXmlType, 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, isName, isNative, isPackage, isPalette, isPin, isPortMgr, isProperty, 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
 

Field Detail

pinSource

public static final int pinSource

xmlPortSource

public static final int xmlPortSource

interfaceSource

public static final int interfaceSource
Constructor Detail

CxMiniPort

public CxMiniPort()
Default constructor

CxMiniPort

public CxMiniPort(java.lang.String name,
                  boolean direction,
                  int type)
Constructor
Parameters:
name - the name for the port
direction - the direction of the port, true for PROVIDES, false for USES
type - the type of the mini port
Method Detail

isMiniPort

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

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 CxPort
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
Returns:
Vector of exception nodes, DOM nodes that have been processed as part of this import and should not be processed by the component factory

export

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

getDisplay

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

setMiniPortType

public void setMiniPortType(int type)
Set the type of the mini port. A type is determined by the type of the source component at the other end of the original wire. Types can be pins, ports, or interfaces.
Parameters:
type - the type of this mini port

getMiniPortType

public int getMiniPortType()
Get the type of the mini port. Types are pin, port, or interface.
Returns:
the mini port type.

getInterface

public CxInterface getInterface()
Get interface. For mini ports of type interface, an instance of the interface is defined as a child.
Returns:
the interface child of this mini port.

getIcon

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