Class ColumnFilterSaveManager<R>
- java.lang.Object
-
- docking.widgets.table.columnfilter.ColumnFilterSaveManager<R>
-
- Type Parameters:
R
- the row type of the table.
public class ColumnFilterSaveManager<R> extends java.lang.Object
Loads and Save a list of ColumnTableFilters for a specific table to the tool
-
-
Constructor Summary
Constructors Constructor Description ColumnFilterSaveManager(GTableFilterPanel<R> panel, javax.swing.JTable table, RowObjectTableModel<R> model, java.lang.Object dataSource)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFilter(ColumnBasedTableFilter<R> filter)
Adds a new ColumnTableFilter to be saved.boolean
containsFilterWithName(java.lang.String name)
Returns true if this save manager contains any filters with the given name.java.util.List<ColumnBasedTableFilter<R>>
getSavedFilters()
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 Detail
-
ColumnFilterSaveManager
public ColumnFilterSaveManager(GTableFilterPanel<R> panel, javax.swing.JTable table, RowObjectTableModel<R> model, java.lang.Object dataSource)
Constructor- Parameters:
panel
- The GTableFilterPanel for the table.table
- The JTable that is filterable.model
- the TableModel that supports filtering.dataSource
- the table's DataSource object.
-
-
Method Detail
-
addFilter
public void addFilter(ColumnBasedTableFilter<R> filter)
Adds a new ColumnTableFilter to be saved.- Parameters:
filter
- The filter to be saved.
-
removeFilter
public void removeFilter(ColumnBasedTableFilter<R> filter)
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
public java.util.List<ColumnBasedTableFilter<R>> getSavedFilters()
Returns a list of the saved ColumnTableFilters- Returns:
- a list of the saved ColumnTableFilters
-
containsFilterWithName
public boolean containsFilterWithName(java.lang.String name)
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.
-
-