Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

treetable::TAbstractTreeTableModel Class Reference

List of all members.

Public Methods

 TAbstractTreeTableModel (Object tROOT_NODE)
void addTreeModelListener (TreeModelListener tTREE_MODEL_LISTENER)
void removeTreeModelListener (TreeModelListener tTREE_MODEL_LISTENER)
void setValueAt (Object tVALUE, Object tNODE, int iCOLUMN)
void valueForPathChanged (TreePath tTREE_PATH, Object newValue)
Class getColumnClass (int iCOLUMN)
int getIndexOfChild (Object tPARENT_NODE, Object tCHILD_NODE)
Object getRoot ()
boolean isCellEditable (Object tNODE, int iCOLUMN)
boolean isLeaf (Object tNODE)

Protected Methods

void fireTreeNodesChanged (TreePath tTREE_PATH)
void fireTreeNodesChanged (Object tSOURCE, Object[] atPATH, int[] aiCHILD_INDICES, Object[] atCHILDREN)
void fireTreeNodesInserted (Object tSOURCE, Object[] atPATH, int[] aiCHILD_INDICES, Object[] atCHILDREN)
void fireTreeStructureChanged (TreePath tTREE_PATH)
void fireTreeStructureChanged (Object tSOURCE, Object[] atPATH, int[] aiCHILD_INDICES, Object[] atCHILDREN)

Protected Attributes

EventListenerList tEventListenerList
 The listener list.

Object tRootNode
 The root node.


Detailed Description

An abstract implementation of the ITreeTableModel interface, handling the list of listeners. The next methods are left to be implemented in the subclass:

public Object getChild (Object tPARENT_NODE, int iINDEX); public int getChildCount (Object tPARENT_NODE); public int getColumnCount(); public String getColumnName (Object tNODE, int iCOLUMN); public Object getValueAt (Object tNODE, int iCOLUMN);

Definition at line 84 of file TAbstractTreeTableModel.java.


Constructor & Destructor Documentation

treetable::TAbstractTreeTableModel::TAbstractTreeTableModel Object    tROOT_NODE [inline]
 

Builds a new instance.

Parameters:
tROOT_NODE  The tree root node.

Definition at line 102 of file TAbstractTreeTableModel.java.

References treetable::TAbstractTreeTableModel::tEventListenerList, and treetable::TAbstractTreeTableModel::tRootNode.


Member Function Documentation

void treetable::TAbstractTreeTableModel::addTreeModelListener TreeModelListener    tTREE_MODEL_LISTENER [inline]
 

Adds a listener for the TreeModelEvent posted after the tree changes.

Parameters:
tTREE_MODEL_LISTENER  The listener to add.
See also:
javax.swing.event.TreeModelListeneraddTreeModelListener()

Definition at line 113 of file TAbstractTreeTableModel.java.

References treetable::TAbstractTreeTableModel::tEventListenerList.

void treetable::TAbstractTreeTableModel::fireTreeNodesChanged Object    tSOURCE,
Object    atPATH[],
int    aiCHILD_INDICES[],
Object    atCHILDREN[]
[inline, protected]
 

Notifies all listeners that have registered interest for notification on this event type.

Parameters:
tSOURCE  The object responsible for generating the event (typically the creator of the event object passes this for its value).
atPATH  An array of Object identifying the path to the parent of the modified item(s), where the first element of the array is the object stored at the root node and the last element is the object stored at the parent node.
aiCHILD_INDICES  An array of int that specifies the index values of the removed items. The indices must be in sorted order, from lowest to highest.
atCHILDREN  An array of Object containing the inserted, removed, or changed objects.

Definition at line 201 of file TAbstractTreeTableModel.java.

References treetable::TAbstractTreeTableModel::tEventListenerList.

void treetable::TAbstractTreeTableModel::fireTreeNodesChanged TreePath    tTREE_PATH [inline, protected]
 

Notifies all listeners that have registered interest for notification on this event type.

Parameters:
tTREE_PATH  Tree path.

Definition at line 157 of file TAbstractTreeTableModel.java.

References treetable::TAbstractTreeTableModel::tEventListenerList.

void treetable::TAbstractTreeTableModel::fireTreeNodesInserted Object    tSOURCE,
Object    atPATH[],
int    aiCHILD_INDICES[],
Object    atCHILDREN[]
[inline, protected]
 

Notifies all listeners that have registered interest for notification on this event type.

Parameters:
tSOURCE  The object responsible for generating the event (typically the creator of the event object passes this for its value).
atPATH  An array of Object identifying the path to the parent of the modified item(s), where the first element of the array is the object stored at the root node and the last element is the object stored at the parent node.
aiCHILD_INDICES  An array of int that specifies the index values of the removed items. The indices must be in sorted order, from lowest to highest.
atCHILDREN  An array of Object containing the inserted, removed, or changed objects.

Definition at line 248 of file TAbstractTreeTableModel.java.

References treetable::TAbstractTreeTableModel::tEventListenerList.

void treetable::TAbstractTreeTableModel::fireTreeStructureChanged Object    tSOURCE,
Object    atPATH[],
int    aiCHILD_INDICES[],
Object    atCHILDREN[]
[inline, protected]
 

Notifies all listeners that have registered interest for notification on this event type.

