Package com.google.gdt.eclipse.designer.gwtext.model.layout.table

Examples of com.google.gdt.eclipse.designer.gwtext.model.layout.table.TableLayoutInfo$WidgetVisitor


            "      add(button);",
            "    }",
            "  }",
            "}");
    panel.refresh();
    TableLayoutInfo layout = (TableLayoutInfo) panel.getLayout();
    WidgetInfo button = panel.getChildrenWidgets().get(0);
    TableLayoutDataInfo tableData = TableLayoutInfo.getTableData(button);
    // check initial TableLayoutData
    {
      assertEquals(0, getInt(tableData, "x"));
      assertEquals(0, getInt(tableData, "y"));
      assertEquals(2, getInt(tableData, "width"));
      assertEquals(1, getInt(tableData, "height"));
    }
    // set horizontal span
    layout.command_setCells(button, new Rectangle(0, 0, 1, 1), true);
    assertEditor(
        "import com.google.gwt.user.client.ui.Button;",
        "public class Test extends Panel {",
        "  public Test() {",
        "    setLayout(new TableLayout(2));",
View Full Code Here


            "      add(button);",
            "    }",
            "  }",
            "}");
    panel.refresh();
    TableLayoutInfo layout = (TableLayoutInfo) panel.getLayout();
    WidgetInfo button = panel.getChildrenWidgets().get(0);
    TableLayoutDataInfo tableData = TableLayoutInfo.getTableData(button);
    // check initial TableLayoutData
    {
      assertEquals(0, getInt(tableData, "x"));
      assertEquals(0, getInt(tableData, "y"));
      assertEquals(1, getInt(tableData, "width"));
      assertEquals(1, getInt(tableData, "height"));
    }
    // set horizontal span
    layout.command_setCells(button, new Rectangle(0, 0, 1, 2), true);
    assertEditor(
        "import com.google.gwt.user.client.ui.Button;",
        "public class Test extends Panel {",
        "  public Test() {",
        "    setLayout(new TableLayout(2));",
View Full Code Here

            "      add(button);",
            "    }",
            "  }",
            "}");
    panel.refresh();
    TableLayoutInfo layout = (TableLayoutInfo) panel.getLayout();
    WidgetInfo button = panel.getChildrenWidgets().get(0);
    TableLayoutDataInfo tableData = TableLayoutInfo.getTableData(button);
    // check initial TableLayoutData
    {
      assertEquals(0, getInt(tableData, "x"));
      assertEquals(0, getInt(tableData, "y"));
      assertEquals(1, getInt(tableData, "width"));
      assertEquals(2, getInt(tableData, "height"));
    }
    // set horizontal span
    layout.command_setCells(button, new Rectangle(0, 0, 1, 1), true);
    assertEditor(
        "import com.google.gwt.user.client.ui.Button;",
        "public class Test extends Panel {",
        "  public Test() {",
        "    setLayout(new TableLayout(2));",
View Full Code Here

            "      add(button);",
            "    }",
            "  }",
            "}");
    panel.refresh();
    TableLayoutInfo layout = (TableLayoutInfo) panel.getLayout();
    WidgetInfo button = panel.getChildrenWidgets().get(2);
    //
    layout.command_setCells(button, new Rectangle(1, 0, 1, 1), true);
    assertEditor(
        "import com.google.gwt.user.client.ui.Button;",
        "public class Test extends Panel {",
        "  public Test() {",
        "    setLayout(new TableLayout(2));",
View Full Code Here

            "      add(button);",
            "    }",
            "  }",
            "}");
    panel.refresh();
    TableLayoutInfo layout = (TableLayoutInfo) panel.getLayout();
    //
    WidgetInfo newButton = createButton();
    layout.command_CREATE(newButton, 1, false, 0, false);
    assertEditor(
        "import com.google.gwt.user.client.ui.Button;",
        "public class Test extends Panel {",
        "  public Test() {",
        "    setLayout(new TableLayout(2));",
View Full Code Here

            "      add(button);",
            "    }",
            "  }",
            "}");
    panel.refresh();
    TableLayoutInfo layout = (TableLayoutInfo) panel.getLayout();
    // initial state
    {
      IGridInfo gridInfo = layout.getGridInfo();
      assertEquals(1, gridInfo.getColumnCount());
      assertEquals(1, gridInfo.getRowCount());
      assertThat(layout.getColumns()).hasSize(1);
      assertThat(layout.getRows()).hasSize(1);
    }
    // create Button
    WidgetInfo newButton = createButton();
    layout.command_CREATE(newButton, 1, false, 1, false);
    assertEditor(
        "import com.google.gwt.user.client.ui.Button;",
        "public class Test extends Panel {",
        "  public Test() {",
        "    setLayout(new TableLayout(2));",
        "    {",
        "      Button button = new Button('0');",
        "      add(button);",
        "    }",
        "    add(new Label());",
        "    add(new Label());",
        "    {",
        "      Button button = new Button();",
        "      add(button);",
        "    }",
        "  }",
        "}");
    // new state
    {
      IGridInfo gridInfo = layout.getGridInfo();
      assertEquals(2, gridInfo.getColumnCount());
      assertEquals(2, gridInfo.getRowCount());
      assertThat(layout.getColumns()).hasSize(2);
      assertThat(layout.getRows()).hasSize(2);
    }
  }
View Full Code Here

            "      add(button);",
            "    }",
            "  }",
            "}");
    panel.refresh();
    TableLayoutInfo layout = (TableLayoutInfo) panel.getLayout();
    //
    WidgetInfo newButton = createButton();
    layout.command_CREATE(newButton, 1, false, 1, true);
    assertEditor(
        "import com.google.gwt.user.client.ui.Button;",
        "public class Test extends Panel {",
        "  public Test() {",
        "    setLayout(new TableLayout(2));",
View Full Code Here

            "      add(button);",
            "    }",
            "  }",
            "}");
    panel.refresh();
    TableLayoutInfo layout = (TableLayoutInfo) panel.getLayout();
    //
    WidgetInfo newButton = createButton();
    layout.command_CREATE(newButton, 1, true, 0, false);
    assertEditor(
        "import com.google.gwt.user.client.ui.Button;",
        "public class Test extends Panel {",
        "  public Test() {",
        "    setLayout(new TableLayout(3));",
View Full Code Here

            "      add(button);",
            "    }",
            "  }",
            "}");
    panel.refresh();
    TableLayoutInfo layout = (TableLayoutInfo) panel.getLayout();
    //
    WidgetInfo newButton = createButton();
    layout.command_CREATE(newButton, 0, true, 0, true);
    assertEditor(
        "import com.google.gwt.user.client.ui.Button;",
        "public class Test extends Panel {",
        "  public Test() {",
        "    setLayout(new TableLayout(2));",
View Full Code Here

            "      add(button);",
            "    }",
            "  }",
            "}");
    panel.refresh();
    TableLayoutInfo layout = (TableLayoutInfo) panel.getLayout();
    //
    WidgetInfo newButton = createButton();
    layout.command_CREATE(newButton, 0, false, 2, false);
    assertEditor(
        "import com.google.gwt.user.client.ui.Button;",
        "public class Test extends Panel {",
        "  public Test() {",
        "    setLayout(new TableLayout(1));",
View Full Code Here

TOP

Related Classes of com.google.gdt.eclipse.designer.gwtext.model.layout.table.TableLayoutInfo$WidgetVisitor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.