M
- type of the model (MidicaTableModel)public class MidicaSorter<M>
extends javax.swing.table.TableRowSorter
This class provides a table row sorter and filter for tables used in Midica.
The following sorting cycle is used:
MODEL > ASCENDING > DESCENDING > MODEL > …
Filtering is possible based on:
Modifier and Type | Field and Description |
---|---|
private java.util.ArrayList<javax.swing.RowFilter<MidicaTableModel,java.lang.Integer>> |
filters |
protected java.lang.String |
filterStr |
private static HideCategoryFilter |
hideCatFilter |
private boolean |
showCategories |
private static ShowOnlyCategoryFilter |
showOnlyCatFilter |
private javax.swing.RowFilter<MidicaTableModel,java.lang.Integer> |
stringFilter |
Constructor and Description |
---|
MidicaSorter() |
Modifier and Type | Method and Description |
---|---|
private void |
filter()
Apply all active filters - category filter and/or string filter.
|
void |
setStringFilter(java.lang.String criterion)
Applies the given filter criterion.
|
void |
toggleSortOrder(int column) |
getComparator, getStringConverter, setModel, setStringConverter, useToString
allRowsChanged, convertRowIndexToModel, convertRowIndexToView, getMaxSortKeys, getModel, getModelRowCount, getModelWrapper, getRowFilter, getSortKeys, getSortsOnUpdates, getViewRowCount, isSortable, modelStructureChanged, rowsDeleted, rowsInserted, rowsUpdated, rowsUpdated, setComparator, setMaxSortKeys, setModelWrapper, setRowFilter, setSortable, setSortKeys, setSortsOnUpdates, sort
private static final HideCategoryFilter hideCatFilter
private static final ShowOnlyCategoryFilter showOnlyCatFilter
private boolean showCategories
protected java.lang.String filterStr
private javax.swing.RowFilter<MidicaTableModel,java.lang.Integer> stringFilter
private java.util.ArrayList<javax.swing.RowFilter<MidicaTableModel,java.lang.Integer>> filters
public void toggleSortOrder(int column)
toggleSortOrder
in class javax.swing.DefaultRowSorter
public void setStringFilter(java.lang.String criterion)
Applies the given filter criterion.
criterion
- Filter criteron for filtering table rows.private void filter()
Apply all active filters - category filter and/or string filter.