This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.swing.tree
interface MutableTreeNode

All Superinterfaces:
TreeNode
All Known Implementing Classes:
DefaultMutableTreeNode, JTree.DynamicUtilTreeNode

Most common way to construct:

MutableTreeNode root = new DefaultMutableTreeNode("Docs");

Based on 21 examples


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
 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

          Removes node from the receiver.
 void

          Removes the receiver from its parent.
 void

          Sets the parent of the receiver to newParent.
 void

          Resets the user object of the receiver to object.
 
Methods inherited from class javax.swing.tree.TreeNode
children, getAllowsChildren, getChildAt, getChildCount, getIndex, getParent, isLeaf
 

Method Detail

insert

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

Parameters:
child
index

remove

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

Parameters:
index

remove

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

Parameters:
node

removeFromParent

public void removeFromParent()
Removes the receiver from its parent.


setParent

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

Parameters:
newParent

setUserObject

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

Parameters:
object


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.