T
- the type of entries of this table modelpublic interface HistoryReferencesTableModel<T extends HistoryReferencesTableEntry> extends TableModel
TableModel
specialised in displaying data of HistoryReference
s and handling
them.TableModel
,
HistoryReference
,
HistoryReferencesTable
Modifier and Type | Interface and Description |
---|---|
static class |
HistoryReferencesTableModel.Column
The default columns supported by the table model for state of
HistoryReference . |
Modifier and Type | Method and Description |
---|---|
void |
addEntry(T entry)
Appends the given
entry to the end of the entries. |
void |
clear()
Removes all the entries.
|
HistoryReferencesTableModel.Column |
getColumn(int columnIndex)
Returns the
Column at the given column index. |
int |
getColumnIndex(HistoryReferencesTableModel.Column column)
Returns the index of the given
column . |
HistoryReferencesTableModel.Column[] |
getColumns()
Returns all
Column s enabled. |
T |
getEntry(int rowIndex)
Returns the entry at the given
rowIndex . |
int |
getEntryRowIndex(int historyReferenceId)
Returns the row index of the entry with the given
historyReferenceId . |
T |
getEntryWithHistoryId(int historyReferenceId)
Returns the entry with the given
historyReferenceId . |
Object |
getPrototypeValue(int columnIndex)
Returns the prototype value for the given column index.
|
boolean |
isColumnEnabled(HistoryReferencesTableModel.Column column)
Tells whether the given
column is enabled. |
void |
refreshEntryRow(int historyReferenceId)
Notifies the table model listeners that the entry with the given
historyReferenceId
has changed. |
void |
removeEntry(int historyReferenceId)
Removes the entry with the given
historyReferenceId . |
addTableModelListener, getColumnClass, getColumnCount, getColumnName, getRowCount, getValueAt, isCellEditable, removeTableModelListener, setValueAt
HistoryReferencesTableModel.Column[] getColumns()
Column
s enabled.Column
s enabled.HistoryReferencesTableModel.Column getColumn(int columnIndex)
Column
at the given column index.columnIndex
- the column index used to get the Column
Column
at the given column indexIllegalArgumentException
- if columnIndex
is not valid (is negative, greater or
equal than the number of columns).int getColumnIndex(HistoryReferencesTableModel.Column column)
column
. If the given column
is not enabled,
null
is returned.column
- the column that will be searchedcolumn
, or null
if not enabled.IllegalArgumentException
- if column
is null
isColumnEnabled(Column)
boolean isColumnEnabled(HistoryReferencesTableModel.Column column)
column
is enabled. A column is enabled if the table model was
configured to use it.column
- the column that will be checkedtrue
if the column is enabled, false
otherwise.IllegalArgumentException
- if column
is null
Object getPrototypeValue(int columnIndex)
columnIndex
- the column index that will be checked.IllegalArgumentException
- if columnIndex
is not valid (is negative, greater or
equal than the number of columns).void addEntry(T entry)
entry
to the end of the entries.entry
- the entry that will be addedvoid refreshEntryRow(int historyReferenceId)
historyReferenceId
has changed.
The call to this method has no effect if there is no entry with the given ID.
historyReferenceId
- the HistoryReference
ID of the entry that has changedTableModelListener
void removeEntry(int historyReferenceId)
historyReferenceId
.
The call to this method has no effect if there is no entry with the given ID.
historyReferenceId
- the HistoryReference
ID of the entry that will be removedT getEntry(int rowIndex)
rowIndex
.rowIndex
- the row index of the entryIllegalArgumentException
- if rowIndex
is not valid (is negative, greater or
equal than the number of rows).T getEntryWithHistoryId(int historyReferenceId)
historyReferenceId
. If there is no entry with the
given ID null
is returned.historyReferenceId
- the HistoryReference
ID of the entry that will be returnedHistoryReference
ID, or null
if there is no
entry with the given IDint getEntryRowIndex(int historyReferenceId)
historyReferenceId
. If there is no
entry with the given ID -1 is returned.historyReferenceId
- the HistoryReference
ID of the entry that will be searchedHistoryReference
ID, or -1 if there is no entry with the given IDvoid clear()