GWT Designer considers FlexTable.cellSpacing and .cellPadding to be 0 by default if they are not defined, however this is not true (at least in IE).
Consider the below example, if you uncomment the two settings, you will have different result.
I suggest allowing GWT designer to have both values to be 'null/empty' by default, unless explicitly typed 0, which would be treated as non-default int, and code would reflect that.
Many thanks.
- Code: Select all
public class Spacing extends Composite {
public Spacing() {
final FlexTable flexTable = new FlexTable();
initWidget(flexTable);
//They must be explicitly defined
// flexTable.setCellPadding(0);
// flexTable.setCellSpacing(0);
//background is red
flexTable.setStyleName("mytable");
flexTable.setSize("500", "500");
final Image image = new Image();
flexTable.setWidget(0, 0, image);
flexTable.getCellFormatter().setVerticalAlignment(0, 0, HasVerticalAlignment.ALIGN_BOTTOM);
flexTable.getCellFormatter().setHorizontalAlignment(0, 0, HasHorizontalAlignment.ALIGN_RIGHT);
flexTable.getCellFormatter().setHeight(0, 0, "100%");
flexTable.getCellFormatter().setWidth(0, 0, "100%");
setSize("500", "500");
image.setUrl("small.jpg");
}
}