" panel.getFlexCellFormatter().setColSpan(1, 1, 3);",
" }",
"}");
frame.refresh();
assertNoErrors(frame);
final HTMLTableInfo panel = (HTMLTableInfo) frame.getChildrenWidgets().get(0);
assertThat(panel.getColumns()).hasSize(4);
assertThat(panel.getRows()).hasSize(3);
assertEquals("4 3 [4, 2, 4] {"
+ "(0,0)=(1,1) (1,0)=(1,1) (2,0)=(1,1) (3,0)=(1,1) "
+ "(0,1)=(1,1) (1,1)=(3,1) "
+ "(0,2)=(1,1) (1,2)=(1,1) (2,2)=(1,1) (3,2)=(1,1)}", panel.getStatus().toString());
// do operation
ExecutionUtils.run(frame, new RunnableEx() {
public void run() throws Exception {
panel.deleteColumn(2);
}
});
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'));",
" panel.setWidget(1, 1, new Button('B'));",
" panel.setWidget(2, 2, new Button('C'));",
" panel.getFlexCellFormatter().setColSpan(1, 1, 2);",
" }",
"}");
assertThat(panel.getColumns()).hasSize(3);
assertThat(panel.getRows()).hasSize(3);
assertEquals("3 3 [3, 2, 3] {"
+ "(0,0)=(1,1) (1,0)=(1,1) (2,0)=(1,1) "
+ "(0,1)=(1,1) (1,1)=(2,1) "
+ "(0,2)=(1,1) (1,2)=(1,1) (2,2)=(1,1)}", panel.getStatus().toString());
}