All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Class java.awt.swing.JTree.DynamicUtilTreeNode

java.lang.Object
    |
    +----java.awt.swing.tree.DefaultMutableTreeNode
            |
            +----java.awt.swing.JTree.DynamicUtilTreeNode

public static class JTree.DynamicUtilTreeNode
extends DefaultMutableTreeNode
DynamicUtilTreeNode can wrap vectors/hashtables/arrays/strings and create the appropriate children tree nodes as necessary. It is dynamic in that it'll only create the children as necessary.


Variable Index

 o childValue
Value to create children with.
 o hasChildren
 o loadedChildren

Constructor Index

 o JTree.DynamicUtilTreeNode(Object, Object)

Method Index

 o createChildren(DefaultMutableTreeNode, Object)
Adds to parent all the children in children.
 o getChildCount()
If the receiver has not yet been loaded, loadChildren() is messaged.
 o isLeaf()
Retrusn true if the receiver allows children, false otherwise.
 o loadChildren()
Loads the children based on childValue.

Variables

 o hasChildren
protected boolean hasChildren
 o childValue
protected Object childValue
Value to create children with.

 o loadedChildren
protected boolean loadedChildren

Constructors

 o JTree.DynamicUtilTreeNode
public JTree.DynamicUtilTreeNode(Object value,
                                 Object children)

Methods

 o createChildren
public static void createChildren(DefaultMutableTreeNode parent,
                                  Object children)
Adds to parent all the children in children. If children is an array or Vector all of its elements are added is children, otherwise if children is a Hashtable all the key/value pairs are added in the order Enumeration returns them.

 o isLeaf
public boolean isLeaf()
Retrusn true if the receiver allows children, false otherwise.

Overrides:
isLeaf in class DefaultMutableTreeNode
 o getChildCount
public int getChildCount()
If the receiver has not yet been loaded, loadChildren() is messaged.

Overrides:
getChildCount in class DefaultMutableTreeNode
 o loadChildren
protected void loadChildren()
Loads the children based on childValue. If childValue is a Vector orarray each element added as a child, if childValue is a Hashtable each key/value pair is added in the order that Enumeration returns the keys.


All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Submit a bug or feature