" panel.setWidget(1, 2, new Button('B'));",
" }",
"}");
frame.refresh();
assertNoErrors(frame);
final HTMLTableInfo panel = (HTMLTableInfo) frame.getChildrenWidgets().get(0);
assertThat(panel.getColumns()).hasSize(3);
assertThat(panel.getRows()).hasSize(2);
assertEquals("3 2 [3, 3] {"
+ "(0,0)=(1,1) (1,0)=(1,1) (2,0)=(1,1) "
+ "(0,1)=(1,1) (1,1)=(1,1) (2,1)=(1,1)}", panel.getStatus().toString());
// do CREATE
ExecutionUtils.run(frame, new RunnableEx() {
public void run() throws Exception {
WidgetInfo newButton = createButton();
panel.command_CREATE(newButton, 1, true, 1, true);
}
});
assertEditor(
"public class Test implements EntryPoint {",
" public void onModuleLoad() {",
" RootPanel rootPanel = RootPanel.get();",
" FlexTable panel = new FlexTable();",
" rootPanel.add(panel);",
" panel.setWidget(0, 0, new Button('A'));",
" {",
" Button button = new Button();",
" panel.setWidget(1, 1, button);",
" }",
" panel.setWidget(2, 3, new Button('B'));",
" }",
"}");
assertThat(panel.getColumns()).hasSize(4);
assertThat(panel.getRows()).hasSize(3);
assertEquals("4 3 [4, 4, 4] {"
+ "(0,0)=(1,1) (1,0)=(1,1) (2,0)=(1,1) (3,0)=(1,1) "
+ "(0,1)=(1,1) (1,1)=(1,1) (2,1)=(1,1) (3,1)=(1,1) "
+ "(0,2)=(1,1) (1,2)=(1,1) (2,2)=(1,1) (3,2)=(1,1)}", panel.getStatus().toString());
}