Package org.jdesktop.swingx.tree
Class TreeUtilities.PreorderModelEnumeration
java.lang.Object
org.jdesktop.swingx.tree.TreeUtilities.PreorderModelEnumeration
- All Implemented Interfaces:
Enumeration
- Enclosing class:
- TreeUtilities
Implementation of a preorder traversal of a TreeModel.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a preorder traversal starting from the root of the TreeModel.PreorderModelEnumeration
(TreeModel model, Object node) Instantiates a preorder traversal of the TreeModel which starts at the given node.PreorderModelEnumeration
(TreeModel model, TreePath path) Instantiates a preorder traversal of the TreeModel which starts at the last path component of the given TreePath. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Enumeration
asIterator
-
Field Details
-
stack
-
model
-
-
Constructor Details
-
PreorderModelEnumeration
Instantiates a preorder traversal starting from the root of the TreeModel.- Parameters:
model
- the TreeModel to travers.
-
PreorderModelEnumeration
Instantiates a preorder traversal of the TreeModel which starts at the given node. It iterates over all nodes of the subtree, only.- Parameters:
model
- the TreeModel to travers.node
- the node to start
-
PreorderModelEnumeration
Instantiates a preorder traversal of the TreeModel which starts at the last path component of the given TreePath. It iterates over all nodes of the subtree and all of its siblings, with the same end as a traversal starting at the model's roolt would have.- Parameters:
model
- the TreeModel to travers.path
- the TreePath to start from
-
-
Method Details
-
hasMoreElements
public boolean hasMoreElements()- Specified by:
hasMoreElements
in interfaceEnumeration
-
nextElement
- Specified by:
nextElement
in interfaceEnumeration
-