Пример #1
0
 public void setup(AttributeEqualBuilder.EqualStringFilter filter) {
   this.filter = filter;
   this.setToolTipText(filter.getName() + " '" + filter.getColumn().getTitle() + "'");
   FilterProperty pattern = filter.getProperties()[1];
   FilterProperty useRegex = filter.getProperties()[2];
   try {
     textField.setText((String) pattern.getValue());
     regexCheckbox.setSelected((Boolean) useRegex.getValue());
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
Пример #2
0
 @Override
 public void actionPerformed(ActionEvent evt) {
   FilterProperty pattern = filter.getProperties()[1];
   FilterProperty useRegex = filter.getProperties()[2];
   try {
     if (pattern.getValue() == null || !pattern.getValue().equals(textField.getText())) {
       pattern.setValue(textField.getText());
     }
     if (useRegex.getValue() == null || !useRegex.getValue().equals(regexCheckbox.isSelected())) {
       useRegex.setValue(regexCheckbox.isSelected());
     }
   } catch (Exception e) {
     e.printStackTrace();
   }
 }