dsto.dfc.swing.tree
Class DefaultDfcTreeModel.Node

java.lang.Object
  extended by dsto.dfc.swing.tree.DefaultDfcTreeModel.Node
All Implemented Interfaces:
Serializable
Enclosing class:
DefaultDfcTreeModel

public static final class DefaultDfcTreeModel.Node
extends Object
implements Serializable

A node in the tree. Can be used (via getRootNode () and getNodeForEntry ()) as a slightly faster way to scan through the tree than the TreeModel interface.

See Also:
Serialized Form

Constructor Summary
protected DefaultDfcTreeModel.Node()
          Create a root node.
protected DefaultDfcTreeModel.Node(Object entry)
          Create a node with associated view entry.
 
Method Summary
protected  int add(DefaultDfcTreeModel.Node child)
           
protected  void add(DefaultDfcTreeModel.Node child, int index)
          Add a child node at its appropriate position in the child list.
 DefaultDfcTreeModel.Node getChild(int index)
           
 DefaultDfcTreeModel.Node getChild(Object childEntry)
          Get the first child with matching entry, or null if no such child exists.
 int getChildCount()
           
 Object getEntry()
          The entry associated with this node.
 int getIndex()
          The index of this node in parent.
 int getIndexOfChild(DefaultDfcTreeModel.Node child)
           
 int getIndexOfEntry(Object childEntry)
          Get index of child node with matching entry, or -1 if none found.
 DefaultDfcTreeModel.Node getParent()
           
protected  boolean remove(DefaultDfcTreeModel.Node child)
           
protected  DefaultDfcTreeModel.Node remove(int index)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDfcTreeModel.Node

protected DefaultDfcTreeModel.Node()
Create a root node.


DefaultDfcTreeModel.Node

protected DefaultDfcTreeModel.Node(Object entry)
Create a node with associated view entry.

Method Detail

getParent

public DefaultDfcTreeModel.Node getParent()

getIndex

public int getIndex()
The index of this node in parent.


getEntry

public Object getEntry()
The entry associated with this node.


add

protected void add(DefaultDfcTreeModel.Node child,
                   int index)
Add a child node at its appropriate position in the child list.


add

protected int add(DefaultDfcTreeModel.Node child)

remove

protected boolean remove(DefaultDfcTreeModel.Node child)

remove

protected DefaultDfcTreeModel.Node remove(int index)

getChild

public DefaultDfcTreeModel.Node getChild(Object childEntry)
Get the first child with matching entry, or null if no such child exists.


getChild

public DefaultDfcTreeModel.Node getChild(int index)

getChildCount

public int getChildCount()

getIndexOfChild

public int getIndexOfChild(DefaultDfcTreeModel.Node child)

getIndexOfEntry

public int getIndexOfEntry(Object childEntry)
Get index of child node with matching entry, or -1 if none found.



Copyright © 2008 Commonwealth of Australia