} );
pop.addAttribute( GuidedDecisionTableConstants.INSTANCE.Binding(),
binding );
//Patterns can be negated, i.e. "not Pattern(...)"
final CheckBox chkNegated = new CheckBox();
chkNegated.addClickHandler( new ClickHandler() {
public void onClick( ClickEvent event ) {
boolean isPatternNegated = chkNegated.getValue();
binding.setEnabled( !isPatternNegated );
}
} );
pop.addAttribute( GuidedDecisionTableConstants.INSTANCE.negatePattern(),
chkNegated );
Button ok = new Button( GuidedDecisionTableConstants.INSTANCE.OK() );
ok.addClickHandler( new ClickHandler() {
public void onClick( ClickEvent w ) {
boolean isPatternNegated = chkNegated.getValue();
String ft = types.getItemText( types.getSelectedIndex() );
String fn = isPatternNegated ? "" : binding.getText();
if ( !isPatternNegated ) {
if ( fn.equals( "" ) ) {
Window.alert( GuidedDecisionTableConstants.INSTANCE.PleaseEnterANameForFact() );