T
- the type of table model entriespublic abstract class AbstractHistoryReferencesTableModel<T extends HistoryReferencesTableEntry> extends AbstractTableModel implements HistoryReferencesTableModel<T>
HistoryReferencesTableModel
. It contains basic
implementation of all the methods except the ones that access the data. the names of all the
columns and hasHistoryReferencesTableModel.Column
listenerList
Constructor and Description |
---|
AbstractHistoryReferencesTableModel(HistoryReferencesTableModel.Column[] columns)
Constructs an
AbstractHistoryReferencesTableModel with the specified columns (in the
specified order). |
Modifier and Type | Method and Description |
---|---|
HistoryReferencesTableModel.Column |
getColumn(int columnIndex)
Returns the
Column at the given column index. |
abstract Class<?> |
getColumnClass(int columnIndex)
Returns the
Class of the given column. |
int |
getColumnCount() |
int |
getColumnIndex(HistoryReferencesTableModel.Column column)
Returns the index of the given
column . |
String |
getColumnName(int columnIndex) |
HistoryReferencesTableModel.Column[] |
getColumns()
Returns all
Column s enabled. |
Object |
getValueAt(int rowIndex,
int columnIndex) |
boolean |
isColumnEnabled(HistoryReferencesTableModel.Column column)
Tells whether the given
column is enabled. |
protected static boolean |
isCustomColumn(HistoryReferencesTableModel.Column[] columns,
int columnIndex)
Tells whether or not the given column index in the given columns is a custom column.
|
protected boolean |
isCustomColumn(int columnIndex)
Tells whether or not the given column index is a custom column.
|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addEntry, clear, getEntry, getEntryRowIndex, getEntryWithHistoryId, getPrototypeValue, refreshEntryRow, removeEntry
addTableModelListener, getRowCount, isCellEditable, removeTableModelListener, setValueAt
public AbstractHistoryReferencesTableModel(HistoryReferencesTableModel.Column[] columns)
AbstractHistoryReferencesTableModel
with the specified columns (in the
specified order).columns
- the columns that will have the modelIllegalArgumentException
- if columns
is null or empty.protected boolean isCustomColumn(int columnIndex)
columnIndex
- the column indextrue
if it is a custom column, false
otherwise.HistoryReferencesTableModel.Column.CUSTOM
public abstract Class<?> getColumnClass(int columnIndex)
Class
of the given column.getColumnClass
in interface TableModel
getColumnClass
in class AbstractTableModel
columnIndex
- the column being queriedClass
of the columnpublic HistoryReferencesTableModel.Column[] getColumns()
HistoryReferencesTableModel
Column
s enabled.getColumns
in interface HistoryReferencesTableModel<T extends HistoryReferencesTableEntry>
Column
s enabled.public HistoryReferencesTableModel.Column getColumn(int columnIndex)
HistoryReferencesTableModel
Column
at the given column index.getColumn
in interface HistoryReferencesTableModel<T extends HistoryReferencesTableEntry>
columnIndex
- the column index used to get the Column
Column
at the given column indexpublic int getColumnIndex(HistoryReferencesTableModel.Column column)
HistoryReferencesTableModel
column
. If the given column
is not enabled,
null
is returned.getColumnIndex
in interface HistoryReferencesTableModel<T extends HistoryReferencesTableEntry>
column
- the column that will be searchedcolumn
, or null
if not enabled.HistoryReferencesTableModel.isColumnEnabled(Column)
public boolean isColumnEnabled(HistoryReferencesTableModel.Column column)
HistoryReferencesTableModel
column
is enabled. A column is enabled if the table model was
configured to use it.isColumnEnabled
in interface HistoryReferencesTableModel<T extends HistoryReferencesTableEntry>
column
- the column that will be checkedtrue
if the column is enabled, false
otherwise.public String getColumnName(int columnIndex)
getColumnName
in interface TableModel
getColumnName
in class AbstractTableModel
public int getColumnCount()
getColumnCount
in interface TableModel
public Object getValueAt(int rowIndex, int columnIndex)
getValueAt
in interface TableModel
protected static boolean isCustomColumn(HistoryReferencesTableModel.Column[] columns, int columnIndex)
columns
- the columns that will checkedcolumnIndex
- the column indextrue
if it is a custom column, false
otherwise.