Class DefaultGlazedListsStaticFilterStrategy<T>
java.lang.Object
org.eclipse.nebula.widgets.nattable.extension.glazedlists.filterrow.DefaultGlazedListsFilterStrategy<T>
org.eclipse.nebula.widgets.nattable.extension.glazedlists.filterrow.DefaultGlazedListsStaticFilterStrategy<T>
- Type Parameters:
T- the type of the objects shown within the NatTable
- All Implemented Interfaces:
IActivatableFilterStrategy<T>,IFilterStrategy<T>
- Direct Known Subclasses:
ComboBoxGlazedListsFilterStrategy
public class DefaultGlazedListsStaticFilterStrategy<T>
extends DefaultGlazedListsFilterStrategy<T>
implements IActivatableFilterStrategy<T>
Default implementation of an
IFilterStrategy for the filter row which
can also take static filters and combine them with the filter logic from the
filter row.-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.nebula.widgets.nattable.extension.glazedlists.filterrow.DefaultGlazedListsFilterStrategy
DefaultGlazedListsFilterStrategy.ColumnTextFilterator -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<ca.odell.glazedlists.matchers.Matcher<T>,ca.odell.glazedlists.matchers.MatcherEditor<T>> Fields inherited from class org.eclipse.nebula.widgets.nattable.extension.glazedlists.filterrow.DefaultGlazedListsFilterStrategy
columnAccessor, configRegistry, filterList, filterLock -
Constructor Summary
ConstructorsConstructorDescriptionDefaultGlazedListsStaticFilterStrategy(ca.odell.glazedlists.FilterList<T> filterList, ca.odell.glazedlists.matchers.CompositeMatcherEditor<T> matcherEditor, IColumnAccessor<T> columnAccessor, IConfigRegistry configRegistry) Create a new DefaultGlazedListsStaticFilterStrategy on top of the given FilterList using the given CompositeMatcherEditor.DefaultGlazedListsStaticFilterStrategy(ca.odell.glazedlists.FilterList<T> filterList, IColumnAccessor<T> columnAccessor, IConfigRegistry configRegistry) Create a new DefaultGlazedListsStaticFilterStrategy on top of the given FilterList. -
Method Summary
Modifier and TypeMethodDescriptionvoidActivate additional filter logic so it gets applied on the next filter operation, e.g.voidaddStaticFilter(ca.odell.glazedlists.matchers.Matcher<T> matcher) Add a static filter to this filter strategy which will always be applied additionally to any other filter.voidaddStaticFilter(ca.odell.glazedlists.matchers.MatcherEditor<T> matcherEditor) Add a static filter to this filter strategy which will always be applied additionally to any other filter.voidapplyFilter(Map<Integer, Object> filterIndexToObjectMap) Create GlazedLists matcher editors and apply them to facilitate filtering.voidRemoves all applied static filters from this filter strategy.voidDeactivate additional filter logic so it does not get applied on the next filter operation, e.g.booleanisActive()voidremoveStaticFilter(ca.odell.glazedlists.matchers.Matcher<T> matcher) Remove the static filter from this filter strategy.voidremoveStaticFilter(ca.odell.glazedlists.matchers.MatcherEditor<T> matcherEditor) Remove the static filter from this filter strategy.Methods inherited from class org.eclipse.nebula.widgets.nattable.extension.glazedlists.filterrow.DefaultGlazedListsFilterStrategy
containsMatcherEditor, getColumnValueProvider, getFilterContentDisplayConverter, getGlazedListsTextMatcherEditorMode, getMatcherEditor, getStringFromColumnObject, getTextFilterator, getTextMatcherEditor, getThresholdMatcherEditor, matcherEditorEqual
-
Field Details
-
staticMatcherEditor
-
-
Constructor Details
-
DefaultGlazedListsStaticFilterStrategy
public DefaultGlazedListsStaticFilterStrategy(ca.odell.glazedlists.FilterList<T> filterList, IColumnAccessor<T> columnAccessor, IConfigRegistry configRegistry) Create a new DefaultGlazedListsStaticFilterStrategy on top of the given FilterList.Note: Using this constructor you don't need to create and set the CompositeMatcherEditor as MatcherEditor on the FilterList yourself! The necessary steps to get it working is done within this constructor.
- Parameters:
filterList- The FilterList that is used within the GlazedLists based NatTable for filtering.columnAccessor- The IColumnAccessor necessary to access the column data of the row objects in the FilterList.configRegistry- The IConfigRegistry necessary to retrieve filter specific configurations.
-
DefaultGlazedListsStaticFilterStrategy
public DefaultGlazedListsStaticFilterStrategy(ca.odell.glazedlists.FilterList<T> filterList, ca.odell.glazedlists.matchers.CompositeMatcherEditor<T> matcherEditor, IColumnAccessor<T> columnAccessor, IConfigRegistry configRegistry) Create a new DefaultGlazedListsStaticFilterStrategy on top of the given FilterList using the given CompositeMatcherEditor. This is necessary to support connection of multiple filter rows.Note: Using this constructor you need to create the CompositeMatcherEditor yourself. It will be added automatically to the given FilterList, so you can skip that step.
- Parameters:
filterList- The FilterList that is used within the GlazedLists based NatTable for filtering.matcherEditor- The CompositeMatcherEditor that should be used by this DefaultGlazedListsStaticFilterStrategy.columnAccessor- The IColumnAccessor necessary to access the column data of the row objects in the FilterList.configRegistry- The IConfigRegistry necessary to retrieve filter specific configurations.
-
-
Method Details
-
applyFilter
Create GlazedLists matcher editors and apply them to facilitate filtering. Always adds the static matchers.- Specified by:
applyFilterin interfaceIFilterStrategy<T>- Overrides:
applyFilterin classDefaultGlazedListsFilterStrategy<T>- Parameters:
filterIndexToObjectMap- A Map of column indexes to filter text Strings.
-
addStaticFilter
Add a static filter to this filter strategy which will always be applied additionally to any other filter.- Parameters:
matcher- the static filter to add
-
addStaticFilter
Add a static filter to this filter strategy which will always be applied additionally to any other filter.- Parameters:
matcherEditor- the static filter to add
-
removeStaticFilter
Remove the static filter from this filter strategy.- Parameters:
matcher- the filter to remove
-
removeStaticFilter
Remove the static filter from this filter strategy.- Parameters:
matcherEditor- the filter to remove
-
clearStaticFilter
public void clearStaticFilter()Removes all applied static filters from this filter strategy.- Since:
- 1.5
-
activateFilterStrategy
public void activateFilterStrategy()Description copied from interface:IActivatableFilterStrategyActivate additional filter logic so it gets applied on the next filter operation, e.g. static or exclude filters. By default does nothing.- Specified by:
activateFilterStrategyin interfaceIActivatableFilterStrategy<T>
-
deactivateFilterStrategy
public void deactivateFilterStrategy()Description copied from interface:IActivatableFilterStrategyDeactivate additional filter logic so it does not get applied on the next filter operation, e.g. static or exclude filters. By default does nothing.- Specified by:
deactivateFilterStrategyin interfaceIActivatableFilterStrategy<T>
-
isActive
public boolean isActive()- Specified by:
isActivein interfaceIActivatableFilterStrategy<T>- Returns:
trueif the additional filter logic provided by thisIFilterStrategyis active,falseif not.
-