Package docking.widgets.table
Class DynamicTableModel<T>
java.lang.Object
javax.swing.table.AbstractTableModel
docking.widgets.table.AbstractGTableModel<T>
docking.widgets.table.AbstractSortedTableModel<T>
docking.widgets.table.DynamicTableModel<T>
- All Implemented Interfaces:
RowObjectTableModel<T>,SelectionStorage<T>,SortedTableModel,Serializable,TableModel
- See Also:
-
Field Summary
Fields inherited from class docking.widgets.table.AbstractSortedTableModel
hasEverSortedFields inherited from class docking.widgets.table.AbstractGTableModel
isDisposed, WIDTH_UNDEFINEDFields inherited from class javax.swing.table.AbstractTableModel
listenerListFields inherited from interface docking.widgets.table.SortedTableModel
ASCENDING_ORDER, DESCENDING_ORDER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetColumnName(int column) getColumnValueForRow(T rowObject, int columnIndex) Implementors are expected to return a value at the given column index for the specified row object.Implementors should return the current data of the model.getName()Returns the name of this modelbooleanisSortable(int columnIndex) Returns true if the specified columnIndex is sortable.Methods inherited from class docking.widgets.table.AbstractSortedTableModel
addSortListener, cleanupTableSortState, createSortComparator, createSortingContext, fireTableChanged, getIndexForRowObject, getIndexForRowObject, getPendingSortState, getPrimarySortColumnIndex, getRowIndex, getRowObject, getTableSortState, getValueAt, initializeSorting, isSorted, isSortPending, notifyModelSorted, reSort, setDefaultTableSortState, setTableSortState, sort, sortCompletedMethods inherited from class docking.widgets.table.AbstractGTableModel
dispose, getLastSelectedObjects, getPreferredColumnWidth, getRowCount, isDisposed, refresh, setLastSelectedObjectsMethods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAtMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface docking.widgets.table.RowObjectTableModel
fireTableDataChangedMethods inherited from interface javax.swing.table.TableModel
addTableModelListener, getColumnClass, getRowCount, isCellEditable, removeTableModelListener, setValueAt
-
Constructor Details
-
DynamicTableModel
-
-
Method Details
-
getName
Description copied from interface:RowObjectTableModelReturns the name of this model- Returns:
- the name of this model
-
isSortable
public boolean isSortable(int columnIndex) Description copied from interface:SortedTableModelReturns true if the specified columnIndex is sortable.- Parameters:
columnIndex- the column index- Returns:
- true if the specified columnIndex is sortable
-
getColumnCount
public int getColumnCount() -
getModelData
Description copied from interface:RowObjectTableModelImplementors should return the current data of the model. For models that support filtering, this will be the filtered version of the data. Furthermore, the data should be the underlying data and not a copy, as this method will potentially sort the given data.For those subclasses using an array, you may use the
Arraysclass to create a list backed by the array (Arrays.asList(Object...)).- Returns:
- the model data.
-
getColumnName
- Specified by:
getColumnNamein interfaceTableModel- Overrides:
getColumnNamein classAbstractTableModel
-
getColumnValueForRow
Description copied from interface:RowObjectTableModelImplementors are expected to return a value at the given column index for the specified row object. This is essentially a more specific version of theTableModel.getValueAt(int, int)that allows this class's comparator objects to work.- Parameters:
rowObject- The object that represents a given row.columnIndex- The column index for which a value is requested.- Returns:
- a value at the given column index for the specified row object.
-