org.keridwen.modelling.group.editor.ui
Class PropertyTreeNode

java.lang.Object
  extended by javax.swing.tree.DefaultMutableTreeNode
      extended by org.keridwen.modelling.group.editor.ui.PropertyTreeNode
All Implemented Interfaces:
Serializable, Cloneable, MutableTreeNode, TreeNode

public class PropertyTreeNode
extends DefaultMutableTreeNode

JTree node for Properties.

Author:
J.Forest, Artenum SARL.
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
PropertyTreeNode(com.artenum.frida.interfaces.PropertyInterface tmpProp)
          Default constructor.
 
Method Summary
 void add(MutableTreeNode newChild)
          Add the given new child to the present PropertyTreeNode.
 void addChildAndBypassUserObjectUpdate(MutableTreeNode newChild)
          Add the given new child to the present PropertyTreeNode but do not update the Property-Characteristics model.
 boolean addUserObjectToProperty(MutableTreeNode newChild)
           
 com.artenum.frida.interfaces.PropertyInterface getProperty()
          Get the Property linked to the present tree node.
 String toString()
          Get the name of the linked Property.
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PropertyTreeNode

public PropertyTreeNode(com.artenum.frida.interfaces.PropertyInterface tmpProp)
Default constructor.

Parameters:
tmpProp -
Method Detail

getProperty

public com.artenum.frida.interfaces.PropertyInterface getProperty()
Get the Property linked to the present tree node.

Returns:
the linked Property.

toString

public String toString()
Get the name of the linked Property.

Overrides:
toString in class DefaultMutableTreeNode

add

public void add(MutableTreeNode newChild)
Add the given new child to the present PropertyTreeNode. If the user object linked to the new child is a Characteristic or a sub-Property, this method adds it to the corresponding list of the Property (user object) linked to the present PropertyTreeNode.
If the newChild user object cannot be added to the Property, this method exit and the newChild is not added to the present ProperyTreeNode.
The consistency of both models are then automatically maintained.
ATTENTION: This method should not be used if the Characteristics and/or sub-Properties are already registered in the list of the Property. This may lead to reentrant errors. Use the addChildAndBypassUserObjectUpdate in spite of.

Overrides:
add in class DefaultMutableTreeNode
Parameters:
newChild - - New child being added.

addChildAndBypassUserObjectUpdate

public void addChildAndBypassUserObjectUpdate(MutableTreeNode newChild)
Add the given new child to the present PropertyTreeNode but do not update the Property-Characteristics model. See add for further explanation.

Parameters:
newChild - - New child being added.

addUserObjectToProperty

public boolean addUserObjectToProperty(MutableTreeNode newChild)


Copyright © 2012-2013 Artenum. All Rights Reserved.