Module is.codion.swing.common.model
Interface FilterTableModel<R,C>
- Type Parameters:
R- the type representing the rows in this table modelC- the type used to identify columns in this table model, Integer for indexed identification for example
- All Superinterfaces:
FilterModel<R>,TableModel
- All Known Implementing Classes:
SwingEntityTableModel
Specifies a table model supporting selection as well as filtering.
A
FilterTableModel can not contain null items.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA builder for aFilterTableModel.static interfaceProvides access to table column valuesstatic interfaceHandles the editing of rowsstatic interfaceExports the table model data as a String.static interfaceSpecifies the columns for a table model, their identifiers, their class and how to extract their value from a row instance.Nested classes/interfaces inherited from interface is.codion.common.model.filter.FilterModel
FilterModel.AbstractRefresher<T>, FilterModel.FilteredItems<T>, FilterModel.IncludedItems<T>, FilterModel.IncludePredicate<T>, FilterModel.Items<T>, FilterModel.Refresher<T>, FilterModel.Sort<T> -
Field Summary
Fields inherited from interface is.codion.common.model.filter.FilterModel
ASYNC -
Method Summary
Modifier and TypeMethodDescriptionbuilder()columns()editor()export()filters()voidNotifies all listeners that all cell values in the table's rows may have changed.voidfireTableRowsUpdated(int fromIndex, int toIndex) Notifies all listeners that the given rows have changedClass<?> getColumnClass(C identifier) Returns the class of the column with the given identifiersort()values()Provides access to column valuesMethods inherited from interface is.codion.common.model.filter.FilterModel
itemsMethods inherited from interface javax.swing.table.TableModel
addTableModelListener, getColumnClass, getColumnCount, getColumnName, getRowCount, getValueAt, isCellEditable, removeTableModelListener, setValueAt
-
Method Details
-
columns
FilterTableModel.TableColumns<R,C> columns()- Returns:
- the table columns
-
getColumnClass
Returns the class of the column with the given identifier- Parameters:
identifier- the column identifier- Returns:
- the Class representing the given column
-
values
FilterTableModel.ColumnValues<C> values()Provides access to column values- Returns:
- the
FilterTableModel.ColumnValues
-
selection
FilterListSelection<R> selection()- Specified by:
selectionin interfaceFilterModel<R>- Returns:
- the
FilterListSelectioninstance used by this table model
-
filters
TableConditionModel<C> filters()- Returns:
- the
TableConditionModelused to filter this table model
-
sort
FilterTableSort<R,C> sort()- Specified by:
sortin interfaceFilterModel<R>- Returns:
- the sort
-
export
FilterTableModel.Export<C> export()- Returns:
- a
FilterTableModel.Exportinstance for exporting the table model data
-
editor
FilterTableModel.Editor<R,C> editor()- Returns:
- the
FilterTableModel.Editorproviding the row editing functionality
-
fireTableDataChanged
void fireTableDataChanged()Notifies all listeners that all cell values in the table's rows may have changed. The number of rows may also have changed and the JTable should redraw the table from scratch. The structure of the table (as in the order of the columns) is assumed to be the same. -
fireTableRowsUpdated
void fireTableRowsUpdated(int fromIndex, int toIndex) Notifies all listeners that the given rows have changed- Parameters:
fromIndex- the from indextoIndex- the to index
-
builder
- Returns:
- a
FilterTableModel.Builder.ColumnsStepinstance
-