|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.northwestern.at.utils.swing.TreeUtils
public class TreeUtils
Swing tree utilities.
Method Summary | |
---|---|
static boolean |
compare(javax.swing.tree.TreeNode node1,
javax.swing.tree.TreeNode node2)
Compares two trees. |
static void |
dumpTree(javax.swing.tree.TreeNode node,
int level)
Dumps a tree to stdout for debugging. |
static java.util.Collection |
getNodes(javax.swing.tree.TreeNode node)
Gets all the nodes in a tree. |
static java.util.ArrayList |
pruneDescendantsFromTreePathList(javax.swing.tree.TreeModel model,
javax.swing.tree.TreePath[] treePathList)
Prunes descendants from a tree path list. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.util.ArrayList pruneDescendantsFromTreePathList(javax.swing.tree.TreeModel model, javax.swing.tree.TreePath[] treePathList)
Any elements of the list which are descendants of other elements of the list are removed.
model
- A tree model.treePathList
- An array of tree paths in the model.
public static boolean compare(javax.swing.tree.TreeNode node1, javax.swing.tree.TreeNode node2)
node1
- Root of first tree.node2
- Root of second tree.
public static java.util.Collection getNodes(javax.swing.tree.TreeNode node)
node
- The root of the tree.
public static void dumpTree(javax.swing.tree.TreeNode node, int level)
node
- Root of tree.level
- Indentation level.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |