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.
childValue- Value to create children with.
hasChildren-
loadedChildren-
JTree.DynamicUtilTreeNode(Object, Object)
-
createChildren(DefaultMutableTreeNode, Object)
- Adds to parent all the children in
children
.
getChildCount()
- If the receiver has not yet been loaded, loadChildren() is
messaged.
isLeaf()
- Retrusn true if the receiver allows children, false otherwise.
loadChildren()
- Loads the children based on childValue.
hasChildren
protected boolean hasChildren
childValue
protected Object childValue
- Value to create children with.
loadedChildren
protected boolean loadedChildren
JTree.DynamicUtilTreeNode
public JTree.DynamicUtilTreeNode(Object value,
Object children)
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.
isLeaf
public boolean isLeaf()
- Retrusn true if the receiver allows children, false otherwise.
- Overrides:
- isLeaf in class DefaultMutableTreeNode
getChildCount
public int getChildCount()
- If the receiver has not yet been loaded, loadChildren() is
messaged.
- Overrides:
- getChildCount in class DefaultMutableTreeNode
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