org.vizzini.ui.table
Class TableMap

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by org.vizzini.ui.table.TableMap
All Implemented Interfaces:
Serializable, EventListener, TableModelListener, TableModel
Direct Known Subclasses:
TableSorter

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.

Version:
1.4 12/17/97
Author:
Philip Milne
See Also:
Serialized Form

Field Summary
protected  TableModel model
           
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
TableMap()
           
 
Method Summary
 Class getColumnClass(int aColumn)
           
 int getColumnCount()
           
 String getColumnName(int aColumn)
           
 TableModel getModel()
           
 int getRowCount()
           
 Object getValueAt(int aRow, int aColumn)
           
 boolean isCellEditable(int row, int column)
           
 void setModel(TableModel model)
           
 void setValueAt(Object aValue, int aRow, int aColumn)
           
 void tableChanged(TableModelEvent e)
           
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, 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
Constructor Detail

TableMap

public TableMap()
Method Detail

getColumnClass

public Class getColumnClass(int aColumn)
Specified by:
getColumnClass in interface TableModel
Overrides:
getColumnClass in class AbstractTableModel

getColumnCount

public int getColumnCount()
Specified by:
getColumnCount in interface TableModel

getColumnName

public String getColumnName(int aColumn)
Specified by:
getColumnName in interface TableModel
Overrides:
getColumnName in class AbstractTableModel

getModel

public TableModel getModel()

getRowCount

public int getRowCount()
Specified by:
getRowCount in interface TableModel

getValueAt

public Object getValueAt(int aRow,
                         int aColumn)
Specified by:
getValueAt in interface TableModel

isCellEditable

public boolean isCellEditable(int row,
                              int column)
Specified by:
isCellEditable in interface TableModel
Overrides:
isCellEditable in class AbstractTableModel

setModel

public void setModel(TableModel model)

setValueAt

public void setValueAt(Object aValue,
                       int aRow,
                       int aColumn)
Specified by:
setValueAt in interface TableModel
Overrides:
setValueAt in class AbstractTableModel

tableChanged

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


Copyright 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02