Class SectionTableRowSorter<BEAN,MODEL extends SectionTableModel<BEAN> & BeanTableModel<BEAN>>
- java.lang.Object
-
- javax.swing.RowSorter<MODEL>
-
- io.github.jonestimd.swing.table.sort.BeanModelRowSorter<BEAN,MODEL,SectionTableRowSorter.ViewRow<BEAN>>
-
- io.github.jonestimd.swing.table.sort.SectionTableRowSorter<BEAN,MODEL>
-
- Type Parameters:
BEAN
- the class of beans in the tableMODEL
- the class of the table model
public class SectionTableRowSorter<BEAN,MODEL extends SectionTableModel<BEAN> & BeanTableModel<BEAN>> extends BeanModelRowSorter<BEAN,MODEL,SectionTableRowSorter.ViewRow<BEAN>>
A row sorter for aSectionTable
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
SectionTableRowSorter.SectionTableRowComparator<BEAN>
The comparator used to sort rows of a section table.protected static class
SectionTableRowSorter.ViewRow<BEAN>
A mapping between the view and the model.
-
Field Summary
-
Fields inherited from class io.github.jonestimd.swing.table.sort.BeanModelRowSorter
modelToView, viewToModel
-
-
Constructor Summary
Constructors Constructor Description SectionTableRowSorter(DecoratedTable<BEAN,MODEL> table)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T,M extends SectionTableModel<T> & BeanTableModel<T>>
SectionTableRowSorter<T,M>create(DecoratedTable<T,M> table)
protected java.util.function.Predicate<SectionTableRowSorter.ViewRow<BEAN>>
createViewFilter(java.util.function.Predicate<BEAN> rowFilter)
protected java.util.List<SectionTableRowSorter.ViewRow<BEAN>>
newModelRows(int firstRow, int lastRow)
Create a list of view/model mappings.protected void
postSort()
void
rowsDeleted(int firstRow, int endRow)
protected void
updateModelIndex(int firstRow, int deltaRows)
-
Methods inherited from class io.github.jonestimd.swing.table.sort.BeanModelRowSorter
allRowsChanged, convertRowIndexToModel, convertRowIndexToView, getBean, getModel, getModelRowCount, getSortKeys, getViewRowCount, isVisible, modelStructureChanged, reset, rowsInserted, rowsUpdated, rowsUpdated, setRowFilter, setSortKeys, toggleSortOrder
-
-
-
-
Constructor Detail
-
SectionTableRowSorter
public SectionTableRowSorter(DecoratedTable<BEAN,MODEL> table)
-
-
Method Detail
-
create
public static <T,M extends SectionTableModel<T> & BeanTableModel<T>> SectionTableRowSorter<T,M> create(DecoratedTable<T,M> table)
-
createViewFilter
protected java.util.function.Predicate<SectionTableRowSorter.ViewRow<BEAN>> createViewFilter(java.util.function.Predicate<BEAN> rowFilter)
- Overrides:
createViewFilter
in classBeanModelRowSorter<BEAN,MODEL extends SectionTableModel<BEAN> & BeanTableModel<BEAN>,SectionTableRowSorter.ViewRow<BEAN>>
-
rowsDeleted
public void rowsDeleted(int firstRow, int endRow)
- Overrides:
rowsDeleted
in classBeanModelRowSorter<BEAN,MODEL extends SectionTableModel<BEAN> & BeanTableModel<BEAN>,SectionTableRowSorter.ViewRow<BEAN>>
-
updateModelIndex
protected void updateModelIndex(int firstRow, int deltaRows)
- Overrides:
updateModelIndex
in classBeanModelRowSorter<BEAN,MODEL extends SectionTableModel<BEAN> & BeanTableModel<BEAN>,SectionTableRowSorter.ViewRow<BEAN>>
-
newModelRows
protected java.util.List<SectionTableRowSorter.ViewRow<BEAN>> newModelRows(int firstRow, int lastRow)
Description copied from class:BeanModelRowSorter
Create a list of view/model mappings.- Specified by:
newModelRows
in classBeanModelRowSorter<BEAN,MODEL extends SectionTableModel<BEAN> & BeanTableModel<BEAN>,SectionTableRowSorter.ViewRow<BEAN>>
- Parameters:
firstRow
- the starting model index (inclusive)lastRow
- the ending model index (inclusive)- Returns:
- a new list of view/model mappings
-
postSort
protected void postSort()
- Specified by:
postSort
in classBeanModelRowSorter<BEAN,MODEL extends SectionTableModel<BEAN> & BeanTableModel<BEAN>,SectionTableRowSorter.ViewRow<BEAN>>
-
-