Class FilterRowUtils
java.lang.Object
org.eclipse.nebula.widgets.nattable.extension.glazedlists.filterrow.FilterRowUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic String[]getSeparatorCharacters(String delimiter) This method tries to extract the AND and the OR character that should be used as delimiter, so that a user is able to specify the operation for combined filter criteria.static List<ParseResult>parse(String string, String textDelimiter, TextMatchingMode textMatchingMode) static ParseResultparseExpression(String string) Parses the text entered in the filter row.static ParseResultparseLiteral(String string) static <T> voidsetMatchOperation(ca.odell.glazedlists.matchers.ThresholdMatcherEditor<T, Object> thresholdMatcherEditor, ParseResult.MatchType matchType) Set the Match operation on theThresholdMatcherEditorcorresponding to theParseResult.MatchType.
-
Method Details
-
parse
public static List<ParseResult> parse(String string, String textDelimiter, TextMatchingMode textMatchingMode) -
parseExpression
Parses the text entered in the filter row. The text is parsed to figure out the type of match operation (<, > etc.) and the value next to it.- Parameters:
string- entered by the user in the filter row text box- Returns:
- the result of the parse operation
-
parseLiteral
-
setMatchOperation
public static <T> void setMatchOperation(ca.odell.glazedlists.matchers.ThresholdMatcherEditor<T, Object> thresholdMatcherEditor, ParseResult.MatchType matchType) Set the Match operation on theThresholdMatcherEditorcorresponding to theParseResult.MatchType. This must be done this way since ThresholdMatcherEditor.MatcherEditor is private.- Type Parameters:
T- type of the row object- Parameters:
thresholdMatcherEditor- TheThresholdMatcherEditoron which the match operation should be applied.matchType- The match type to apply.
-
getSeparatorCharacters
This method tries to extract the AND and the OR character that should be used as delimiter, so that a user is able to specify the operation for combined filter criteria. If it does not start with [ and ends with ] and does not match one of the following regular expressions, this method returnsnullwhich causes the default behavior, e.g. OR for String matchers, AND for threshold matchers.- (.){2}
- (.)\\\\(.)
- \\\\(.){2}
- \\\\(.)\\\\(.)
- Parameters:
delimiter- The delimiter that is configured viaFilterRowConfigAttributes.TEXT_DELIMITER. Can benull.- Returns:
- String array with the configured AND and the configured OR
character, or
nullif the delimiter is not a two character regular expression. The first element in the array is the AND character, the second element is the OR character. - Since:
- 2.1
-