org.apache.myfaces.custom.tree

Interface MutableTreeNode

All Superinterfaces:
TreeNode
Known Implementing Classes:
DefaultMutableTreeNode

public interface MutableTreeNode
extends TreeNode

Defines the requirements for a tree node object that can change -- by adding or removing child nodes, or by changing the contents of a user object stored in the node. (inspired by javax.swing.tree.MutableTreeNode).
Version:
$Revision: 169651 $ $Date: 2005-05-11 18:14:23 +0200 (Wed, 11 May 2005) $
Author:
Oliver Rossmueller

Method Summary

void
insert(MutableTreeNode child)
Add the given child to the children of this node.
void
insert(MutableTreeNode child, int index)
Add the given child to the children of this node at index.
void
remove(int index)
Remove the child at the given index.
void
remove(MutableTreeNode node)
Remove the given node.
void
removeFromParent()
Remove this node from its parent.
void
setParent(MutableTreeNode parent)
Set the parent node.
void
setUserObject(Object object)
Sets the user object of this node.

Methods inherited from interface org.apache.myfaces.custom.tree.TreeNode

children, getAllowsChildren, getChildAt, getChildCount, getIndex, getParent, getUserObject, isLeaf

Method Details

insert

public void insert(MutableTreeNode child)
Add the given child to the children of this node. This will set this node as the parent of the child using {#setParent}.

insert

public void insert(MutableTreeNode child,
                   int index)
Add the given child to the children of this node at index. This will set this node as the parent of the child using {#setParent}.

remove

public void remove(int index)
Remove the child at the given index.

remove

public void remove(MutableTreeNode node)
Remove the given node.

removeFromParent

public void removeFromParent()
Remove this node from its parent.

setParent

public void setParent(MutableTreeNode parent)
Set the parent node.

setUserObject

public void setUserObject(Object object)
Sets the user object of this node.