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 classSectionTableRowSorter.SectionTableRowComparator<BEAN>The comparator used to sort rows of a section table.protected static classSectionTableRowSorter.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 voidpostSort()voidrowsDeleted(int firstRow, int endRow)protected voidupdateModelIndex(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:
createViewFilterin classBeanModelRowSorter<BEAN,MODEL extends SectionTableModel<BEAN> & BeanTableModel<BEAN>,SectionTableRowSorter.ViewRow<BEAN>>
-
rowsDeleted
public void rowsDeleted(int firstRow, int endRow)- Overrides:
rowsDeletedin classBeanModelRowSorter<BEAN,MODEL extends SectionTableModel<BEAN> & BeanTableModel<BEAN>,SectionTableRowSorter.ViewRow<BEAN>>
-
updateModelIndex
protected void updateModelIndex(int firstRow, int deltaRows)- Overrides:
updateModelIndexin 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:BeanModelRowSorterCreate a list of view/model mappings.- Specified by:
newModelRowsin 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:
postSortin classBeanModelRowSorter<BEAN,MODEL extends SectionTableModel<BEAN> & BeanTableModel<BEAN>,SectionTableRowSorter.ViewRow<BEAN>>
-
-