javax.swing
Class JTree.DynamicUtilTreeNode
java.lang.Object
javax.swing.tree.DefaultMutableTreeNode
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
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 |
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.
JTree.DynamicUtilTreeNode
public JTree.DynamicUtilTreeNode(Object value,
Object children)
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)