org.apache.myfaces.custom.tree
Interface TreeNode

All Known Subinterfaces:
MutableTreeNode
All Known Implementing Classes:
DefaultMutableTreeNode

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: 472638 $ $Date: 2006-11-08 15:54:13 -0500 (Wed, 08 Nov 2006) $
Author:
Oliver Rossmueller

Method Summary
 Iterator children()
          Answer the children of the receiver.
 boolean getAllowsChildren()
          Answer true if this node allows children.
 TreeNode getChildAt(int childIndex)
          Answer the child at the given index.
 int getChildCount()
          Answer the number of children this node contains.
 int getIndex(TreeNode node)
          Answer the index of the given node in this node's children.
 TreeNode getParent()
          Answer the parent of this node.
 Object getUserObject()
           
 boolean isLeaf()
          Answer true if this is a leaf node.
 

Method Detail

getUserObject

Object getUserObject()
Returns:
Gets the user object of this node.

getChildAt

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


getChildCount

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


getParent

TreeNode getParent()
Answer the parent of this node.


getIndex

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


getAllowsChildren

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


isLeaf

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


children

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



Copyright © 2012 The Apache Software Foundation. All Rights Reserved.