com.isti.util
Interface ValueTableModel

All Known Implementing Classes:
BaseValueTableModel, DelimiterSeparatedValuesTable, ValueJTableModel

public interface ValueTableModel

A ValueTableModel is a two dimensional data structure that can store arbitrary Object instances. Individual objects can be accessed by specifying the row index and column index for the object. Each column in the model has a name associated with it.


Method Summary
 java.lang.Class getColumnClass(int columnIndex)
          Returns the Class for all Object instances in the specified column.
 int getColumnCount()
          Returns the number of columns in the model.
 int getColumnIndex(java.lang.String columnName)
          Gets the column index for the specified column name.
 java.lang.String getColumnName(int columnIndex)
          Returns the name of a column in the model.
 int getRowCount()
          Returns the number of rows in the model.
 java.lang.Object getValueAt(int rowIndex, int columnIndex)
          Returns the value (Object) at a particular cell in the table.
 void importValues(ValueTableModel vtm)
          Import the values from the value table model for all rows.
 boolean isCellEditable(int rowIndex, int columnIndex)
          Returns true if the specified cell is editable, and false if it is not.
 void setValueAt(java.lang.Object aValue, int rowIndex, int columnIndex)
          Sets the value at a particular cell in the table.
 

Method Detail

getColumnClass

public java.lang.Class getColumnClass(int columnIndex)
Returns the Class for all Object instances in the specified column.

Parameters:
columnIndex - the column index.
Returns:
The class.

getColumnCount

public int getColumnCount()
Returns the number of columns in the model.

Returns:
The column count

getColumnIndex

public int getColumnIndex(java.lang.String columnName)
Gets the column index for the specified column name.

Parameters:
columnName - the column name.
Returns:
the column index or -1 if none.

getColumnName

public java.lang.String getColumnName(int columnIndex)
Returns the name of a column in the model.

Parameters:
columnIndex - the column index.
Returns:
The column name.

getRowCount

public int getRowCount()
Returns the number of rows in the model.

Returns:
The row count.

getValueAt

public java.lang.Object getValueAt(int rowIndex,
                                   int columnIndex)
Returns the value (Object) at a particular cell in the table.

Parameters:
rowIndex - the row index.
columnIndex - the column index.
Returns:
The value at the specified cell.

importValues

public void importValues(ValueTableModel vtm)
Import the values from the value table model for all rows.

Parameters:
vtm - the value table model.

isCellEditable

public boolean isCellEditable(int rowIndex,
                              int columnIndex)
Returns true if the specified cell is editable, and false if it is not.

Parameters:
rowIndex - the row index of the cell.
columnIndex - the column index of the cell.
Returns:
true if the cell is editable, false otherwise.

setValueAt

public void setValueAt(java.lang.Object aValue,
                       int rowIndex,
                       int columnIndex)
Sets the value at a particular cell in the table.

Parameters:
aValue - the value (null permitted).
rowIndex - the row index.
columnIndex - the column index.