public class LazyParentNode
extends javax.swing.tree.DefaultMutableTreeNode
To use: Create an implementation of LazyParent which fetches the children, create a LazyParentNode and add it to a tree's DefaultTreeModel
The LazyParent instance given at construction time is set as the 'UserObject' of this DefaultMutableTreeNode.
If the process to determine the children takes any significant time then a temporary LazyProgressNode is displayed in the tree to give the user feedback on what's happening.
Constructor and Description |
---|
LazyParentNode(javax.swing.tree.DefaultTreeModel treeModel, LazyParent lazyParent)
Create a LazyParentNode.
|
LazyParentNode(javax.swing.tree.DefaultTreeModel treeModel, LazyParent lazyParent, LazyProgressController controller)
Create a LazyParentNode.
|
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, 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, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject, toString
public LazyParentNode(javax.swing.tree.DefaultTreeModel treeModel, LazyParent lazyParent)
public LazyParentNode(javax.swing.tree.DefaultTreeModel treeModel, LazyParent lazyParent, LazyProgressController controller)
The controller will inform listeners whether any progress nodes in this tree are currently fetching their children and has the ability to cancel fetching.
treeModel
- The DefaultTreeModel of the tree containing the nodeslazyParent
- A LazyParent implementation that will fetch the children of this nodecontroller
- a controller to track all of nodes in the tree