private boolean isTemplateKey(final FieldConstraint nestedConstr) { return nestedConstr instanceof BaseSingleFieldConstraint && ((BaseSingleFieldConstraint) nestedConstr).getConstraintValueType() == BaseSingleFieldConstraint.TYPE_TEMPLATE; }
public void refresh() { panel.clear(); constraintWidget = null; //Expressions' fieldName and hence fieldType can change without creating a new ConstraintValueEditor. //SingleFieldConstraints and their ConnectiveConstraints cannot have the fieldName or fieldType changed //without first deleting and re-creating. if (this.constraint instanceof SingleFieldConstraintEBLeftSide) { setUpSingleFieldConstraintEBLeftSide((SingleFieldConstraintEBLeftSide) this.constraint); } //Show an editor for the constraint value type if (constraint.getConstraintValueType() == SingleFieldConstraint.TYPE_UNDEFINED) { addAddConstraintButton(); } else { addConstraintWidget(); } panel.add(constraintWidget); }
public void refresh() { panel.clear(); constraintWidget = null; //Expressions' fieldName and hence fieldType can change without creating a new ConstraintValueEditor. //SingleFieldConstraints and their ConnectiveConstraints cannot have the fieldName or fieldType changed //without first deleting and re-creating. if (this.constraint instanceof SingleFieldConstraintEBLeftSide) { setUpSingleFieldConstraintEBLeftSide((SingleFieldConstraintEBLeftSide) this.constraint); } //Show an editor for the constraint value type if (constraint.getConstraintValueType() == SingleFieldConstraint.TYPE_UNDEFINED) { addAddConstraintButton(); } else { addConstraintWidget(); } panel.add(constraintWidget); }
private void addConstraintWidget() { switch (constraint.getConstraintValueType()) { case SingleFieldConstraint.TYPE_LITERAL: case SingleFieldConstraint.TYPE_ENUM: constraintWidget = wrap(literalEditor()); break; case SingleFieldConstraint.TYPE_RET_VALUE: constraintWidget = wrap(returnValueEditor()); break; case SingleFieldConstraint.TYPE_EXPR_BUILDER_VALUE: constraintWidget = wrap(expressionEditor()); break; case SingleFieldConstraint.TYPE_VARIABLE: constraintWidget = wrap(variableEditor()); break; case BaseSingleFieldConstraint.TYPE_TEMPLATE: constraintWidget = wrap(templateKeyEditor()); break; default: break; } }
private void addConstraintWidget() { switch (constraint.getConstraintValueType()) { case SingleFieldConstraint.TYPE_LITERAL: case SingleFieldConstraint.TYPE_ENUM: constraintWidget = wrap(literalEditor()); break; case SingleFieldConstraint.TYPE_RET_VALUE: constraintWidget = wrap(returnValueEditor()); break; case SingleFieldConstraint.TYPE_EXPR_BUILDER_VALUE: constraintWidget = wrap(expressionEditor()); break; case SingleFieldConstraint.TYPE_VARIABLE: constraintWidget = wrap(variableEditor()); break; case BaseSingleFieldConstraint.TYPE_TEMPLATE: constraintWidget = wrap(templateKeyEditor()); break; default: break; } }