java.lang.Object
javax.swing.tree.DefaultMutableTreeNode
javax.swing.JTree.DynamicUtilTreeNode
- All Implemented Interfaces:
Serializable
,Cloneable
,MutableTreeNode
,TreeNode
- Enclosing class:
JTree
DynamicUtilTreeNode
can wrap
vectors/hashtables/arrays/strings and
create the appropriate children tree nodes as necessary. It is
dynamic in that it will only create the children as necessary.
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications running
the same version of Swing. As of 1.4, support for long term storage
of all JavaBeans
has been added to the java.beans
package.
Please see XMLEncoder
.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Object
Value to create children with.protected boolean
Does the thisJTree
have children?protected boolean
Have the children been loaded yet?Fields declared in class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
-
Constructor Summary
ConstructorsConstructorDescriptionDynamicUtilTreeNode
(Object value, Object children) Creates a node with the specified object as its value and with the specified children. -
Method Summary
Modifier and TypeMethodDescriptionchildren()
Subclassed to load the children, if necessary.static void
createChildren
(DefaultMutableTreeNode parent, Object children) Adds to parent all the children inchildren
.getChildAt
(int index) Subclassed to load the children, if necessary.int
Returns the number of child nodes.boolean
isLeaf()
Returns true if this node allows children.protected void