/*
* Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package javax.swing.tree;
/**
* 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.
*
* @see DefaultMutableTreeNode
* @see javax.swing.JTree
*
* @author Rob Davis
* @author Scott Violet
*/
public interface MutableTreeNode extends TreeNode
{
/**
* Adds child
to the receiver at index
.
* child
will be messaged with setParent
.
*/
void insert(MutableTreeNode child, int index);
/**
* Removes the child at index
from the receiver.
*/
void remove(int index);
/**
* Removes node
from the receiver. setParent
* will be messaged on node
.
*/
void remove(MutableTreeNode node);
/**
* Resets the user object of the receiver to object
.
*/
void setUserObject(Object object);
/**
* Removes the receiver from its parent.
*/
void removeFromParent();
/**
* Sets the parent of the receiver to newParent
.
*/
void setParent(MutableTreeNode newParent);
}