| java.lang.Object javax.swing.tree.DefaultMutableTreeNode org.cougaar.mlm.debug.ui.UITreeNode
All known Subclasses: org.cougaar.mlm.debug.ui.UIClusterAssetsNode, org.cougaar.mlm.debug.ui.UIWorkflowNode, org.cougaar.mlm.debug.ui.UIClusterAssetNode, org.cougaar.mlm.debug.ui.UIPlanNode, org.cougaar.mlm.debug.ui.UITaskNode, org.cougaar.mlm.debug.ui.UIStringNode, org.cougaar.mlm.debug.ui.UITaskCollectionNode, org.cougaar.mlm.debug.ui.UIAllAssetsNode, org.cougaar.mlm.debug.ui.UIPlanElementNode, org.cougaar.mlm.debug.ui.UIPlanDetailsNode, org.cougaar.mlm.debug.ui.UIPenaltyValueNode, org.cougaar.mlm.debug.ui.UIWorkflowCollectionNode, org.cougaar.mlm.debug.ui.UITaskObjectsNode, org.cougaar.mlm.debug.ui.UIAssetAttributeNode, org.cougaar.mlm.debug.ui.UIAssetNode, org.cougaar.mlm.debug.ui.UIConstraintNode, org.cougaar.mlm.debug.ui.UIScheduleElementNode, org.cougaar.mlm.debug.ui.UIObjectNode, org.cougaar.mlm.debug.ui.UIScheduleNode,
UITreeNode | public class UITreeNode extends DefaultMutableTreeNode (Code) | | Support a dynamically expanded and updated tree node.
This overrides methods defined in DefaultMutableTreeNode (swing class)
to provide dynamic loading of child nodes. This also defines
object listener methods to listen for changes to the data, and
update the tree model which updates the display.
This class is extended by numerous classes which display the various
cluster objects (plans, plan elements, tasks, allocations, etc.)
as nodes in a tree.
|
Constructor Summary | |
public | UITreeNode() Construct a new tree node. | public | UITreeNode(Object userObject) Construct a new tree node for the specified object. |
Method Summary | |
public DefaultMutableTreeNode | findUserObject(Object o) Find the node for the user object in the children nodes of the tree. | public boolean | getAllowsChildren() Called by TreeModel prior to displaying children. | public int | getChildCount() Called by TreeModel prior to displaying children. | public void | invalidateChildren() Called when node has changed to invalidate its children. | public boolean | isLeaf() Override this in subclasses to return whether or not
the user object is a leaf. | public void | loadChildren() Override this in subclasses to load children. | public void | removeObjectFromTree(Object o) Used by subclasses to remove objects from the tree,
when the objects are removed from their containers. | void | saveTree(String pathname) Save the string representations of the objects in the tree. | public void | setTreeModel(DefaultTreeModel treeModel) Called by UITreeDisplay to set the tree model
associated with the tree that this node is in. | public void | setUserObject(Object userObject) Set the object associated with this tree node; typically used
in conjunction with the zero-arg constructor. |
UITreeNode | public UITreeNode()(Code) | | Construct a new tree node. Should subsequently call setUserObject
to set the object associated with this tree node.
|
UITreeNode | public UITreeNode(Object userObject)(Code) | | Construct a new tree node for the specified object.
Parameters: userObject - object for which to create tree node |
getAllowsChildren | public boolean getAllowsChildren()(Code) | | Called by TreeModel prior to displaying children.
Load children if they're not already loaded.
true if allows children, from DefaultMutableTreeNode.getAllowsChildren |
getChildCount | public int getChildCount()(Code) | | Called by TreeModel prior to displaying children.
Load children if they're not already loaded.
number of children from DefaultMutableTreeNode.getChildCount |
invalidateChildren | public void invalidateChildren()(Code) | | Called when node has changed to invalidate its children.
First, removeAllChildren, then set the hasLoaded flag to false,
because otherwise removeAllChildren will first try to load the children!
|
isLeaf | public boolean isLeaf()(Code) | | Override this in subclasses to return whether or not
the user object is a leaf.
false |
loadChildren | public void loadChildren()(Code) | | Override this in subclasses to load children.
|
removeObjectFromTree | public void removeObjectFromTree(Object o)(Code) | | Used by subclasses to remove objects from the tree,
when the objects are removed from their containers.
|
saveTree | void saveTree(String pathname)(Code) | | Save the string representations of the objects in the tree.
Called from UITreeDisplay when the user selects the "Save" menu item.
|
setTreeModel | public void setTreeModel(DefaultTreeModel treeModel)(Code) | | Called by UITreeDisplay to set the tree model
associated with the tree that this node is in.
The tree model is used to insert and delete nodes in the tree.
Parameters: treeModel - the tree model associated with this tree |
setUserObject | public void setUserObject(Object userObject)(Code) | | Set the object associated with this tree node; typically used
in conjunction with the zero-arg constructor.
Parameters: userObject - object to associate with tree node |
|
|