Package com.santiagolizardo.beobachter.beans

Examples of com.santiagolizardo.beobachter.beans.Rule


    btnAddRule.addActionListener(
        new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent ev
          ) {
            Rule rule = new Rule();
            modelRules.addRule(rule);
            saveChanges();
          }
        ;
    }
View Full Code Here


    }
  }

  @Override
  public Object getValueAt(int row, int col) {
    Rule rule = (Rule) rules.get(row);
    switch (col) {
      case 0:
        return rule.getPattern();
      case 1:
        return rule.isRegularExpression();
      case 2:
        return rule.isIgnoreCase();
      case 3:
        return rule.getBackgroundColor();
      case 4:
        return rule.getForegroundColor();
      case 5:
        return new Color[]{
          rule.getBackgroundColor(),
          rule.getForegroundColor()
        };
      default:
        return "?";
    }
  }
View Full Code Here

    }
  }

  @Override
  public void setValueAt(Object value, int row, int col) {
    Rule rule = rules.get(row);
    switch (col) {
      case 0:
        rule.setPattern((String) value);
        break;
      case 1:
        rule.setRegularExpression((boolean) value);
        break;
      case 2:
        rule.setIgnoreCase((boolean) value);
        break;
      case 3:
        rule.setBackgroundColor((Color) value);
        fireTableCellUpdated(row, 5);
        break;
      case 4:
        rule.setForegroundColor((Color) value);
        fireTableCellUpdated(row, 5);
        break;
      default:
        return;
    }
View Full Code Here

      setBackground(Color.BLUE);
      setForeground(Color.WHITE);
    } else {
      for (RuleMatcher ruleMatcher : ruleMatchers) {
        if (ruleMatcher.matches(getText())) {
          Rule rule = ruleMatcher.getRule();
          setBackground(rule.getBackgroundColor());
          setForeground(rule.getForegroundColor());
        }
      }
    }

    return this;
View Full Code Here

TOP

Related Classes of com.santiagolizardo.beobachter.beans.Rule

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.