NextApp Echo3 Extras
v3.0.b8

nextapp.echo.extras.app.tree
Interface TreeModel

All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractTreeModel

public interface TreeModel
extends Serializable

Model for representing tree data.


Method Summary
 void addTreeModelListener(TreeModelListener l)
          Adds a TreeModelListener to receive notification of events.
 Object getChild(Object parent, int index)
          Returns the child of the specified parent node at the specified index.
 int getChildCount(Object parent)
          Returns the number of child nodes in the specified parent.
 Class getColumnClass(int index)
          Returns the type for the specified column index.
 int getColumnCount()
          Returns the number of available columns.
 String getColumnName(int index)
          Returns the name for the specified column index.
 int getIndexOfChild(Object parent, Object child)
          Returns the index of the child within the parent.
 Object getRoot()
          Returns the root node of the tree.
 Object getValueAt(Object node, int columnIndex)
          Returns the value to be displayed for node node, at column number columnIndex.
 boolean isLeaf(Object object)
          Determines whether the specified node is a leaf.
 void removeTreeModelListener(TreeModelListener l)
          Removes a TreeModelListener from receiving notification of events.
 

Method Detail

addTreeModelListener

void addTreeModelListener(TreeModelListener l)
Adds a TreeModelListener to receive notification of events.

Parameters:
l - the listener to remove

getChild

Object getChild(Object parent,
                int index)
Returns the child of the specified parent node at the specified index.

Parameters:
parent - the parent node
index - the child index
Returns:
the child node

getChildCount

int getChildCount(Object parent)
Returns the number of child nodes in the specified parent.

Parameters:
parent - the parent node
Returns:
the number of child nodes

getColumnClass

Class getColumnClass(int index)
Returns the type for the specified column index.

Parameters:
index - the column index
Returns:
the column class

getColumnCount

int getColumnCount()
Returns the number of available columns.

Returns:
the column count

getColumnName

String getColumnName(int index)
Returns the name for the specified column index.

Parameters:
index - the column index
Returns:
the name

getIndexOfChild

int getIndexOfChild(Object parent,
                    Object child)
Returns the index of the child within the parent.

Parameters:
parent - the parent node
child - the child node

getRoot

Object getRoot()
Returns the root node of the tree.

Returns:
the root node object

getValueAt

Object getValueAt(Object node,
                  int columnIndex)
Returns the value to be displayed for node node, at column number columnIndex.

Parameters:
columnIndex - the column index
Returns:
the column value

isLeaf

boolean isLeaf(Object object)
Determines whether the specified node is a leaf. A leaf may not have children, but a node without children is not required to be a leaf.

Parameters:
object - the node object
Returns:
true if the node object is a leaf

removeTreeModelListener

void removeTreeModelListener(TreeModelListener l)
Removes a TreeModelListener from receiving notification of events.

Parameters:
l - the listener to remove

NextApp Echo3 Extras
v3.0.b8