addAttribute( constants.Pattern(),
pattern );
// now a radio button with the type
RadioButton literal = new RadioButton( "constraintValueType",
constants.LiteralValue() );// NON-NLS
RadioButton formula = new RadioButton( "constraintValueType",
constants.Formula() ); // NON-NLS
RadioButton predicate = new RadioButton( "constraintValueType",
constants.Predicate() ); // NON-NLS
HorizontalPanel valueTypes = new HorizontalPanel();
valueTypes.add( literal );
valueTypes.add( formula );
valueTypes.add( predicate );
addAttribute( constants.CalculationType(),
valueTypes );
switch ( editingCol.getConstraintValueType() ) {
case BaseSingleFieldConstraint.TYPE_LITERAL :
literal.setValue( true );
break;
case BaseSingleFieldConstraint.TYPE_RET_VALUE :
formula.setValue( true );
break;
case BaseSingleFieldConstraint.TYPE_PREDICATE :
predicate.setValue( true );
}
literal.addClickHandler( new ClickHandler() {
public void onClick(ClickEvent w) {
editingCol.setFactField( null );
applyConsTypeChange( BaseSingleFieldConstraint.TYPE_LITERAL );
}
} );
formula.addClickHandler( new ClickHandler() {
public void onClick(ClickEvent w) {
editingCol.setFactField( null );
applyConsTypeChange( BaseSingleFieldConstraint.TYPE_RET_VALUE );
}
} );
predicate.addClickHandler( new ClickHandler() {
public void onClick(ClickEvent w) {
editingCol.setFactField( null );
applyConsTypeChange( BaseSingleFieldConstraint.TYPE_PREDICATE );
}
} );