Parameters:
tSOURCE  The object responsible for generating the event (typically the creator of the event object passes this for its value).
atPATH  An array of Object identifying the path to the parent of the modified item(s), where the first element of the array is the object stored at the root node and the last element is the object stored at the parent node.
aiCHILD_INDICES  An array of int that specifies the index values of the removed items. The indices must be in sorted order, from lowest to highest.
atCHILDREN  An array of Object containing the inserted, removed, or changed objects.

Definition at line 373 of file TAbstractTreeTableModel.java.

References treetable::TAbstractTreeTableModel::tEventListenerList.

void treetable::TAbstractTreeTableModel::fireTreeStructureChanged TreePath    tTREE_PATH [inline, protected]
 

Notifies all listeners that have registered interest for notification on this event type.

Parameters:
tTREE_PATH  Tree path.

Definition at line 329 of file TAbstractTreeTableModel.java.

References treetable::TAbstractTreeTableModel::tEventListenerList.

Class treetable::TAbstractTreeTableModel::getColumnClass int    iCOLUMN [inline]
 

Returns the most specific superclass for all the cell values in the column. This is used by the JTable to set up a default renderer and editor for the column.

Parameters:
iCOLUMN  The index of the column.
Returns:
The common ancestor class of the object values in the model.
See also:
ITreeTableModel::getColumnClass()

Definition at line 415 of file TAbstractTreeTableModel.java.

Referenced by treetable::TAbstractTreeTableModel::isCellEditable().

int treetable::TAbstractTreeTableModel::getIndexOfChild Object    tPARENT_NODE,
Object    tCHILD_NODE
[inline]
 

Returns the index of child in parent. If tPARENT_NODE is null or tCHILD is null, it returns -1.

Parameters:
tPARENT_NODE  A node in the tree, obtained from this data source.
tCHILD_NODE  The node we are interested in.
Returns:
The index of the CHILD_NODE in the parent, or -1 if either tCHILD_NODE or tPARENT_NODE are null.

Definition at line 428 of file TAbstractTreeTableModel.java.

Object treetable::TAbstractTreeTableModel::getRoot void    [inline]
 

Returns the root of the tree. Returns null only if the tree has no nodes.

Returns:
The root of the tree.
See also:
javax.swing.tree.TreeModelgetRoot()

Definition at line 448 of file TAbstractTreeTableModel.java.

References treetable::TAbstractTreeTableModel::tRootNode.

boolean treetable::TAbstractTreeTableModel::isCellEditable Object    tNODE,
int    iCOLUMN
[inline]
 

Indicates whether the value for node tNODE, at column number iCOLUMN is editable. By default, it makes the column with the tree in it the only editable one. Making this column editable causes the JTable to forward mouse and keyboard events in the tree column to the underlying JTree.

Parameters:
tNODE  The tree node.
iCOLUMN  The index of the column.
Returns:
True if the node is editable
See also:
ITreeTableModel::isCellEditable()

Definition at line 463 of file TAbstractTreeTableModel.java.

References treetable::TAbstractTreeTableModel::getColumnClass().

boolean treetable::TAbstractTreeTableModel::isLeaf Object    tNODE [inline]
 

Returns true if node is a leaf. It is possible for this method to return false even if node has no children. A directory in a filesystem, for example, may contain no files; the node representing the directory is not a leaf, but it also has no children.

Parameters:
tNODE  A node in the tree, obtained from this data source.
Returns:
True if node is a leaf.
See also:
javax.swing.tree.TreeModelisLeaf()

Definition at line 477 of file TAbstractTreeTableModel.java.

void treetable::TAbstractTreeTableModel::removeTreeModelListener TreeModelListener    tTREE_MODEL_LISTENER [inline]
 

Removes a listener previously added with addTreeModelListener().

Parameters:
tTREE_MODEL_LISTENER  The listener to remove.
See also:
javax.swing.event.TreeModelListenerremoveTreeModelListener()

Definition at line 123 of file TAbstractTreeTableModel.java.

References treetable::TAbstractTreeTableModel::tEventListenerList.

void treetable::TAbstractTreeTableModel::setValueAt Object    tVALUE,
Object    tNODE,
int    iCOLUMN
[inline]
 

Sets the value for node tNODE, at column number iCOLUMN.

Parameters:
tVALUE  The new value.
tNODE  The tree node.
iCOLUMN  The index of the column.
See also:
ITreeTableModel::setValueAt()

Definition at line 135 of file TAbstractTreeTableModel.java.

void treetable::TAbstractTreeTableModel::valueForPathChanged TreePath    tTREE_PATH,
Object    newValue
[inline]
 

Messaged when the user has altered the value for the item identified by tTREE_PATH to tNEW_VALUE. If tNEW_VALUE signifies a truly new value, the model should post a treeNodesChanged event.

Parameters:
tTREE_PATH  The path to the node that the user has altered.
tNEW_VALUE  The new value from the TreeCellEditor.
See also:
javax.swing.tree.TreeModelvalueForPathChanged()

Definition at line 145 of file TAbstractTreeTableModel.java.


The documentation for this class was generated from the following file:
Generated on Mon Oct 13 02:35:27 2003 for MPCL by doxygen1.2.18