org.xnap.gui.table
Class DefaultTreeTableNode

java.lang.Object
  extended by org.xnap.gui.table.DefaultTreeTableNode
All Implemented Interfaces:
TreeTableNode
Direct Known Subclasses:
OpenNapNetworkNode, PircBotNetworkNode, TransferContainerTreeTableNode

public class DefaultTreeTableNode
extends java.lang.Object
implements TreeTableNode

This class is a default implementation of a TreeTableNode with children.


Constructor Summary
DefaultTreeTableNode(DefaultColumnTreeTableModel model, java.lang.Object data)
           
 
Method Summary
 void add(TreeTableNode node)
           
 void changed()
           
 void changedChildAt(int index)
           
 java.util.Iterator children()
          Returns an Iterator over all child nodes.
 java.lang.Object getChildAt(int index)
          Returns the child node at index.
 int getChildCount()
          Returns the number of children of the node.
 java.lang.Object getData()
          Returns the data object that is held by this node.
 int getIndexOfChildByData(java.lang.Object data)
          Returns the child that stores data.
 DefaultColumnTreeTableModel getModel()
           
 void removeChildAt(int index)
           
 void sort(java.util.Comparator c)
          Sort all children.
 java.lang.String toString()
          Returns the data.toString().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultTreeTableNode

public DefaultTreeTableNode(DefaultColumnTreeTableModel model,
                            java.lang.Object data)
Method Detail

add

public void add(TreeTableNode node)

changed

public void changed()

changedChildAt

public void changedChildAt(int index)

children

public java.util.Iterator children()
Returns an Iterator over all child nodes.


getIndexOfChildByData

public int getIndexOfChildByData(java.lang.Object data)
Returns the child that stores data.

Returns:
-1, if data could not be found

getChildAt

public java.lang.Object getChildAt(int index)
Returns the child node at index.

Specified by:
getChildAt in interface TreeTableNode

getChildCount

public int getChildCount()
Returns the number of children of the node.

Specified by:
getChildCount in interface TreeTableNode

getData

public java.lang.Object getData()
Description copied from interface: TreeTableNode
Returns the data object that is held by this node.

Specified by:
getData in interface TreeTableNode

getModel

public DefaultColumnTreeTableModel getModel()

removeChildAt

public void removeChildAt(int index)

sort

public void sort(java.util.Comparator c)
Description copied from interface: TreeTableNode
Sort all children.

Specified by:
sort in interface TreeTableNode

toString

public java.lang.String toString()
Returns the data.toString().

Overrides:
toString in class java.lang.Object


Copyright © 2001-2005 XNap Team. All Rights Reserved.