Packageorg.aswing.tree
Interfacepublic interface MutableTreeNode extends TreeNode
ImplementorsDefaultMutableTreeNode

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 also

org.aswing.tree.DefaultMutableTreeNode
org.aswing.JTree


Public Methods
 MethodDefined by
 Inherited
children():Array
Returns the children of the receiver as an Enumeration.
TreeNode
 Inherited
Returns true if the receiver allows children.
TreeNode
 Inherited
getChildAt(childIndex:int):TreeNode
Returns the child TreeNode at index childIndex.
TreeNode
 Inherited
Returns the number of children TreeNodes the receiver contains.
TreeNode
 Inherited
getIndex(node:TreeNode):int
Returns the index of node in the receivers children.
TreeNode
 Inherited
Returns the parent TreeNode of the receiver.
TreeNode
  
Returns the user object.
MutableTreeNode
  
insert(child:MutableTreeNode, index:int):void
Adds child to the receiver at index.
MutableTreeNode
 Inherited
isLeaf():Boolean
Returns true if the receiver is a leaf.
TreeNode
  
Removes node from the receiver.
MutableTreeNode
  
removeAt(index:int):void
Removes the child at index from the receiver.
MutableTreeNode
  
Removes the receiver from its parent.
MutableTreeNode
  
setParent(newParent:MutableTreeNode):void
Sets the parent of the receiver to newParent.
MutableTreeNode
  
setUserObject(object:*):void
Resets the user object of the receiver to object.
MutableTreeNode
Method detail
getUserObject()method
public function getUserObject():*

Returns the user object.

Returns
*
insert()method 
public function insert(child:MutableTreeNode, index:int):void

Adds child to the receiver at index. child will be messaged with setParent.

Parameters
child:MutableTreeNode
 
index:int
remove()method 
public function remove(node:MutableTreeNode):void

Removes node from the receiver. setParent will be messaged on node.

Parameters
node:MutableTreeNode
removeAt()method 
public function removeAt(index:int):void

Removes the child at index from the receiver.

Parameters
index:int
removeFromParent()method 
public function removeFromParent():void

Removes the receiver from its parent.

setParent()method 
public function setParent(newParent:MutableTreeNode):void

Sets the parent of the receiver to newParent.

Parameters
newParent:MutableTreeNode
setUserObject()method 
public function setUserObject(object:*):void

Resets the user object of the receiver to object.

Parameters
object:*