|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectTrees
public final class Trees
Convenience static methods for trees operations.
Method Summary | |
---|---|
static TreePath[] |
getPathsToUserObject(TreeModel model,
Object value)
Returns the path to the specified user object. |
static void |
print(TreeModel tree)
Prints the specified tree model to the standard output stream. |
static void |
print(TreeNode node)
Prints the specified tree to the standard output stream. |
static String |
toString(TreeModel tree)
Returns a graphical representation of the specified tree model. |
static String |
toString(TreeNode node)
Returns a graphical representation of the specified tree. |
static TreeNode |
xmlToSwing(Node node)
Creates a Swing root tree node from a XML root tree node. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static TreePath[] getPathsToUserObject(TreeModel model, Object value)
TreeNode
,
this method compares the specified value
against the user object returned by the
TreeNode.getUserObject()
method.
model
- The tree model to inspect.value
- User object to compare to
TreeNode.getUserObject()
.
public static TreeNode xmlToSwing(Node node)
toString(TreeNode)
, this method provides a convenient way to print
the content of a XML document for debugging purpose.
public static String toString(TreeModel tree)
tree
- The tree to format.
null
if it doesn't contain any node.public static String toString(TreeNode node)
node
- The root node of the tree to format.
null
if it doesn't contain any node.public static void print(TreeModel tree)
public static void print(TreeNode node)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |