charvax.swing.tree
Interface MutableTreeNode

All Superinterfaces:
TreeNode
All 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.


Method Summary
 java.lang.Object getUserObject()
          Returns the user object associated with this MutableTreeNode.
 void insert(MutableTreeNode child, int index)
          Adds child to this MutableTreeNode at index.
 void remove(int index)
          Removes the child at index from this MutableTreeNode.
 void remove(MutableTreeNode node)
          Removes node from this MutableTreeNode.
 void removeFromParent()
          Removes this MutableTreeNode from its parent.
 void setParent(MutableTreeNode newParent)
          Sets the parent of this MutableTreeNode to newParent.
 void setUserObject(java.lang.Object object)
          Resets the user object of this MutableTreeNode to object.
 
Methods inherited from interface charvax.swing.tree.TreeNode
children, getAllowsChildren, getChildAt, getChildCount, getParent, isLeaf
 

Method Detail

insert

public void insert(MutableTreeNode child,
                   int index)
Adds child to this MutableTreeNode at index. The setParent() method of child will be called.


remove

public void remove(int index)
Removes the child at index from this MutableTreeNode.


remove

public void remove(MutableTreeNode node)
Removes node from this MutableTreeNode. The setParent() method of "node" will be called.


getUserObject

public java.lang.Object getUserObject()
Returns the user object associated with this MutableTreeNode. (this method is not actually in java.swing.tree.MutableTreeNode).


setUserObject

public void setUserObject(java.lang.Object object)
Resets the user object of this MutableTreeNode to object.


removeFromParent

public void removeFromParent()
Removes this MutableTreeNode from its parent.


setParent

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