de.grogra.util
Class Tree
java.lang.Object
de.grogra.util.TreeModelSupport
de.grogra.util.Tree
- All Implemented Interfaces:
- javax.swing.tree.TreeModel
- Direct Known Subclasses:
- MutableTree
public class Tree
- extends TreeModelSupport
- implements javax.swing.tree.TreeModel
Method Summary |
static java.lang.Object |
findFirst(javax.swing.tree.TreeModel tree,
java.lang.Object root,
ObjectToBoolean filter)
|
static java.lang.Object |
findMax(javax.swing.tree.TreeModel tree,
java.lang.Object root,
java.util.Comparator comparator)
|
static java.lang.Object |
findMax(javax.swing.tree.TreeModel tree,
java.lang.Object root,
java.util.Comparator comparator,
java.lang.Object max)
|
java.lang.Object |
getChild(java.lang.Object parent,
int index)
|
int |
getChildCount(java.lang.Object parent)
|
int |
getIndexOfChild(java.lang.Object parent,
java.lang.Object child)
|
int |
getIndexOfChild(Tree.Node child)
|
java.lang.Object |
getParent(java.lang.Object child)
|
java.lang.Object |
getRoot()
|
boolean |
hasValidPath(Tree.Node leaf)
|
boolean |
isLeaf(java.lang.Object node)
|
boolean |
nodesEqual(Tree.Node a,
Tree.Node b)
|
void |
valueForPathChanged(javax.swing.tree.TreePath path,
java.lang.Object newValue)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.swing.tree.TreeModel |
addTreeModelListener, removeTreeModelListener |
root
protected Tree.Node root
Tree
public Tree(Tree.Node root)
findFirst
public static java.lang.Object findFirst(javax.swing.tree.TreeModel tree,
java.lang.Object root,
ObjectToBoolean filter)
findMax
public static java.lang.Object findMax(javax.swing.tree.TreeModel tree,
java.lang.Object root,
java.util.Comparator comparator)
findMax
public static java.lang.Object findMax(javax.swing.tree.TreeModel tree,
java.lang.Object root,
java.util.Comparator comparator,
java.lang.Object max)
getChild
public java.lang.Object getChild(java.lang.Object parent,
int index)
- Specified by:
getChild
in interface javax.swing.tree.TreeModel
getChildCount
public int getChildCount(java.lang.Object parent)
- Specified by:
getChildCount
in interface javax.swing.tree.TreeModel
getIndexOfChild
public int getIndexOfChild(java.lang.Object parent,
java.lang.Object child)
- Specified by:
getIndexOfChild
in interface javax.swing.tree.TreeModel
getIndexOfChild
public final int getIndexOfChild(Tree.Node child)
getParent
public java.lang.Object getParent(java.lang.Object child)
getRoot
public java.lang.Object getRoot()
- Specified by:
getRoot
in interface javax.swing.tree.TreeModel
hasValidPath
public boolean hasValidPath(Tree.Node leaf)
isLeaf
public boolean isLeaf(java.lang.Object node)
- Specified by:
isLeaf
in interface javax.swing.tree.TreeModel
nodesEqual
public boolean nodesEqual(Tree.Node a,
Tree.Node b)
valueForPathChanged
public void valueForPathChanged(javax.swing.tree.TreePath path,
java.lang.Object newValue)
- Specified by:
valueForPathChanged
in interface javax.swing.tree.TreeModel