T - the model's typepublic class FormTableMap<T> extends AbstractFormTableModel<T> implements TableModelListener
| Modifier and Type | Field and Description |
|---|---|
protected AbstractFormTableModel<T> |
model
chained table model
|
listenerList| Constructor and Description |
|---|
FormTableMap(AbstractFormTableModel<T> model)
Creates a form table map on top of a given table model.
|
| Modifier and Type | Method and Description |
|---|---|
Class<?> |
getColumnClass(int col) |
int |
getColumnCount() |
String |
getColumnName(int column) |
String |
getDisplayedColumnName(int column)
Gets the displayed column name.
|
FormTableEntry<T> |
getEntryAt(int rowIndex)
Gets the form table entry at given row.
|
int |
getMappedIndex(int mappedRow)
Gets the mapped row index according to a given model row.
Inversion of getModelIndex(). |
int[] |
getMappedIndex(int[] mappedRows)
Gets the mapped row indexes according to given model rows.
Inversion of getModelIndex(). |
AbstractFormTableModel<T> |
getModel()
Gets the table model this table mapper maps.
|
int |
getModelIndex(int row)
Gets the row in the original model according to the
mapping.
The default implementation returns the same row. |
int[] |
getModelIndex(int[] rows)
Gets the rows in the original model according to the
mapping.
The default implementation returns the same rows. |
int |
getRowCount() |
FormTableEntry<T> |
getTemplate()
Gets the table entry template from the model.
|
Object |
getValueAt(int rowIndex,
int columnIndex) |
boolean |
isCellEditable(int rowIndex,
int columnIndex) |
boolean |
isDataChanged()
Returns whether data has changed.
|
void |
setDataChanged(boolean dataChanged)
Sets a flag that model data has changed.
|
void |
setModel(AbstractFormTableModel<T> model)
Sets the table model.
|
void |
setValueAt(Object aValue,
int rowIndex,
int columnIndex) |
void |
tableChanged(TableModelEvent e) |
getMap, getTable, setEntryAt, setMap, setTableaddTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListenerprotected AbstractFormTableModel<T> model
public FormTableMap(AbstractFormTableModel<T> model)
model - the chained table modelpublic AbstractFormTableModel<T> getModel()
public void setModel(AbstractFormTableModel<T> model)
model - the table modelpublic FormTableEntry<T> getTemplate()
AbstractFormTableModelgetTemplate in class AbstractFormTableModel<T>public Object getValueAt(int rowIndex, int columnIndex)
This method must be overridden for another mapping than 1:1.
getValueAt in interface TableModelpublic void setValueAt(Object aValue, int rowIndex, int columnIndex)
This method must be overridden for another mapping than 1:1.
setValueAt in interface TableModelsetValueAt in class AbstractTableModelpublic FormTableEntry<T> getEntryAt(int rowIndex)
AbstractFormTableModelgetEntryAt in class AbstractFormTableModel<T>rowIndex - the row of the table entrypublic int getRowCount()
getRowCount in interface TableModelpublic int getColumnCount()
getColumnCount in interface TableModelpublic String getColumnName(int column)
getColumnName in interface TableModelgetColumnName in class AbstractTableModelpublic String getDisplayedColumnName(int column)
AbstractFormTableModelgetDisplayedColumnName in class AbstractFormTableModel<T>column - column indexpublic Class<?> getColumnClass(int col)
getColumnClass in interface TableModelgetColumnClass in class AbstractTableModelpublic boolean isCellEditable(int rowIndex,
int columnIndex)
isCellEditable in interface TableModelisCellEditable in class AbstractTableModelpublic int getMappedIndex(int mappedRow)
AbstractFormTableModelgetMappedIndex in class AbstractFormTableModel<T>mappedRow - the original rowpublic int[] getMappedIndex(int[] mappedRows)
AbstractFormTableModelgetMappedIndex in class AbstractFormTableModel<T>mappedRows - the original rowspublic int getModelIndex(int row)
AbstractFormTableModelgetModelIndex in class AbstractFormTableModel<T>row - the row of this modelpublic int[] getModelIndex(int[] rows)
AbstractFormTableModelgetModelIndex in class AbstractFormTableModel<T>rows - the array of rows of this modelpublic void tableChanged(TableModelEvent e)
Event handler for TableModelListener: table data has changed.
This method must be overridden for another mapping than 1:1.
The default implementation just invokes fireTableChanged.
tableChanged in interface TableModelListenere - the table model eventpublic boolean isDataChanged()
AbstractFormTableModelisDataChanged in class AbstractFormTableModel<T>public void setDataChanged(boolean dataChanged)
AbstractFormTableModelsetDataChanged in class AbstractFormTableModel<T>dataChanged - true if model data has changedTentackle - distributed, domain- and model-driven