ui.model
Interface TreeTableModel

All Superinterfaces:
TreeModel
All Known Implementing Classes:
AbstractTreeTableModel, DatabaseModel, FileSystemModel2

public interface TreeTableModel
extends TreeModel

Model used by a JTreeTable. Adds accessors for the set of columns each tree node may have. This interface 'borrows' three methods from TableModel :

  1. getColumnClass(column)
  2. getColumnCount()
  3. getColumnName(column)
This interface differs from a true TableModel in that rows are indentified by their tree node rather than by a row number. Each tree node can return a value for each of the columns and set that value if isCellEditable() returns true. The following three methods are similar to TableModel methods except that row index is replaced by tree node.
  1. getValueAt(node, column)
  2. setValueAt(value, node, column)
  3. isCellEditable(node, column)

Author:
Philip Milne, Scott Violet

Method Summary
 Class getColumnClass(int column)
          Returns the type for column number column.
 int getColumnCount()
          Returns the number of available column.
 String getColumnName(int column)
          Returns the name for column number column.
 Object getValueAt(Object node, int column)
          Returns the value to be displayed for node node, at column number column.
 boolean isCellEditable(Object node, int column)
          Indicates whether the the value for node node, at column number column is editable.
 void setValueAt(Object aValue, Object node, int column)
          Sets the value for node node, at column number column.
 
Methods inherited from interface javax.swing.tree.TreeModel
addTreeModelListener, getChild, getChildCount, getIndexOfChild, getRoot, isLeaf, removeTreeModelListener, valueForPathChanged
 

Method Detail

getColumnClass

Class getColumnClass(int column)
Returns the type for column number column.


getColumnCount

int getColumnCount()
Returns the number of available column.


getColumnName

String getColumnName(int column)
Returns the name for column number column.


getValueAt

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


setValueAt

void setValueAt(Object aValue,
                Object node,
                int column)
Sets the value for node node, at column number column.


isCellEditable

boolean isCellEditable(Object node,
                       int column)
Indicates whether the the value for node node, at column number column is editable.