Examples of PanelInfo


Examples of com.google.gdt.eclipse.designer.gwtext.model.widgets.PanelInfo

  /**
   * When we delete column, we should keep at least one column.
   */
  public void test_delete_keepOneColumn() throws Exception {
    PanelInfo panel =
        parseJavaInfo(
            "import com.google.gwt.user.client.ui.Button;",
            "public class Test extends Panel {",
            "  public Test() {",
            "    setLayout(new TableLayout(1));",
            "    {",
            "      Button button = new Button('0');",
            "      add(button);",
            "    }",
            "  }",
            "}");
    panel.refresh();
    WidgetInfo button = panel.getChildrenWidgets().get(0);
    //
    button.delete();
    assertEditor(
        "import com.google.gwt.user.client.ui.Button;",
        "public class Test extends Panel {",
View Full Code Here

Examples of com.google.gdt.eclipse.designer.gwtext.model.widgets.PanelInfo

        "  }",
        "}");
  }

  public void test_delete_removeEmptyDimensions() throws Exception {
    PanelInfo panel =
        parseJavaInfo(
            "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());",
            "    add(new Label());",
            "    add(new Label());",
            "    {",
            "      Button button = new Button('1');",
            "      add(button);",
            "    }",
            "  }",
            "}");
    panel.refresh();
    WidgetInfo button = panel.getChildrenWidgets().get(5);
    // check initial location
    {
      TableLayoutDataInfo tableData = TableLayoutInfo.getTableData(button);
      assertEquals(1, getInt(tableData, "x"));
      assertEquals(2, getInt(tableData, "y"));
View Full Code Here

Examples of com.google.gdt.eclipse.designer.gwtext.model.widgets.PanelInfo

  //
  // CREATE
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_CREATE_inEmptyCell() throws Exception {
    PanelInfo panel =
        parseJavaInfo(
            "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('1');",
            "      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;",
View Full Code Here

Examples of com.google.gdt.eclipse.designer.gwtext.model.widgets.PanelInfo

        "  }",
        "}");
  }

  public void test_CREATE_refreshIntervals() throws Exception {
    PanelInfo panel =
        parseJavaInfo(
            "import com.google.gwt.user.client.ui.Button;",
            "public class Test extends Panel {",
            "  public Test() {",
            "    setLayout(new TableLayout(1));",
            "    {",
            "      Button button = new Button('0');",
            "      add(button);",
            "    }",
            "  }",
            "}");
    panel.refresh();
    TableLayoutInfo layout = (TableLayoutInfo) panel.getLayout();
    // initial state
    {
      IGridInfo gridInfo = layout.getGridInfo();
      assertEquals(1, gridInfo.getColumnCount());
      assertEquals(1, gridInfo.getRowCount());
View Full Code Here

Examples of com.google.gdt.eclipse.designer.gwtext.model.widgets.PanelInfo

      assertThat(layout.getRows()).hasSize(2);
    }
  }

  public void test_CREATE_insertRow() throws Exception {
    PanelInfo panel =
        parseJavaInfo(
            "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('A'));",
            "    add(new Label('B'));",
            "    {",
            "      Button button = new Button('1');",
            "      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;",
View Full Code Here

Examples of com.google.gdt.eclipse.designer.gwtext.model.widgets.PanelInfo

        "  }",
        "}");
  }

  public void test_CREATE_insertColumn() throws Exception {
    PanelInfo panel =
        parseJavaInfo(
            "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('A'));",
            "    add(new Label('B'));",
            "    {",
            "      Button button = new Button('1');",
            "      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;",
View Full Code Here

Examples of com.google.gdt.eclipse.designer.gwtext.model.widgets.PanelInfo

        "  }",
        "}");
  }

  public void test_CREATE_insertColumnRow() throws Exception {
    PanelInfo panel =
        parseJavaInfo(
            "import com.google.gwt.user.client.ui.Button;",
            "public class Test extends Panel {",
            "  public Test() {",
            "    setLayout(new TableLayout(1));",
            "    {",
            "      Button button = new Button('0');",
            "      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;",
View Full Code Here

Examples of com.google.gdt.eclipse.designer.gwtext.model.widgets.PanelInfo

        "  }",
        "}");
  }

  public void test_CREATE_appendRow() throws Exception {
    PanelInfo panel =
        parseJavaInfo(
            "import com.google.gwt.user.client.ui.Button;",
            "public class Test extends Panel {",
            "  public Test() {",
            "    setLayout(new TableLayout(1));",
            "    {",
            "      Button button = new Button('0');",
            "      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;",
View Full Code Here

Examples of com.google.gdt.eclipse.designer.gwtext.model.widgets.PanelInfo

        "  }",
        "}");
  }

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

Examples of com.google.gdt.eclipse.designer.gwtext.model.widgets.PanelInfo

        "  }",
        "}");
  }

  public void test_CREATE_appendColumnRow() throws Exception {
    PanelInfo panel =
        parseJavaInfo(
            "import com.google.gwt.user.client.ui.Button;",
            "public class Test extends Panel {",
            "  public Test() {",
            "    setLayout(new TableLayout(1));",
            "    {",
            "      Button button = new Button('0');",
            "      add(button);",
            "    }",
            "  }",
            "}");
    panel.refresh();
    TableLayoutInfo layout = (TableLayoutInfo) panel.getLayout();
    //
    WidgetInfo newButton = createButton();
    layout.command_CREATE(newButton, 1, false, 1, false);
    assertEditor(
        "import com.google.gwt.user.client.ui.Button;",
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.