dsto.dfc.swing.tree
Class DefaultDfcTreeNode

java.lang.Object
  extended by javax.swing.tree.DefaultMutableTreeNode
      extended by dsto.dfc.swing.tree.DefaultDfcTreeNode
All Implemented Interfaces:
DfcTreeNode, Copyable, Disposable, Serializable, Cloneable, MutableTreeNode, TreeNode

public class DefaultDfcTreeNode
extends DefaultMutableTreeNode
implements DfcTreeNode, Disposable, Copyable

Default impelementation of DfcTreeNode.

Version:
$Revision$
Author:
Matthew Phillips
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
DefaultDfcTreeNode()
           
DefaultDfcTreeNode(Object userObject)
           
 
Method Summary
 void dispose()
          Dispose of the object (unregister listeners, close open resources etc).
 DfcTreeNode findChild(Object childUserObject)
          Find the first child with a matching user object.
 Object getUserObject()
          Get the user object associated with this node.
 boolean isMutable()
          Test if the node can be changed.
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, 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, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface dsto.dfc.swing.tree.DfcTreeNode
setUserObject
 
Methods inherited from interface javax.swing.tree.MutableTreeNode
insert, remove, remove, removeFromParent, setParent
 
Methods inherited from interface javax.swing.tree.TreeNode
children, getAllowsChildren, getChildAt, getChildCount, getIndex, getParent, isLeaf
 
Methods inherited from interface dsto.dfc.util.Copyable
clone
 

Constructor Detail

DefaultDfcTreeNode

public DefaultDfcTreeNode()

DefaultDfcTreeNode

public DefaultDfcTreeNode(Object userObject)
Method Detail

dispose

public void dispose()
Description copied from interface: Disposable
Dispose of the object (unregister listeners, close open resources etc). It should be safe to call this method more than once. Note for beans that support client event listeners: if there are listeners registered when this is called, this method should do nothing.

Specified by:
dispose in interface Disposable

isMutable

public boolean isMutable()
Description copied from interface: DfcTreeNode
Test if the node can be changed.

Specified by:
isMutable in interface DfcTreeNode

getUserObject

public Object getUserObject()
Description copied from interface: DfcTreeNode
Get the user object associated with this node.

Specified by:
getUserObject in interface DfcTreeNode
Overrides:
getUserObject in class DefaultMutableTreeNode

findChild

public DfcTreeNode findChild(Object childUserObject)
Description copied from interface: DfcTreeNode
Find the first child with a matching user object.

Specified by:
findChild in interface DfcTreeNode
Returns:
The matching child or null if no match found.


Copyright © 2008 Commonwealth of Australia