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 Object
Loads and Save a list of ColumnTableFilters for a specific table to the tool
  • 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

      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 List<ColumnBasedTableFilter<R>> getSavedFilters()
      Returns a list of the saved ColumnTableFilters
      Returns:
      a list of the saved ColumnTableFilters
    • containsFilterWithName

      public boolean containsFilterWithName(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.