Class ColumnFilterSaveManager<R>
java.lang.Object
docking.widgets.table.columnfilter.ColumnFilterSaveManager<R>
- Type Parameters:
R
- the row type of the table.
Loads and Save a list of ColumnTableFilters for a specific table to the tool
-
Constructor Summary
ConstructorDescriptionColumnFilterSaveManager
(String tablePreferenceKey, JTable table, RowObjectTableModel<R> model, Object dataSource) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFilter
(ColumnBasedTableFilter<R> filter) Adds a new ColumnTableFilter to be saved.boolean
containsFilterWithName
(String name) Returns true if this save manager contains any filters with the given name.Returns a list of the saved ColumnTableFiltersvoid
removeFilter
(ColumnBasedTableFilter<R> filter) Deletes a ColumnTableFilter from the list of saved filters.void
save()
Saves the list of filters to the tool's preference state.
-
Constructor Details
-
ColumnFilterSaveManager
public ColumnFilterSaveManager(String tablePreferenceKey, JTable table, RowObjectTableModel<R> model, Object dataSource) Constructor- Parameters:
tablePreferenceKey
- the key used to save table settings. This is used to make a preference key for saving the column filters.table
- The JTable that is filterable.model
- the TableModel that supports filtering.dataSource
- the table's DataSource object.
-
-
Method Details
-
addFilter
Adds a new ColumnTableFilter to be saved.- Parameters:
filter
- The filter to be saved.
-
removeFilter
Deletes a ColumnTableFilter from the list of saved filters.- Parameters:
filter
- the filter to remove from the list of saved filters.
-
save
public void save()Saves the list of filters to the tool's preference state. -
getSavedFilters
Returns a list of the saved ColumnTableFilters- Returns:
- a list of the saved ColumnTableFilters
-
containsFilterWithName
Returns true if this save manager contains any filters with the given name.- Parameters:
name
- the name to check for a filter's existence.- Returns:
- true if this save manager contains any filters with the given name.
-