////////////////////////////////////////////////////////////////////////////
/**
* Test for initializing {@link TableLayoutDataInfo}.
*/
public void test_initializeTable_noSpans() throws Exception {
PanelInfo panel =
parseJavaInfo(
"public class Test extends Panel {",
" public Test() {",
" setLayout(new TableLayout(2));",
" {",
" Label label_1 = new Label();",
" add(label_1);",
" }",
" {",
" Label label_2 = new Label();",
" add(label_2);",
" }",
" {",
" Label label_3 = new Label();",
" add(label_3);",
" }",
" }",
"}");
panel.refresh();
assertCells(panel.getChildrenWidgets().get(0), 0, 0, 1, 1);
assertCells(panel.getChildrenWidgets().get(1), 1, 0, 1, 1);
assertCells(panel.getChildrenWidgets().get(2), 0, 1, 1, 1);
// refresh() second time, just to covert double initialization, no changes expected
panel.refresh();
assertCells(panel.getChildrenWidgets().get(0), 0, 0, 1, 1);
assertCells(panel.getChildrenWidgets().get(1), 1, 0, 1, 1);
assertCells(panel.getChildrenWidgets().get(2), 0, 1, 1, 1);
}