|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.table.AbstractTableModel
gov.nih.nlm.swing.TableMap
public class TableMap
In a chain of data manipulators some behaviour is common. TableMap provides most of this behavour 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)
Returns the column class from the underlying model. |
int |
getColumnCount()
Returns the column count from the underlying model. |
String |
getColumnName(int c)
Returns the column name from the underlying model. |
TableModel |
getModel()
Returns the model underlying the map. |
int |
getRowCount()
Returns the row count from the underlying model. |
Object |
getValueAt(int r,
int c)
Returns the value for the specified cell from the underlying model. |
boolean |
isCellEditable(int r,
int c)
Returns a flag from the underlying model indicating whether or not the cell is editable. |
void |
setModel(TableModel model)
Sets the model underlying the map. |
void |
setValueAt(Object value,
int r,
int c)
Sets the value for a cell in the underlying mode. |
void |
tableChanged(TableModelEvent e)
Forwards a table changed event to 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 - the TableModel
public Object getValueAt(int r,
int c)
getValueAt in interface TableModelr - A row indexc - A colum index
public void setValueAt(Object value,
int r,
int c)
setValueAt in interface TableModelsetValueAt in class AbstractTableModelvalue - An Object valuer - A row indexc - A colum indexpublic int getRowCount()
getRowCount in interface TableModelpublic int getColumnCount()
getColumnCount in interface TableModelpublic String getColumnName(int c)
getColumnName in interface TableModelgetColumnName in class AbstractTableModelc - A column index
public Class getColumnClass(int aColumn)
getColumnClass in interface TableModelgetColumnClass in class AbstractTableModelaColumn - A column index
public boolean isCellEditable(int r,
int c)
isCellEditable in interface TableModelisCellEditable in class AbstractTableModelr - A row indexc - A column index
public void tableChanged(TableModelEvent e)
tableChanged in interface TableModelListenere - a TableModelEvent
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||