|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--harmonic.mz.data.ModelNode
|
+--harmonic.mz.data.fields.NodeSetField
This is the field contains a list of other nodes. When this field is contructed, it may be instructed to take nodes added to as its formal children (parenting the nodes to itself in the database), or to only keep a list in its own special array. Thus this class may be used for forming both trees and general networks of nodes. This field updates listeners when children are added or removed, and registers itself as a listener of any nodes added to it, so that if they are changed this fields listeners are updated. Note this is not the usual case for a tree node: usually a child doesn't tell its parent if it is changed.
| Field Summary | |
boolean |
bIncremental
|
boolean |
bIsObjectSet
|
boolean |
bNodeParent
|
boolean |
bPickInvisible
|
int |
exactCount
|
java.lang.String[] |
filter
|
ShapeNode[] |
include
|
int |
minCount
|
java.util.Vector |
nodes
|
| Fields inherited from class harmonic.mz.data.ModelNode |
_fileRoot_, _thread_, ATTRIB_CONTROL_WIDGET, ATTRIB_LISTABLE, ATTRIB_PRESENTABLE, ATTRIB_PRIVATE, ATTRIB_REMOVEABLE, ATTRIB_RENAMEABLE, ATTRIB_SHOW_CONTEXT_MENU, ATTRIB_TYPE_FILTER, ATTRIB_USERGROUP, ATTRIB_VALUE_GROUP, ATTRIB_VE_LISTENER, bCustomCS, bDebug, bValid, name |
| Constructor Summary | |
NodeSetField(boolean bNodeParent)
Constructs a NodeSetField |
|
NodeSetField(boolean bNodeParent,
DataNode node)
Constructs a NodeSetField |
|
| Method Summary | |
void |
addNetworkInput(DataNode node)
Overrides network editor behaviour |
void |
addNode(DataNode child)
This overrides DataNode.addNode() to assert that this has been initialized as a parenting node, and to add this as a listener to child |
void |
addSharedNode(DataNode p)
DataNode.add() will always really add given node as a child, removing from the old parent if there is one. |
void |
addSharedNodes(DataNode[] n)
Array version of addSharedNode |
void |
assignFromXMLString(MVGFileOpener opener,
java.lang.String string)
Implements XML string in |
java.lang.String |
assignToXMLString(MVGFileSaver saver)
Implements XML string out |
java.lang.String |
checkNetworkInput(DataNode node)
Overrides network editor behaviour |
java.awt.Component |
createControlWidget()
Implements abstract control widget creator by returning a NodeSetEntry |
ModelNode[] |
getModelNodeSelection()
Returns selection set filterd to only have ModelNode's |
java.util.Vector |
getSelection_Vector()
Returns an array of contained nodes. |
DataNode[] |
getSelection()
Returns an array of contained nodes. |
ShapeNode[] |
getShapeSelection()
Returns selection set filterd to only have ShapeDef's |
DataNode[] |
getTempSelection()
|
void |
initControlWidget(java.awt.Component e)
Implements abstract control widget initializer |
boolean |
isFinal()
Returns !getTransient() |
boolean |
isObjectSet()
Returns whether this is to be set of ShapeDef's |
boolean |
isSet()
Returns whether user interface effecting this node has set its value yet. |
DataNode |
nodeAt(int i)
Return contained node at index |
int |
nodeCount()
DataNode.nodeCount() will always return the number for formal children. |
void |
purgeFinal()
Called by database when node is intended to never come back, such as when a file is closed or node is deleted out of the undo system. |
java.lang.String |
pythonString()
String for represention in python. |
void |
removeNetworkInput(DataNode node)
Overrides network editor behaviour |
void |
removeNode(DataNode child,
boolean bUnlink)
This overrides DataNode.remove to remove this from child's listeners |
void |
removeSharedNode(DataNode p)
Opposite of addNode() |
void |
removeSharedNodes()
Remove all shared nodes |
ShapeNode |
sdat(int i)
Handy function for geting node at index, if is it is known all contained nodes are ShapeDefs |
void |
set(DataNode _source)
Does proper copying. |
void |
setExactCount(int n)
Sets the exact count requirement used to select nodes, passed on to control widget. |
void |
setFilter(java.lang.String[] filter)
Sets the filter to be used to select nodes, passed on to control widget. |
void |
setInclude(ShapeNode[] include)
Sets the intance filter to be used to select nodes, passed on to control widget. |
void |
setIsObjectSet(boolean b)
Set whether this is to be set of ShapeDef's |
void |
setMinCount(int n)
Sets the minimum count requirement used to select nodes, passed on to control widget. |
void |
setPickInvisible(boolean b)
Sets the whether the object entry device should be able to pick invisible object when filing this nodes value |
void |
setSelection(DataNode[] nodes)
|
void |
setSingleNode(DataNode child)
Removes any other nodes and adds the given node. |
DataNode |
singleNode()
Returns the first node if list, null if list is empty. |
int |
tempCount()
|
static java.lang.String |
userString(DataNode p)
|
java.lang.String |
valueString()
String to represent value |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public int minCount
public int exactCount
public java.lang.String[] filter
public ShapeNode[] include
public boolean bIncremental
public boolean bPickInvisible
public java.util.Vector nodes
public boolean bNodeParent
public boolean bIsObjectSet
| Constructor Detail |
public NodeSetField(boolean bNodeParent)
bNodeParent - Controls whether nodes will be added as formal children
public NodeSetField(boolean bNodeParent,
DataNode node)
bNodeParent - Controls whether nodes will be added as formal childrennode - Node is added| Method Detail |
public void set(DataNode _source)
set in interface DataNodeset in class ModelNodepublic boolean isObjectSet()
public void setIsObjectSet(boolean b)
public void purgeFinal()
ModelNode
purgeFinal in interface DataNodepurgeFinal in class ModelNodepublic ShapeNode[] getShapeSelection()
public ModelNode[] getModelNodeSelection()
public DataNode[] getSelection()
public DataNode[] getTempSelection()
public java.util.Vector getSelection_Vector()
public DataNode singleNode()
public ShapeNode sdat(int i)
public int nodeCount()
public int tempCount()
public DataNode nodeAt(int i)
public void addSharedNode(DataNode p)
public void addSharedNodes(DataNode[] n)
public void removeSharedNode(DataNode p)
public void removeSharedNodes()
public void addNode(DataNode child)
addNode in interface DataNodeaddNode in class ModelNodepublic void setSingleNode(DataNode child)
public void removeNode(DataNode child,
boolean bUnlink)
removeNode in interface DataNoderemoveNode in class ModelNodechild - Node to removebUnlink - Indicates a more thorough removeal is done.public java.lang.String checkNetworkInput(DataNode node)
public void addNetworkInput(DataNode node)
public void removeNetworkInput(DataNode node)
public void setFilter(java.lang.String[] filter)
public void setMinCount(int n)
public void setExactCount(int n)
public void setInclude(ShapeNode[] include)
public void setPickInvisible(boolean b)
public java.awt.Component createControlWidget()
createControlWidget in class ModelNodepublic void initControlWidget(java.awt.Component e)
public void setSelection(DataNode[] nodes)
public boolean isSet()
ModelNode
isSet in class ModelNodepublic boolean isFinal()
ModelNode
isFinal in class ModelNodepublic java.lang.String assignToXMLString(MVGFileSaver saver)
assignToXMLString in class ModelNode
public void assignFromXMLString(MVGFileOpener opener,
java.lang.String string)
assignFromXMLString in class ModelNodepublic static java.lang.String userString(DataNode p)
public java.lang.String valueString()
ModelNode
valueString in interface DataNodevalueString in class ModelNodepublic java.lang.String pythonString()
ModelNode
pythonString in class ModelNode
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||