info.joseluismartin.gui.tree
Class TreeNodeAdapter

java.lang.Object
  extended by info.joseluismartin.gui.tree.TreeNodeAdapter
All Implemented Interfaces:
MutableTreeNode, TreeNode

public class TreeNodeAdapter
extends Object
implements MutableTreeNode

An Adapter from any class to MutableTreeNode.

Author:
Jose Luis Martin - (jlm@joseluismartin.info)

Constructor Summary
TreeNodeAdapter(Node node)
           
 
Method Summary
 void add(Node node)
           
 Enumeration children()
           
 boolean equals(Object obj)
          
 boolean getAllowsChildren()
           
 TreeNode getChildAt(int childIndex)
           
 int getChildCount()
           
 int getIndex(TreeNode treeNode)
           
 Node getNode()
           
 TreeNode getParent()
           
 int hashCode()
          
 void insert(MutableTreeNode child, int index)
           
 boolean isLeaf()
           
 void remove(int index)
           
 void remove(MutableTreeNode node)
           
 void removeFromParent()
           
 void setNode(Node node)
           
 void setParent(MutableTreeNode newParent)
           
 void setUserObject(Object object)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TreeNodeAdapter

public TreeNodeAdapter(Node node)
Method Detail

children

public Enumeration children()
Specified by:
children in interface TreeNode

getAllowsChildren

public boolean getAllowsChildren()
Specified by:
getAllowsChildren in interface TreeNode

getChildAt

public TreeNode getChildAt(int childIndex)
Specified by:
getChildAt in interface TreeNode

getChildCount

public int getChildCount()
Specified by:
getChildCount in interface TreeNode

getIndex

public int getIndex(TreeNode treeNode)
Specified by:
getIndex in interface TreeNode

getParent

public TreeNode getParent()
Specified by:
getParent in interface TreeNode

isLeaf

public boolean isLeaf()
Specified by:
isLeaf in interface TreeNode

toString

public String toString()
Overrides:
toString in class Object

getNode

public Node getNode()

setNode

public void setNode(Node node)

add

public void add(Node node)

insert

public void insert(MutableTreeNode child,
                   int index)
Specified by:
insert in interface MutableTreeNode

remove

public void remove(int index)
Specified by:
remove in interface MutableTreeNode

remove

public void remove(MutableTreeNode node)
Specified by:
remove in interface MutableTreeNode

removeFromParent

public void removeFromParent()
Specified by:
removeFromParent in interface MutableTreeNode

setParent

public void setParent(MutableTreeNode newParent)
Specified by:
setParent in interface MutableTreeNode

setUserObject

public void setUserObject(Object object)
Specified by:
setUserObject in interface MutableTreeNode

hashCode

public int hashCode()

Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)

Overrides:
equals in class Object


Copyright © 2013 JDAL. All Rights Reserved.