javax.swing
Class JTree.DynamicUtilTreeNode

java.lang.Object
  extended by javax.swing.tree.DefaultMutableTreeNode
      extended by javax.swing.JTree.DynamicUtilTreeNode
All Implemented Interfaces:
Serializable, Cloneable, MutableTreeNode, TreeNode
Enclosing class:
JTree

public static class JTree.DynamicUtilTreeNode
extends DefaultMutableTreeNode

See Also:
Serialized Form

Field Summary
protected  Object childValue
           
protected  boolean hasChildren
          Currently not set or used by this class.
protected  boolean loadedChildren
           
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, parent, userObject
 
Constructor Summary
JTree.DynamicUtilTreeNode(Object value, Object children)
           
 
Method Summary
 Enumeration children()
          Returns an enumeration containing all children of this node.
static void createChildren(DefaultMutableTreeNode parent, Object children)
           
 TreeNode getChildAt(int pos)
          Returns the child node at position pos.
 int getChildCount()
          Returns the number of children of this node.
 boolean isLeaf()
          Returns true if this tree node is a lead node (that is, it has no children), and false.
protected  void loadChildren()
           
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildBefore, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, 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
 

Field Detail

childValue

protected Object childValue

loadedChildren

protected boolean loadedChildren

hasChildren

protected boolean hasChildren
Currently not set or used by this class. It might be set and used in later versions of this class.

Constructor Detail

JTree.DynamicUtilTreeNode

public JTree.DynamicUtilTreeNode(Object value,
                                 Object children)
Method Detail

getChildCount

public int getChildCount()
Description copied from class: DefaultMutableTreeNode
Returns the number of children of this node.

Specified by:
getChildCount in interface TreeNode
Overrides:
getChildCount in class DefaultMutableTreeNode
Returns:
the number of children

loadChildren

protected void loadChildren()

children

public Enumeration children()
Description copied from class: DefaultMutableTreeNode
Returns an enumeration containing all children of this node. EMPTY_ENUMERATION is returned if this node has no children.

Specified by:
children in interface TreeNode
Overrides:
children in class DefaultMutableTreeNode
Returns:
an enumeration of tree nodes

getChildAt

public TreeNode getChildAt(int pos)
Returns the child node at position pos. Subclassed here to load the children if necessary.

Specified by:
getChildAt in interface TreeNode
Overrides:
getChildAt in class DefaultMutableTreeNode
Parameters:
pos - the position of the child node to fetch
Returns:
the childnode at the specified position

isLeaf

public boolean isLeaf()
Description copied from class: DefaultMutableTreeNode
Returns true if this tree node is a lead node (that is, it has no children), and false.

Specified by:
isLeaf in interface TreeNode
Overrides:
isLeaf in class DefaultMutableTreeNode
Returns:
A boolean.

createChildren

public static void createChildren(DefaultMutableTreeNode parent,
                                  Object children)