public class TableMap
extends AbstractTableModel
implements TableModelListener
In a chain of data manipulators some behaviour is common. TableMap provides most of this behaviour and can be subclassed by filters that only need to override a handful of specific methods. TableMap implements TableModel by routing all requests to its model, and TableModelListener by routing all events to its listeners. Inserting a TableMap which has not been subclassed into a chain of table filters should have no effect.
| Modifiers | Name | Description |
|---|---|---|
protected TableModel |
model |
The wrapped table model. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public Class |
getColumnClass(int aColumn)Returns the delegate column class for the supplied index. |
|
public int |
getColumnCount()Returns the current column count from the wrapped model. |
|
public String |
getColumnName(int aColumn)Returns the delegate column name for the supplied index. |
|
public TableModel |
getModel()Returns the wrapped table model. |
|
public int |
getRowCount()Returns the current row count from the wrapped model. |
|
public Object |
getValueAt(int aRow, int aColumn)Returns the value from the wrapped model at the supplied coordinates. |
|
public boolean |
isCellEditable(int row, int column)Indicates whether the delegate model allows editing for the supplied cell. |
|
public void |
setModel(TableModel model)Replaces the wrapped table model and starts listening for its change events. |
|
public void |
setValueAt(Object aValue, int aRow, int aColumn)Writes a value through to the wrapped model. |
|
public void |
tableChanged(TableModelEvent e)Forwards model change notifications to this table model's listeners. |
| Methods inherited from class | Name |
|---|---|
class AbstractTableModel |
addTableModelListener, equals, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getClass, getColumnClass, getColumnCount, getColumnName, getListeners, getRowCount, getTableModelListeners, getValueAt, hashCode, isCellEditable, notify, notifyAll, removeTableModelListener, setValueAt, toString, wait, wait, wait |
The wrapped table model.
Returns the delegate column class for the supplied index.
aColumn - the source column indexReturns the current column count from the wrapped model.
0 when no model is setReturns the delegate column name for the supplied index.
aColumn - the source column indexReturns the wrapped table model.
Returns the current row count from the wrapped model.
0 when no model is setReturns the value from the wrapped model at the supplied coordinates.
aRow - the source row indexaColumn - the source column indexIndicates whether the delegate model allows editing for the supplied cell.
row - the source row indexcolumn - the source column indextrue when the delegate cell is editableReplaces the wrapped table model and starts listening for its change events.
model - the delegate modelWrites a value through to the wrapped model.
aValue - the new cell valueaRow - the source row indexaColumn - the source column indexForwards model change notifications to this table model's listeners.
e - the model change event