|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.table.AbstractTableModel jwo.utils.gui.TableMap
public class TableMap
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.
Field Summary | |
---|---|
protected TableModel |
model
|
Fields inherited from class javax.swing.table.AbstractTableModel |
---|
listenerList |
Constructor Summary | |
---|---|
TableMap()
|
Method Summary | |
---|---|
Class |
getColumnClass(int aColumn)
Reports the class of object stored in the given column. |
int |
getColumnCount()
Reports the number of columns in the table. |
String |
getColumnName(int aColumn)
Reports the name of the given column. |
TableModel |
getModel()
Reports the table model used by the map. |
int |
getRowCount()
Reports the number of rows in the table. |
Object |
getValueAt(int aRow,
int aColumn)
Reports the table value at the given coordinates. |
boolean |
isCellEditable(int aRow,
int aColumn)
Reports whether the given cell is editable or not. |
void |
setModel(TableModel model)
Sets the table model to be used by the map. |
void |
setValueAt(Object aValue,
int aRow,
int aColumn)
Sets the table value at the given coordinates. |
void |
tableChanged(TableModelEvent e)
Used to signal that there has been a change to something in the table. |
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 |
---|
protected TableModel model
Constructor Detail |
---|
public TableMap()
Method Detail |
---|
public TableModel getModel()
public void setModel(TableModel model)
model
- Table model to be used.public Object getValueAt(int aRow, int aColumn)
getValueAt
in interface TableModel
aRow
- Row of table cell to report.aColumn
- Column of table cell to report.
public void setValueAt(Object aValue, int aRow, int aColumn)
setValueAt
in interface TableModel
setValueAt
in class AbstractTableModel
aValue
- Object to place at given table coordinates.aRow
- Row of table cell to set.aColumn
- Column of table cell to set.public int getRowCount()
getRowCount
in interface TableModel
public int getColumnCount()
getColumnCount
in interface TableModel
public String getColumnName(int aColumn)
getColumnName
in interface TableModel
getColumnName
in class AbstractTableModel
aColumn
- Column of table to report.
public Class getColumnClass(int aColumn)
getColumnClass
in interface TableModel
getColumnClass
in class AbstractTableModel
aColumn
- Column of table to report.
public boolean isCellEditable(int aRow, int aColumn)
isCellEditable
in interface TableModel
isCellEditable
in class AbstractTableModel
aRow
- Row of table cell to report.aColumn
- Column of table cell to report.
public void tableChanged(TableModelEvent e)
tableChanged
in interface TableModelListener
e
- Event encapsulating the table change.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |