public static class JTree.DynamicUtilTreeNode extends DefaultMutableTreeNode
Modifier and Type | Field and Description |
---|---|
protected Object |
childValue |
protected boolean |
hasChildren
Currently not set or used by this class.
|
protected boolean |
loadedChildren |
allowsChildren, children, parent, userObject
Constructor and Description |
---|
JTree.DynamicUtilTreeNode(Object value,
Object children) |
Modifier and Type | Method and Description |
---|---|
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() |
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
protected Object childValue
protected boolean loadedChildren
protected boolean hasChildren
public JTree.DynamicUtilTreeNode(Object value, Object children)
public int getChildCount()
DefaultMutableTreeNode
getChildCount
in interface TreeNode
getChildCount
in class DefaultMutableTreeNode
protected void loadChildren()
public Enumeration children()
DefaultMutableTreeNode
EMPTY_ENUMERATION
is returned if this node has no children.children
in interface TreeNode
children
in class DefaultMutableTreeNode
public TreeNode getChildAt(int pos)
pos
. Subclassed
here to load the children if necessary.getChildAt
in interface TreeNode
getChildAt
in class DefaultMutableTreeNode
pos
- the position of the child node to fetchpublic boolean isLeaf()
DefaultMutableTreeNode
true
if this tree node is a lead node (that is, it
has no children), and false.
isLeaf
in interface TreeNode
isLeaf
in class DefaultMutableTreeNode
public static void createChildren(DefaultMutableTreeNode parent, Object children)