org.rapla.gui.toolkit
Class RecursiveNode

java.lang.Object
  extended by org.rapla.gui.toolkit.RecursiveNode
All Implemented Interfaces:
TreeNode

public abstract class RecursiveNode
extends Object
implements TreeNode

Node object that is used to show recursive structures like the categories


Field Summary
protected  TreeNode parent
           
protected  Object userObject
           
 
Constructor Summary
RecursiveNode(TreeNode parent, Object userObject)
           
 
Method Summary
 Enumeration children()
           
 int countParents()
           
protected abstract  RecursiveNode createChildNode(Object userObject)
           
 boolean equals(Object obj)
           
 RecursiveNode findNodeFor(Object obj)
           
 boolean getAllowsChildren()
           
 TreeNode getChildAt(int index)
           
 int getChildCount()
           
 TreeNode[] getChildNodes()
           
protected abstract  Object[] getChildObjects()
           
 int getIndex(TreeNode treeNode)
           
 int getIndexOfUserObject(Object object)
           
 TreeNode getParent()
           
 TreeNode[] getPath()
           
 TreePath getTreePath()
           
 Object getUserObject()
           
 boolean isLeaf()
           
static void selectUserObjects(JTree tree, Object[] userObjects)
          Selects a row in a tree wich TreeNodePath corresponds to the given path of userObjects.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

userObject

protected Object userObject

parent

protected TreeNode parent
Constructor Detail

RecursiveNode

public RecursiveNode(TreeNode parent,
                     Object userObject)
Method Detail

getChildObjects

protected abstract Object[] getChildObjects()

createChildNode

protected abstract RecursiveNode createChildNode(Object userObject)

getIndexOfUserObject

public int getIndexOfUserObject(Object object)

getUserObject

public Object getUserObject()

getParent

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

countParents

public int countParents()

isLeaf

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

getChildCount

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

getAllowsChildren

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

children

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

selectUserObjects

public static void selectUserObjects(JTree tree,
                                     Object[] userObjects)
Selects a row in a tree wich TreeNodePath corresponds to the given path of userObjects.


getPath

public TreeNode[] getPath()

getTreePath

public TreePath getTreePath()

getIndex

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

getChildAt

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

findNodeFor

public RecursiveNode findNodeFor(Object obj)

getChildNodes

public TreeNode[] getChildNodes()

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright 2000-2006 Rapla Team. All Rights Reseserved.