EchoPoint API - 3.0.0b5
App Webcontainer

echopoint.tree
Interface MutableTreeNode<M>

Type Parameters:
M - The user object backing the node.
All Superinterfaces:
Serializable, TreeNode
All Known Implementing Classes:
DefaultMutableTreeNode

public interface MutableTreeNode<M>
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.

Since:
3.0.0b3
Version:
$Id: MutableTreeNode.java 213 2009-06-03 16:34:13Z sptrakesh $
Author:
Brad Baker, Rakesh Vidyadharan 2009-05-29

Method Summary
 void insert(MutableTreeNode child, int index)
          Adds child to the receiver at index.
 void remove(int index)
          Removes the child at index from the receiver.
 void remove(MutableTreeNode node)
          Removes node from the receiver.
 void removeFromParent()
          Removes the receiver from its parent.
 void setParent(MutableTreeNode newParent)
          Sets the parent of the receiver to newParent.
 void setUserObject(M object)
          Resets the user object of the receiver to object.
 
Methods inherited from interface echopoint.tree.TreeNode
children, getActionCommand, getAllowsChildren, getChildAt, getChildCount, getIndex, getParent, isLeaf
 

Method Detail

insert

void insert(MutableTreeNode child,
            int index)
Adds child to the receiver at index. child will be messaged with setParent(echopoint.tree.MutableTreeNode).

Parameters:
child - The child to add.
index - The index at which to add the child.

remove

void remove(int index)
Removes the child at index from the receiver. setParent(echopoint.tree.MutableTreeNode) will be messaged on the node being removed.

Parameters:
index - The index of the child to remove.

remove

void remove(MutableTreeNode node)
Removes node from the receiver. setParent(echopoint.tree.MutableTreeNode) will be messaged on node.

Parameters:
node - The node to remove.

removeFromParent

void removeFromParent()
Removes the receiver from its parent.


setParent

void setParent(MutableTreeNode newParent)
Sets the parent of the receiver to newParent.

Parameters:
newParent - The new parent for the node.

setUserObject

void setUserObject(M object)
Resets the user object of the receiver to object.

Parameters:
object - The user object of the receiver

EchoPoint API - 3.0.0b5
App Webcontainer