Copyright © 2011 Citra Technologies. All Rights Reserved.

com.citra.filter.tree
Interface ColumnFilterMapper

All Known Implementing Classes:
AbstractColumnFilterMapper, ColumnNodeFilterMapper, DefaultColumnFilterMapper, LevelFilterMapper, NodeFilterMapper

public interface ColumnFilterMapper

ColumnFilterMapper is an interface that defines methods for installing/uninstalling and applying table filters on a FilterTreeTableModel.


Method Summary
 void applyFilters(FilterTreeTableModel filterTreeTableModel, int[] excludedModelIndexes)
          Applies the stored filters to the supplied filterTreeTableModel, excluding a list of column indexes defined by excludedModelIndexes.
 void commitFilters(FilterTreeTableModel filterTreeTableModel, Filter filter, int modelIndex)
          Stores and commits the filters for the column modelIndex for which filter expressions were previously made available to the user.
 void filterCancelled()
          Cancels the action of previously showing available filter expressions to the user.
 void filterVisible(int modelIndex, CheckBoxTree tree, TreeTableModel treeTableModel, TreeTable table)
          Method called when available filter expressions are made available to the user.
 int[] getFilteredColumns()
          Returns an array of the columns that have filters.
 boolean hasFilter(int modelIndex)
          Determines whether filters for the column modelIndex exist.
 boolean removeFilters(FilterTreeTableModel ftm, int[] modelIndexes, boolean commit)
          Removes the stored filters for the supplied modelIndexes columns.
 

Method Detail

applyFilters

void applyFilters(FilterTreeTableModel filterTreeTableModel,
                  int[] excludedModelIndexes)
Applies the stored filters to the supplied filterTreeTableModel, excluding a list of column indexes defined by excludedModelIndexes. If excludedModelIndexes is null, or is empty, all stored filters are applied.

Parameters:
filterTreeTableModel - the model to which the stored filters are applied
excludedModelIndexes - an array of column indexes to exclude while filtering

commitFilters

void commitFilters(FilterTreeTableModel filterTreeTableModel,
                   Filter filter,
                   int modelIndex)
Stores and commits the filters for the column modelIndex for which filter expressions were previously made available to the user.

Parameters:
filterTreeTableModel - the model to which the filters are commited
filter - the filter to use
modelIndex - the column

filterCancelled

void filterCancelled()
Cancels the action of previously showing available filter expressions to the user.


filterVisible

void filterVisible(int modelIndex,
                   CheckBoxTree tree,
                   TreeTableModel treeTableModel,
                   TreeTable table)
Method called when available filter expressions are made available to the user.

Parameters:
modelIndex - the column for which filter expressions are shown
tree - the tree that should be filled with a hierarchical filter expression structure
treeTableModel - the data model that holds a hierarchical filter expression structure
table - the treetable containing the structure

hasFilter

boolean hasFilter(int modelIndex)
Determines whether filters for the column modelIndex exist.

Parameters:
modelIndex - the column
Returns:
true if filters for the supplied are defined, false otherwise

getFilteredColumns

int[] getFilteredColumns()
Returns an array of the columns that have filters.

Returns:
a list of columns that have filters

removeFilters

boolean removeFilters(FilterTreeTableModel ftm,
                      int[] modelIndexes,
                      boolean commit)
Removes the stored filters for the supplied modelIndexes columns.

Parameters:
ftm - the model from which the stored filters are removed
modelIndexes - a list of columns
commit - a flag indicating that the filter removal should be commited
Returns:
true, if at least one filter was removed, false otherwise

Copyright © 2011 Citra Technologies. All Rights Reserved.