java.lang.Object
org.eclipse.nebula.widgets.nattable.extension.glazedlists.filterrow.FilterRowUtils

public final class FilterRowUtils extends Object
  • Method Details

    • parse

      public static List<ParseResult> parse(String string, String textDelimiter, TextMatchingMode textMatchingMode)
    • parseExpression

      public static ParseResult parseExpression(String string)
      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

      public static ParseResult parseLiteral(String string)
    • setMatchOperation

      public static <T> void setMatchOperation(ca.odell.glazedlists.matchers.ThresholdMatcherEditor<T,Object> thresholdMatcherEditor, ParseResult.MatchType matchType)
      Set the Match operation on the ThresholdMatcherEditor corresponding to the ParseResult.MatchType. This must be done this way since ThresholdMatcherEditor.MatcherEditor is private.
      Type Parameters:
      T - type of the row object
      Parameters:
      thresholdMatcherEditor - The ThresholdMatcherEditor on which the match operation should be applied.
      matchType - The match type to apply.
    • getSeparatorCharacters

      public static 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. If it does not start with [ and ends with ] and does not match one of the following regular expressions, this method returns null which causes the default behavior, e.g. OR for String matchers, AND for threshold matchers.
      • (.){2}
      • (.)\\\\(.)
      • \\\\(.){2}
      • \\\\(.)\\\\(.)
      Parameters:
      delimiter - The delimiter that is configured via FilterRowConfigAttributes.TEXT_DELIMITER. Can be null.
      Returns:
      String array with the configured AND and the configured OR character, or null if 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