public class TreeNode<M> extends DefaultMutableTreeNode<M>
initialised flag to enable lazy
loading of child nodes.
© Copyright 2009 Sans Pareil Technologies, Inc.
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
initialised
A flag used to indicate that this node is un-initialised.
|
actionCommand, allowsChildren, children, EMPTY_ENUMERATION, parent, userObject| Constructor and Description |
|---|
TreeNode()
Default constructor.
|
TreeNode(M model)
Create a new tree node with the specified model object backing it.
|
TreeNode(M model,
boolean allowsChildren)
Create a new node with the specified model and flag indicating whether the node allows
children.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isLeaf()
Over-ridden to always return
false. |
add, breadthFirstEnumeration, children, depthFirstEnumeration, getActionCommand, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, 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, setActionCommand, setAllowsChildren, setParent, setUserObject, toStringprotected boolean initialised
DefaultMutableTreeNode.getChildCount() and set accordingly. Default to false.public TreeNode()
public TreeNode(M model)
model - The model object backing the node.public TreeNode(M model, boolean allowsChildren)
model - The model object backing the node.allowsChildren - A flag indiciating whether the node allows children.public boolean isLeaf()
false. This enables lazy loading
of the children of nodes.isLeaf in interface TreeNodeisLeaf in class DefaultMutableTreeNode<M>