HorizontalPanel pattern = new HorizontalPanel();
pattern.add( patternLabel );
doPatternLabel();
Image changePattern = new ImageButton( "images/edit.gif",
constants.ChooseAnExistingPatternThatThisColumnAddsTo(),
new ClickListener() { //NON-NLS
public void onClick(Widget w) {
showChangePattern( w );
}
} );
pattern.add( changePattern );
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.constraintValueType ) {
case ISingleFieldConstraint.TYPE_LITERAL :
literal.setChecked( true );
break;
case ISingleFieldConstraint.TYPE_RET_VALUE :
formula.setChecked( true );
break;
case ISingleFieldConstraint.TYPE_PREDICATE :
predicate.setChecked( true );
}
literal.addClickListener( new ClickListener() {
public void onClick(Widget w) {
applyConsTypeChange( ISingleFieldConstraint.TYPE_LITERAL );
}
} );
formula.addClickListener( new ClickListener() {
public void onClick(Widget w) {
applyConsTypeChange( ISingleFieldConstraint.TYPE_RET_VALUE );
}
} );
predicate.addClickListener( new ClickListener() {
public void onClick(Widget w) {
applyConsTypeChange( ISingleFieldConstraint.TYPE_PREDICATE );
}
} );
HorizontalPanel field = new HorizontalPanel();
field.add( fieldLabel );
field.add( fieldLabelInterpolationInfo );
Image editField = new ImageButton( "images/edit.gif",
constants.EditTheFieldThatThisColumnOperatesOn(),
new ClickListener() { //NON-NLS
public void onClick(Widget w) {
showFieldChange();
}
} );
field.add( editField );
addAttribute( constants.Field(),
field );
doFieldLabel();
HorizontalPanel operator = new HorizontalPanel();
operator.add( operatorLabel );
Image editOp = new ImageButton( "images/edit.gif",
constants.EditTheOperatorThatIsUsedToCompareDataWithThisField(),
new ClickListener() { //NON-NLS
public void onClick(Widget w) {
showOperatorChange();
}