java.lang.Object
javax.swing.tree.DefaultMutableTreeNode
screengen.gui.DynamicTreeNode
- All Implemented Interfaces:
- java.lang.Cloneable, javax.swing.tree.MutableTreeNode, java.io.Serializable, javax.swing.tree.TreeNode
- public class DynamicTreeNode
- extends javax.swing.tree.DefaultMutableTreeNode
|
Field Summary |
protected boolean |
hasLoaded
Have the children of this node been loaded yet? |
|
Method Summary |
void |
addDynamicNodeChild(java.lang.Object oObj)
|
int |
getChildCount()
If hasLoaded is false, meaning the children have not yet been
loaded, loadChildren is messaged and super is messaged for
the return value. |
boolean |
isLeaf()
Returns true if this tree node is a lead node (that is, it
has no children), and false. |
protected void |
loadChildren()
Messaged the first time getChildCount is messaged. |
| Methods inherited from class javax.swing.tree.DefaultMutableTreeNode |
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, 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 |
hasLoaded
protected boolean hasLoaded
- Have the children of this node been loaded yet?
DynamicTreeNode
public DynamicTreeNode(java.lang.Object o)
- Constructs a new DynamicTreeNode instance with o as the user
object.
isLeaf
public boolean isLeaf()
- Description copied from class:
javax.swing.tree.DefaultMutableTreeNode
- Returns
true if this tree node is a lead node (that is, it
has no children), and false.
getChildCount
public int getChildCount()
- If hasLoaded is false, meaning the children have not yet been
loaded, loadChildren is messaged and super is messaged for
the return value.
loadChildren
protected void loadChildren()
- Messaged the first time getChildCount is messaged. Creates
children with random names from names.
addDynamicNodeChild
public void addDynamicNodeChild(java.lang.Object oObj)