|
SalesPoint Framework v3.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.table.AbstractTableModel util.swing.AbstractTableModel util.swing.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 AbstractTableModel |
model
The original TableModel |
Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
Constructor Summary | |
TableMap()
Constructor |
Method Summary | |
Class |
getColumnClass(int aColumn)
Get the class of the given column in this TableModel . |
int |
getColumnCount()
Returns the number of columns. |
String |
getColumnName(int aColumn)
Returns the column's names. |
AbstractTableModel |
getModel()
Returns the TableModel. |
Object |
getRecord(int row)
Gets the record. |
int |
getRowCount()
Returns the number of rows. |
Object |
getValueAt(int aRow,
int aColumn)
Gets the value of a table cell. |
boolean |
isCellEditable(int row,
int column)
Returns if cell is editable or not. |
void |
setData(Object n_lModel)
Set the table's data. |
void |
setModel(AbstractTableModel model)
Sets the TableModel. |
void |
setValueAt(Object aValue,
int aRow,
int aColumn)
Changes the value of a table cell. |
void |
tableChanged(TableModelEvent e)
Reacts on TableChangeEvents. |
Methods inherited from class util.swing.AbstractTableModel |
getEntryDescriptor, orderByColumn, reOrderBy |
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 AbstractTableModel model
Constructor Detail |
public TableMap()
Method Detail |
public void setData(Object n_lModel)
setData
in class AbstractTableModel
n_lModel
- the new datapublic AbstractTableModel getModel()
public void setModel(AbstractTableModel model)
model
- the TableModel.public Object getValueAt(int aRow, int aColumn)
getValueAt
in interface TableModel
getValueAt
in class AbstractTableModel
aRow
- row to get the value from.aColumn
- column to get the value from.
public void setValueAt(Object aValue, int aRow, int aColumn)
setValueAt
in interface TableModel
setValueAt
in class AbstractTableModel
aValue
- the value to set.aRow
- the row of the TableCell to be changed.aColumn
- the column of the table cell to be changed.public int getRowCount()
getRowCount
in interface TableModel
public int getColumnCount()
getColumnCount
in interface TableModel
getColumnCount
in class AbstractTableModel
TableEntryDescriptor.getColumnCount()
public String getColumnName(int aColumn)
getColumnName
in interface TableModel
getColumnName
in class AbstractTableModel
aColumn
- the affected column.
TableEntryDescriptor.getColumnName(int)
public Class getColumnClass(int aColumn)
AbstractTableModel
TableModel
.
getColumnClass
in interface TableModel
getColumnClass
in class AbstractTableModel
aColumn
- the column's index. Columns indices run from 0 to
getColumnCount() - 1
.
TableEntryDescriptor.getColumnClass(int)
public boolean isCellEditable(int row, int column)
isCellEditable
in interface TableModel
isCellEditable
in class AbstractTableModel
row
- the affected table row.column
- the affected column.
public Object getRecord(int row)
getRecord
in class AbstractTableModel
row
- the affected table row.
public void tableChanged(TableModelEvent e)
tableChanged
in interface TableModelListener
e
- the event.
|
SalesPoint Framework v3.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |