Module is.codion.swing.common.model
Interface SwingFilterTableModel<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>,FilterTableModel<R,,C> TableModel
- All Known Implementing Classes:
SwingEntityTableModel
A Swing
TableModel based on the UI-agnostic
FilterTableModel, adding the TableModel
interface along with cell editing (via SwingFilterTableModel.RowEditor) — mirroring how SwingFilterListModel
extends ListModel. The rich model logic (items, selection, filtering, sorting, export) lives
in the common module; this only adds the Swing coat, with selection() narrowed to a
FilterListSelection (a javax.swing.ListSelectionModel).- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceBuilds aSwingFilterTableModel— the same options as the commonFilterTableModel.Builder(the selection being ajavax.swing.ListSelectionModelbased one), addingSwingFilterTableModel.Builder.rowEditor(Function), with the chain staying Swing-typed sobuild()yields aTableModel.static interfaceHandles the editing of rowsNested classes/interfaces inherited from interface is.codion.common.model.filter.FilterModel
FilterModel.FilteredItems<T>, FilterModel.IncludedItems<T>, FilterModel.IncludePredicate<T>, FilterModel.Items<T>, FilterModel.Refresher<T>, FilterModel.Sort<T>Nested classes/interfaces inherited from interface is.codion.common.model.component.table.FilterTableModel
FilterTableModel.ColumnValues<C>, FilterTableModel.Export<C>, FilterTableModel.TableColumns<R,C> -
Field Summary
Fields inherited from interface is.codion.common.model.filter.FilterModel
ASYNC -
Method Summary
Modifier and TypeMethodDescriptionbuilder()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 changedMethods inherited from interface is.codion.common.model.filter.FilterModel
itemsMethods inherited from interface is.codion.common.model.component.table.FilterTableModel
columns, export, filters, sort, valuesMethods inherited from interface javax.swing.table.TableModel
addTableModelListener, getColumnClass, getColumnCount, getColumnName, getRowCount, getValueAt, isCellEditable, removeTableModelListener, setValueAt
-
Method Details
-
selection
FilterListSelection<R> selection()- Specified by:
selectionin interfaceFilterModel<R>- Specified by:
selectionin interfaceFilterTableModel<R,C> - Returns:
- the
FilterListSelectioninstance used by this table model
-
rowEditor
SwingFilterTableModel.RowEditor<R,C> rowEditor()- Returns:
- the
SwingFilterTableModel.RowEditorproviding 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
SwingFilterTableModel.Builder.ColumnsStepinstance
-