t.getFlexCellFormatter().setColSpan( 0,
0,
2 );
FieldConstraint[] nested = constraint.constraints;
DirtyableFlexTable inner = new DirtyableFlexTable();
inner.setStyleName( "modeller-inner-nested-Constraints" ); //NON-NLS
if ( nested != null ) {
for ( int i = 0; i < nested.length; i++ ) {
this.renderFieldConstraint( inner,
i,
nested[i],
false,
0 );
//add in remove icon here...
final int currentRow = i;
Image clear = new ImageButton( images.deleteItemSmall() );
clear.setTitle( constants.RemoveThisNestedRestriction() );
clear.addClickHandler( new ClickHandler() {
public void onClick(ClickEvent event) {
if ( Window.confirm( constants.RemoveThisItemFromNestedConstraint() ) ) {
setModified( true );
constraint.removeConstraint( currentRow );
getModeller().refreshWidget();
}
}
} );
if ( !this.readOnly ) {
//This used to be 5 and Connectives were not rendered
inner.setWidget( i,
6,
clear );
}
}
}