public class DefaultGlazedListsFilterStrategy<T> extends Object implements IFilterStrategy<T>
Modifier and Type | Field and Description |
---|---|
protected IColumnAccessor<T> |
columnAccessor |
protected IConfigRegistry |
configRegistry |
protected ca.odell.glazedlists.matchers.CompositeMatcherEditor<T> |
matcherEditor |
Constructor and Description |
---|
DefaultGlazedListsFilterStrategy(ca.odell.glazedlists.matchers.CompositeMatcherEditor<T> matcherEditor,
IColumnAccessor<T> columnAccessor,
IConfigRegistry configRegistry) |
Modifier and Type | Method and Description |
---|---|
void |
applyFilter(Map<Integer,Object> filterIndexToObjectMap)
Create GlazedLists matcher editors and apply them to facilitate filtering.
|
protected ca.odell.glazedlists.FunctionList.Function<T,Object> |
getColumnValueProvider(int columnIndex) |
int |
getGlazedListsTextMatcherEditorMode(TextMatchingMode textMatchingMode) |
protected String |
getStringFromColumnObject(int columnIndex,
Object object)
Converts the object inserted to the filter cell at the given column position to the corresponding String.
|
protected ca.odell.glazedlists.TextFilterator<T> |
getTextFilterator(Integer columnIndex,
IDisplayConverter converter) |
protected ca.odell.glazedlists.matchers.TextMatcherEditor<T> |
getTextMatcherEditor(Integer columnIndex,
TextMatchingMode textMatchingMode,
IDisplayConverter converter,
String filterText)
Sets up a text matcher editor for String tokens
|
protected ca.odell.glazedlists.matchers.ThresholdMatcherEditor<T,Object> |
getThresholdMatcherEditor(Integer columnIndex,
Object threshold,
Comparator<Object> comparator,
ca.odell.glazedlists.FunctionList.Function<T,Object> columnValueProvider,
ParseResult.MatchType matchOperation)
Set up a threshold matcher for tokens like '>20', '<=10' etc.
|
protected final IColumnAccessor<T> columnAccessor
protected final IConfigRegistry configRegistry
protected final ca.odell.glazedlists.matchers.CompositeMatcherEditor<T> matcherEditor
public DefaultGlazedListsFilterStrategy(ca.odell.glazedlists.matchers.CompositeMatcherEditor<T> matcherEditor, IColumnAccessor<T> columnAccessor, IConfigRegistry configRegistry)
public void applyFilter(Map<Integer,Object> filterIndexToObjectMap)
applyFilter
in interface IFilterStrategy<T>
filterIndexToObjectMap
- A Map of column indexes to filter text Strings.protected String getStringFromColumnObject(int columnIndex, Object object)
columnIndex
- The column index of the filter cell that should be processed.object
- The value set to the filter cell that needs to be convertedprotected ca.odell.glazedlists.matchers.ThresholdMatcherEditor<T,Object> getThresholdMatcherEditor(Integer columnIndex, Object threshold, Comparator<Object> comparator, ca.odell.glazedlists.FunctionList.Function<T,Object> columnValueProvider, ParseResult.MatchType matchOperation)
columnIndex
- of the column for which the matcher editor is being set upprotected ca.odell.glazedlists.FunctionList.Function<T,Object> getColumnValueProvider(int columnIndex)
protected ca.odell.glazedlists.matchers.TextMatcherEditor<T> getTextMatcherEditor(Integer columnIndex, TextMatchingMode textMatchingMode, IDisplayConverter converter, String filterText)
columnIndex
- of the column for which the matcher editor is being set upfilterText
- text entered by the user in the filter rowprotected ca.odell.glazedlists.TextFilterator<T> getTextFilterator(Integer columnIndex, IDisplayConverter converter)
TextFilterator
which exposes the contents of the column as a String
public int getGlazedListsTextMatcherEditorMode(TextMatchingMode textMatchingMode)
Copyright © 2013. All Rights Reserved.