kiwi.ui.model
Class TableMap

java.lang.Object
  |
  +--javax.swing.table.AbstractTableModel
        |
        +--kiwi.ui.model.TableMap
Direct Known Subclasses:
TableSorter

public class TableMap
extends AbstractTableModel
implements TableModelListener

A mapping object for TableModels. In a chain of data manipulators some behavior is common. TableMap provides most of this behavior and can be subclassed by filters that only need to override a handful of specific methods. TableMap implements javax.swing.table.TableModel by routing all requests to its model, and javax.swing.event.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.

Version:
1.4 (12/97)
Author:
Philip Milne
See Also:
TableModel, TableSorter, Serialized Form

Field Summary
protected  TableModel model
          The TableModel that this map wraps.
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
TableMap()
          Construct a new TableMap.
 
Method Summary
 Class getColumnClass(int col)
           
 int getColumnCount()
           
 String getColumnName(int col)
           
 TableModel getModel()
          Get the TableModel used by this map.
 int getRowCount()
           
 Object getValueAt(int row, int col)
           
 boolean isCellEditable(int row, int col)
           
 void setModel(TableModel model)
          Set the TableModel to use with this map.
 void setValueAt(Object value, int row, int col)
           
 void tableChanged(TableModelEvent e)
           
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

model

protected TableModel model
The TableModel that this map wraps.
Constructor Detail

TableMap

public TableMap()
Construct a new TableMap.
Method Detail

getModel

public TableModel getModel()
Get the TableModel used by this map.

setModel

public void setModel(TableModel model)
Set the TableModel to use with this map.
Parameters:
model - The TableModel to use.

getValueAt

public Object getValueAt(int row,
                         int col)
Overrides:
getValueAt in class AbstractTableModel

setValueAt

public void setValueAt(Object value,
                       int row,
                       int col)
Overrides:
setValueAt in class AbstractTableModel

getRowCount

public int getRowCount()
Overrides:
getRowCount in class AbstractTableModel

getColumnCount

public int getColumnCount()
Overrides:
getColumnCount in class AbstractTableModel

getColumnName

public String getColumnName(int col)
Overrides:
getColumnName in class AbstractTableModel

getColumnClass

public Class getColumnClass(int col)
Overrides:
getColumnClass in class AbstractTableModel

isCellEditable

public boolean isCellEditable(int row,
                              int col)
Overrides:
isCellEditable in class AbstractTableModel

tableChanged

public void tableChanged(TableModelEvent e)
Specified by:
tableChanged in interface TableModelListener