org.jdesktop.swingx.tree
Class TreeUtilities.PreorderModelEnumeration
java.lang.Object
org.jdesktop.swingx.tree.TreeUtilities.PreorderModelEnumeration
- All Implemented Interfaces:
- Enumeration
- Enclosing class:
- TreeUtilities
public static class TreeUtilities.PreorderModelEnumeration
- extends Object
- implements Enumeration
Implementation of a preorder traversal of a TreeModel.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
stack
protected Deque<Enumeration> stack
model
protected TreeModel model
TreeUtilities.PreorderModelEnumeration
public TreeUtilities.PreorderModelEnumeration(TreeModel model)
- Instantiates a preorder traversal starting from the root of the
TreeModel.
- Parameters:
model
- the TreeModel to travers.
TreeUtilities.PreorderModelEnumeration
public TreeUtilities.PreorderModelEnumeration(TreeModel model,
Object node)
- 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
TreeUtilities.PreorderModelEnumeration
public TreeUtilities.PreorderModelEnumeration(TreeModel model,
TreePath path)
- 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
hasMoreElements
public boolean hasMoreElements()
- Specified by:
hasMoreElements
in interface Enumeration
nextElement
public Object nextElement()
- Specified by:
nextElement
in interface Enumeration
Copyright © 2012. All Rights Reserved.