Example #1
0
      public static Type from(String name) {
        for (Type type : Type.values()) {
          if (type.name.equals(name)) return type;
        }

        throw new IllegalArgumentException("Unknown position filter: " + name);
      }
Example #2
0
  public void init(Matcher matcher) {
    positions = new ArrayList<Position>();

    do {
      Position position = new Position(Type.from(matcher.group(1)));

      if (matcher.group(2) != null) position.parameters = matcher.group(2);

      positions.add(position);
    } while (matcher.find());
  }
Example #3
0
 public boolean matches(JComponent component, int index, int size) {
   return type.matches(parameters, component, index, size);
 }