org.apache.myfaces.custom.tree

Interface TreeNode

public interface TreeNode

Defines the requirements for an object that can be used as a tree node for HtmlTree. (inspired by javax.swing.tree.TreeNode).

Version: $Revision: 169651 $ $Date: 2005-05-11 18:14:23 +0200 (Wed, 11 May 2005) $

Author: Oliver Rossmueller

Method Summary
Iteratorchildren()
Answer the children of the receiver.
booleangetAllowsChildren()
Answer true if this node allows children.
TreeNodegetChildAt(int childIndex)
Answer the child at the given index.
intgetChildCount()
Answer the number of children this node contains.
intgetIndex(TreeNode node)
Answer the index of the given node in this node's children.
TreeNodegetParent()
Answer the parent of this node.
ObjectgetUserObject()
booleanisLeaf()
Answer true if this is a leaf node.

Method Detail

children

public Iterator children()
Answer the children of the receiver. The base collection is unmodifyable.

getAllowsChildren

public boolean getAllowsChildren()
Answer true if this node allows children.

getChildAt

public TreeNode getChildAt(int childIndex)
Answer the child at the given index.

getChildCount

public int getChildCount()
Answer the number of children this node contains.

getIndex

public int getIndex(TreeNode node)
Answer the index of the given node in this node's children.

getParent

public TreeNode getParent()
Answer the parent of this node.

getUserObject

public Object getUserObject()

Returns: Gets the user object of this node.

isLeaf

public boolean isLeaf()
Answer true if this is a leaf node.