" }",
"}");
refresh();
//
WidgetInfo button = panel.getChildrenWidgets().get(0);
CellConstraintsSupport constraints = HTMLTableInfo.getConstraints(button);
// FILL initially
{
ColumnInfo.Alignment alignment = constraints.getHorizontalAlignment();
assertSame(ColumnInfo.Alignment.FILL, alignment);
// check properties
assertNotNull(alignment.getSmallImage());
assertNotNull(alignment.getMenuImage());
assertEquals("N/A", alignment.getAlignmentField());
assertEquals("N/A", alignment.getAlignmentString());
}
// set RIGHT, removes "width=100%"
setHorizontalAlignment(button, ColumnInfo.Alignment.RIGHT);
assertEditor(
"public class Test extends FlexTable {",
" public Test() {",
" Button button = new Button('A');",
" setWidget(0, 0, button);",
" getCellFormatter().setHorizontalAlignment(0, 0, HasHorizontalAlignment.ALIGN_RIGHT);",
" }",
"}");
// set "width=150px" and LEFT, keep "width=150px"
button.getSizeSupport().setSize("150px", null);
setHorizontalAlignment(button, ColumnInfo.Alignment.LEFT);
assertEditor(
"public class Test extends FlexTable {",
" public Test() {",
" Button button = new Button('A');",
" setWidget(0, 0, button);",
" button.setWidth('150px');",
" getCellFormatter().setHorizontalAlignment(0, 0, HasHorizontalAlignment.ALIGN_LEFT);",
" }",
"}");
// set FILL
setHorizontalAlignment(button, ColumnInfo.Alignment.FILL);
assertSame(ColumnInfo.Alignment.FILL, constraints.getHorizontalAlignment());
assertEditor(
"public class Test extends FlexTable {",
" public Test() {",
" Button button = new Button('A');",
" setWidget(0, 0, button);",