|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.alee.laf.tree.TreeUtils
public final class TreeUtils
This class provides a set of utilities for trees. This is a library utility class and its not intended for use outside of the trees.
Constructor Summary | |
---|---|
TreeUtils()
|
Method Summary | ||
---|---|---|
static TreeState |
getTreeState(javax.swing.JTree tree)
Returns tree expansion and selection states. |
|
static TreeState |
getTreeState(javax.swing.JTree tree,
boolean saveSelection)
Returns tree expansion and selection states. |
|
static
|
optimizeNodes(java.util.List<E> nodes)
Optimizes list of nodes by removing those which already have their parent node in the list. |
|
static void |
setTreeState(javax.swing.JTree tree,
TreeState treeState)
Restores tree expansion and selection states. |
|
static void |
setTreeState(javax.swing.JTree tree,
TreeState treeState,
boolean restoreSelection)
Restores tree expansion and selection states. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TreeUtils()
Method Detail |
---|
public static TreeState getTreeState(javax.swing.JTree tree)
tree
- tree to process
public static TreeState getTreeState(javax.swing.JTree tree, boolean saveSelection)
tree
- tree to processsaveSelection
- whether to save selection states or not
public static void setTreeState(javax.swing.JTree tree, TreeState treeState)
tree
- tree to processtreeState
- tree expansion and selection statespublic static void setTreeState(javax.swing.JTree tree, TreeState treeState, boolean restoreSelection)
tree
- tree to processtreeState
- tree expansion and selection statesrestoreSelection
- whether to restore selection states or notpublic static <E extends javax.swing.tree.DefaultMutableTreeNode> void optimizeNodes(java.util.List<E> nodes)
nodes
- nodes list to optimize
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |