* Do all the widgets for the RHS.
*/
private void renderRhs(final RuleModel model) {
for ( int i = 0; i < model.rhs.length; i++ ) {
DirtyableVerticalPane widget = new DirtyableVerticalPane();
widget.setWidth( "100%" );
IAction action = model.rhs[i];
//if lockRHS() set the widget RO, otherwise let them decide.
Boolean readOnly = this.lockRHS() ? true : null;
RuleModellerWidget w = getWidgetFactory().getWidget( this,
action,
readOnly );
w.addOnModifiedCommand( this.onWidgetModifiedCommand );
w.setWidth( "100%" );
widget.add( spacerWidget() );
DirtyableHorizontalPane horiz = new DirtyableHorizontalPane();
horiz.setWidth( "100%" );
//horiz.setBorderWidth(2);
Image remove = new ImageButton( images.deleteItemSmall() );
remove.setTitle( constants.RemoveThisAction() );
final int idx = i;
remove.addClickHandler( new ClickHandler() {
public void onClick(ClickEvent event) {
if ( Window.confirm( constants.RemoveThisItem() ) ) {
model.removeRhsItem( idx );
refreshWidget();
}
}
} );
horiz.add( w );
if ( !(w instanceof ActionRetractFactWidget) ) {
w.setWidth( "100%" ); //NON-NLS
horiz.setWidth( "100%" );
}
if ( !(this.lockRHS() || w.isReadOnly()) ) {
horiz.add( remove );
}
widget.add( horiz );
layout.setHTML( currentLayoutRow,
0,
"<div class='form-field'>" + (i + 1) + ".</div>" );
layout.getFlexCellFormatter().setHorizontalAlignment( currentLayoutRow,