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:
IFilterStrategy<T>
- Direct Known Subclasses:
ComboBoxGlazedListsFilterStrategy
public class DefaultGlazedListsStaticFilterStrategy<T> extends DefaultGlazedListsFilterStrategy<T>
Default implementation of anIFilterStrategy
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
Fields Modifier and Type Field Description protected Map<ca.odell.glazedlists.matchers.Matcher<T>,ca.odell.glazedlists.matchers.MatcherEditor<T>>
staticMatcherEditor
-
Fields inherited from class org.eclipse.nebula.widgets.nattable.extension.glazedlists.filterrow.DefaultGlazedListsFilterStrategy
columnAccessor, configRegistry, filterList, filterLock
-
-
Constructor Summary
Constructors Constructor Description 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.DefaultGlazedListsStaticFilterStrategy(ca.odell.glazedlists.FilterList<T> filterList, IColumnAccessor<T> columnAccessor, IConfigRegistry configRegistry)
Create a new DefaultGlazedListsStaticFilterStrategy on top of the given FilterList.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addStaticFilter(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.void
addStaticFilter(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.void
applyFilter(Map<Integer,Object> filterIndexToObjectMap)
Create GlazedLists matcher editors and apply them to facilitate filtering.void
clearStaticFilter()
Removes all applied static filters from this filter strategy.void
removeStaticFilter(ca.odell.glazedlists.matchers.Matcher<T> matcher)
Remove the static filter from this filter strategy.void
removeStaticFilter(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
-
-
-
-
Constructor Detail
-
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 Detail
-
applyFilter
public void applyFilter(Map<Integer,Object> filterIndexToObjectMap)
Create GlazedLists matcher editors and apply them to facilitate filtering. Always adds the static matchers.- Specified by:
applyFilter
in interfaceIFilterStrategy<T>
- Overrides:
applyFilter
in classDefaultGlazedListsFilterStrategy<T>
- Parameters:
filterIndexToObjectMap
- A Map of column indexes to filter text Strings.
-
addStaticFilter
public void addStaticFilter(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.- Parameters:
matcher
- the static filter to add
-
addStaticFilter
public void addStaticFilter(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.- Parameters:
matcherEditor
- the static filter to add
-
removeStaticFilter
public void removeStaticFilter(ca.odell.glazedlists.matchers.Matcher<T> matcher)
Remove the static filter from this filter strategy.- Parameters:
matcher
- the filter to remove
-
removeStaticFilter
public void removeStaticFilter(ca.odell.glazedlists.matchers.MatcherEditor<T> matcherEditor)
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
-
-