|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.table.AbstractTableModel
org.tentackle.ui.AbstractFormTableModel
public abstract class AbstractFormTableModel
Abstract table model that maintains a chained mapping of rows
by a FormTableMap.
| Field Summary |
|---|
| Fields inherited from class javax.swing.table.AbstractTableModel |
|---|
listenerList |
| Constructor Summary | |
|---|---|
AbstractFormTableModel()
|
|
| Method Summary | |
|---|---|
abstract String |
getDisplayedColumnName(int column)
Gets the displayed column name. |
abstract FormTableEntry |
getEntryAt(int rowIndex)
Gets the form table entry at given row. |
FormTableMap |
getMap()
Sets the chained mapper. |
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(). |
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. |
FormTable |
getTable()
Gets the table. |
abstract FormTableEntry |
getTemplate()
Gets the table entry template from the model. |
boolean |
isDataChanged()
Returns whether data has changed. |
void |
setDataChanged(boolean dataChanged)
Sets a flag that model data has changed. |
boolean |
setEntryAt(FormTableEntry entry,
int rowIndex)
Sets the form table entry at given row. The default implementation just triggers a value changed event for the table. |
void |
setMap(FormTableMap map)
Sets the chained mapper. |
void |
setTable(FormTable table)
Sets the table. |
| Methods inherited from class javax.swing.table.AbstractTableModel |
|---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getColumnName, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.swing.table.TableModel |
|---|
getColumnCount, getRowCount, getValueAt |
| Constructor Detail |
|---|
public AbstractFormTableModel()
| Method Detail |
|---|
public void setTable(FormTable table)
table - the form table or null if this model is not the direct data model for the table
(i.e. somewhere in a chain)public FormTable getTable()
public void setMap(FormTableMap map)
map - the chained form table map or null if this model is not chaining another mappublic FormTableMap getMap()
public abstract FormTableEntry getEntryAt(int rowIndex)
rowIndex - the row of the table entry
public abstract FormTableEntry getTemplate()
public boolean setEntryAt(FormTableEntry entry,
int rowIndex)
entry - the formtable entryrowIndex - the row of the table entry
public int getModelIndex(int row)
row - the row of this model
public int[] getModelIndex(int[] rows)
rows - the array of rows of this model
public int getMappedIndex(int mappedRow)
mappedRow - the original row
public int[] getMappedIndex(int[] mappedRows)
mappedRows - the original rows
public boolean isDataChanged()
public void setDataChanged(boolean dataChanged)
dataChanged - true if model data has changedpublic abstract String getDisplayedColumnName(int column)
column - column index
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||