예제 #1
0
 private AbstractCustomRuleSpecification findRuleSpecification(FieldMeta fieldMeta) {
   IRuleSpecification specification = ruleElement.getRuleSpecification();
   if (specification != null) {
     Visitor findsVisitor = new FindSpecificationVistor(fieldMeta);
     Object result = specification.accept(findsVisitor);
     if (result instanceof AbstractCustomRuleSpecification) {
       return (AbstractCustomRuleSpecification) result;
     }
   }
   return null;
 }
예제 #2
0
  private void initComponents() {
    this.setLayout(new MigLayout("align center", "[right]"));

    Element element = ruleElement.getElement();
    List<FieldMeta> fieldList = element.getFieldList();
    for (FieldMeta field : fieldList) {
      RuleItemPanel ruleItemPane = new RuleItemPanel(field, findRuleSpecification(field), edit);
      ruleItemPaneList.add(ruleItemPane);
      this.add(ruleItemPane, "wrap");
    }
  }
예제 #3
0
 public RuleElement getUpdatedRuleElement() {
   ruleElement.setRuleSpecification(getSettedRuleSpecification());
   return ruleElement;
 }