Package org.jdesktop.swingx.tree
Class TreeUtilities
- java.lang.Object
-
- org.jdesktop.swingx.tree.TreeUtilities
-
public class TreeUtilities extends java.lang.ObjectContains convenience classes/methods for handling hierarchical Swing structures.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTreeUtilities.BreadthFirstModelEnumerationImplementation of a breadthFirst traversal of a subtree in a TreeModel.static classTreeUtilities.BreadthFirstNodeEnumeration<M extends javax.swing.tree.TreeNode>Implementation of a breadthFirst traversal of a subtree with nodes of type TreeNode.static classTreeUtilities.PostorderModelEnumerationImplementation of a postorder traversal of a subtree in a TreeModel.static classTreeUtilities.PostorderNodeEnumeration<M extends javax.swing.tree.TreeNode>Implementation of a postorder traversal of a subtree with nodes of type TreeNode.static classTreeUtilities.PreorderModelEnumerationImplementation of a preorder traversal of a TreeModel.static classTreeUtilities.PreorderNodeEnumeration<M extends javax.swing.tree.TreeNode>Implementation of a preorder traversal of a subtree with nodes of type TreeNode.
-
Field Summary
Fields Modifier and Type Field Description static java.util.EnumerationEMPTY_ENUMERATIONAn enumeration that is always empty.private static java.util.logging.LoggerLOG
-
Constructor Summary
Constructors Modifier Constructor Description privateTreeUtilities()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Enumerationchildren(javax.swing.tree.TreeModel model)Creates and returns an Enumeration across the direct children of the rootNode in the given TreeModel.static java.util.Enumerationchildren(javax.swing.tree.TreeModel model, java.lang.Object parent)Creates and returns an Enumeration across the direct children of parentNode in the given TreeModel.
-
-
-
Method Detail
-
children
public static java.util.Enumeration children(javax.swing.tree.TreeModel model)
Creates and returns an Enumeration across the direct children of the rootNode in the given TreeModel.- Parameters:
model- the TreeModel which contains parent, must not be null- Returns:
- an Enumeration across the direct children of the model's root, the enumeration is empty if the root is null or contains no children
-
children
public static java.util.Enumeration children(javax.swing.tree.TreeModel model, java.lang.Object parent)Creates and returns an Enumeration across the direct children of parentNode in the given TreeModel.- Parameters:
model- the TreeModel which contains parent, must not be nullparent- the parent of the enumerated children- Returns:
- an Enumeration across the direct children of parent, the enumeration is empty if the parent is null or contains no children
-
-