com.jgoodies.uif.util
Class TreeUtils

java.lang.Object
  extended by com.jgoodies.uif.util.TreeUtils

public final class TreeUtils
extends Object

Consists only of static methods for convenience tree operations.

Version:
$Revision: 1.7 $
Author:
Karsten Lentzsch
See Also:
JTree

Method Summary
static void collapseAllSiblings(JTree tree, TreePath aPath)
          Collapses all siblings of the specified TreePath.
static void collapseChildren(JTree tree, TreePath path)
          Collapses the children of the specified TreePath.
static void expand(JTree tree, int maxLevelToExpand)
          Expands the nodes of the given tree up to the given level: 0 does nothing, 1 expands the top level, 2 expands the first two levels, 3 expands the first three levels, etc.
static void expandTopLevel(JTree tree)
          Expands the top level rows of the given tree.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

collapseAllSiblings

public static void collapseAllSiblings(JTree tree,
                                       TreePath aPath)
Collapses all siblings of the specified TreePath.

Parameters:
tree - the tree to operate on
aPath - the path that defines which siblings are to be collapsed

collapseChildren

public static void collapseChildren(JTree tree,
                                    TreePath path)
Collapses the children of the specified TreePath.

Parameters:
tree - the tree to operate on
path - the path to the parent of the children to be collapsed

expand

public static void expand(JTree tree,
                          int maxLevelToExpand)
Expands the nodes of the given tree up to the given level: 0 does nothing, 1 expands the top level, 2 expands the first two levels, 3 expands the first three levels, etc.

Parameters:
tree - the tree to operate on
maxLevelToExpand - the maximum level to expand

expandTopLevel

public static void expandTopLevel(JTree tree)
Expands the top level rows of the given tree.

Parameters:
tree - the tree to operate on


Copyright © 2000-2008 JGoodies Karsten Lentzsch. All Rights Reserved.