org.wegra.util.collection
Class Tree

java.lang.Object
  extended byorg.wegra.util.collection.Tree
All Implemented Interfaces:
java.io.Serializable

public class Tree
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Constructor Summary
Tree()
          Returns a Tree with default TreeNode as its root.
Tree(TreeNode root)
          Returns a Tree with the specified TreeNode as its root.
 
Method Summary
 TreeNode getRoot()
          Returns the root TreeNode.
 void setRoot(TreeNode root)
          Sets the root TreeNode with specified TreeNode.
static javax.swing.JTree toJTree(Tree tree)
           
static javax.swing.tree.MutableTreeNode toSwingTreeNode(TreeNode node)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tree

public Tree()
Returns a Tree with default TreeNode as its root.


Tree

public Tree(TreeNode root)
Returns a Tree with the specified TreeNode as its root.

Method Detail

setRoot

public void setRoot(TreeNode root)
Sets the root TreeNode with specified TreeNode.

Parameters:
root - new root TreeNode.

getRoot

public TreeNode getRoot()
Returns the root TreeNode.


toJTree

public static javax.swing.JTree toJTree(Tree tree)

toSwingTreeNode

public static javax.swing.tree.MutableTreeNode toSwingTreeNode(TreeNode node)