*/
public void initWidget() {
layout.removeAllRows();
currentLayoutRow = 0;
Image addPattern = GuidedRuleEditorImages508.INSTANCE.NewItem();
addPattern.setTitle( Constants.INSTANCE.AddAConditionToThisRule() );
addPattern.addClickHandler( new ClickHandler() {
public void onClick( ClickEvent event ) {
showConditionSelector( null );
}
} );
layout.getColumnFormatter().setWidth( 0,
"20px" );
layout.getColumnFormatter().setWidth( 1,
"20px" );
layout.getColumnFormatter().setWidth( 2,
"48px" );
layout.getColumnFormatter().setWidth( 4,
"64px" );
if ( this.showLHS() ) {
layout.setWidget( currentLayoutRow,
0,
new SmallLabel( "<b>" + Constants.INSTANCE.WHEN() + "</b>" ) );
layout.getFlexCellFormatter().setColSpan( currentLayoutRow,
0,
4 );
if ( !lockLHS() ) {
layout.setWidget( currentLayoutRow,
1,
addPattern );
}
currentLayoutRow++;
renderLhs( this.model );
}
if ( this.showRHS() ) {
layout.setWidget( currentLayoutRow,
0,
new SmallLabel( "<b>" + Constants.INSTANCE.THEN() + "</b>" ) );
layout.getFlexCellFormatter().setColSpan( currentLayoutRow,
0,
4 );
Image addAction = GuidedRuleEditorImages508.INSTANCE.NewItem();
addAction.setTitle( Constants.INSTANCE.AddAnActionToThisRule() );
addAction.addClickHandler( new ClickHandler() {
public void onClick( ClickEvent event ) {
showActionSelector( (Widget) event.getSource(),
null );
}