swingwtx.swing.tree
Class DefaultMutableTreeNode

java.lang.Object
  extended byswingwtx.swing.tree.DefaultMutableTreeNode
All Implemented Interfaces:
MutableTreeNode, TreeNode

public class DefaultMutableTreeNode
extends java.lang.Object
implements MutableTreeNode


Field Summary
protected  boolean allowsChildren
           
protected  java.util.Vector children
           
static java.util.Enumeration EMPTY_ENUMERATION
          An empty enumeration
protected  MutableTreeNode parent
           
 org.eclipse.swt.widgets.TreeItem peer
          The SWT TreeItem peer
protected  java.lang.Object userObject
           
 
Constructor Summary
DefaultMutableTreeNode()
           
DefaultMutableTreeNode(java.lang.Object userObject)
           
DefaultMutableTreeNode(java.lang.Object userObject, boolean allowsChildren)
           
 
Method Summary
 void add(MutableTreeNode newChild)
           
 java.util.Enumeration children()
           
 boolean getAllowsChildren()
           
 TreeNode getChildAt(int index)
           
 int getChildCount()
           
 int getIndex(TreeNode aChild)
           
 TreeNode getParent()
           
 TreeNode[] getPath()
           
 TreeNode getRoot()
           
 java.lang.Object getUserObject()
           
 void insert(MutableTreeNode newChild, int childIndex)
           
 boolean isLeaf()
           
 boolean isNodeAncestor(TreeNode anotherNode)
           
 boolean isNodeDescendant(DefaultMutableTreeNode anotherNode)
           
 boolean isRoot()
           
 void remove(int childIndex)
           
 void remove(MutableTreeNode aChild)
           
 void removeAllChildren()
           
 void removeFromParent()
           
 void setAllowsChildren(boolean allows)
           
 void setParent(MutableTreeNode newParent)
           
 void setUserObject(java.lang.Object userObject)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

peer

public org.eclipse.swt.widgets.TreeItem peer
The SWT TreeItem peer


EMPTY_ENUMERATION

public static final java.util.Enumeration EMPTY_ENUMERATION
An empty enumeration


parent

protected MutableTreeNode parent

allowsChildren

protected boolean allowsChildren

children

protected java.util.Vector children

userObject

protected java.lang.Object userObject
Constructor Detail

DefaultMutableTreeNode

public DefaultMutableTreeNode()

DefaultMutableTreeNode

public DefaultMutableTreeNode(java.lang.Object userObject)

DefaultMutableTreeNode

public DefaultMutableTreeNode(java.lang.Object userObject,
                              boolean allowsChildren)
Method Detail

insert

public void insert(MutableTreeNode newChild,
                   int childIndex)
Specified by:
insert in interface MutableTreeNode

remove

public void remove(int childIndex)
Specified by:
remove in interface MutableTreeNode

add

public void add(MutableTreeNode newChild)

setParent

public void setParent(MutableTreeNode newParent)
Specified by:
setParent in interface MutableTreeNode

getParent

public TreeNode getParent()
Specified by:
getParent in interface TreeNode

removeFromParent

public void removeFromParent()
Specified by:
removeFromParent in interface MutableTreeNode

getChildAt

public TreeNode getChildAt(int index)
Specified by:
getChildAt in interface TreeNode

getChildCount

public int getChildCount()
Specified by:
getChildCount in interface TreeNode

getIndex

public int getIndex(TreeNode aChild)
Specified by:
getIndex in interface TreeNode

children

public java.util.Enumeration children()
Specified by:
children in interface TreeNode

getAllowsChildren

public boolean getAllowsChildren()
Specified by:
getAllowsChildren in interface TreeNode

setAllowsChildren

public void setAllowsChildren(boolean allows)

getUserObject

public java.lang.Object getUserObject()

setUserObject

public void setUserObject(java.lang.Object userObject)
Specified by:
setUserObject in interface MutableTreeNode

remove

public void remove(MutableTreeNode aChild)
Specified by:
remove in interface MutableTreeNode

removeAllChildren

public void removeAllChildren()

isLeaf

public boolean isLeaf()
Specified by:
isLeaf in interface TreeNode

getPath

public TreeNode[] getPath()

isNodeAncestor

public boolean isNodeAncestor(TreeNode anotherNode)

isNodeDescendant

public boolean isNodeDescendant(DefaultMutableTreeNode anotherNode)

getRoot

public TreeNode getRoot()

isRoot

public boolean isRoot()

toString

public java.lang.String toString()