Examples of PanelInfo


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

        "  }",
        "}");
  }

  public void test_CREATE_insertColumnHorizontalSpan() 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, new TableLayoutData(2));",
            "    }",
            "    {",
            "      Button button = new Button('1');",
            "      add(button);",
            "    }",
            "    {",
            "      Button button = new Button('2');",
            "      add(button);",
            "    }",
            "  }",
            "}");
    panel.refresh();
    TableLayoutInfo layout = (TableLayoutInfo) panel.getLayout();
    //
    WidgetInfo newButton = createButton();
    layout.command_CREATE(newButton, 1, true, 1, 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_insertRowVerticalSpan() 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');",
            "      TableLayoutData tableLayoutData = new TableLayoutData(1);",
            "      tableLayoutData.setRowspan(2);",
            "      add(button, tableLayoutData);",
            "    }",
            "    {",
            "      Button button = new Button('1');",
            "      add(button);",
            "    }",
            "    {",
            "      Button button = new Button('2');",
            "      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

  /**
   * Test for parsing "not balanced" {@link TableLayoutInfo} and adding into <code>null</code> cell.
   */
  public void test_CREATE_notBalanced() throws Exception {
    PanelInfo panel =
        parseJavaInfo(
            "import com.google.gwt.user.client.ui.Button;",
            "public class Test extends Panel {",
            "  public Test() {",
            "    setLayout(new TableLayout(2));",
            "    add(new Label());",
            "    add(new Label());",
            "    add(new Label());",
            "  }",
            "}");
    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

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

        "  }",
        "}");
  }

  public void test_CREATE_noReference() throws Exception {
    PanelInfo panel =
        parseJavaInfo(
            "import com.google.gwt.user.client.ui.Button;",
            "public class Test extends Panel {",
            "  public Test() {",
            "    setLayout(new TableLayout(1));",
            "  }",
            "}");
    panel.refresh();
    TableLayoutInfo layout = (TableLayoutInfo) panel.getLayout();
    //
    WidgetInfo newButton = createButton();
    layout.command_CREATE(newButton, 0, 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_1x1() throws Exception {
    PanelInfo panel =
        parseJavaInfo(
            "import com.google.gwt.user.client.ui.Button;",
            "public class Test extends Panel {",
            "  public Test() {",
            "    setLayout(new TableLayout(1));",
            "  }",
            "}");
    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

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

  //
  // Dimension operations
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_columnAccess() throws Exception {
    PanelInfo panel =
        parseJavaInfo(
            "public class Test extends Panel {",
            "  public Test() {",
            "    setLayout(new TableLayout(2));",
            "    {",
            "      Label label_1 = new Label('A');",
            "      add(label_1);",
            "    }",
            "    {",
            "      Label label_2 = new Label('A');",
            "      add(label_2);",
            "    }",
            "    {",
            "      Label label_3 = new Label('A');",
            "      add(label_3);",
            "    }",
            "  }",
            "}");
    panel.refresh();
    TableLayoutInfo layout = (TableLayoutInfo) panel.getLayout();
    //
    List<ColumnInfo> columns = layout.getColumns();
    assertThat(columns).hasSize(2);
    {
      ColumnInfo column = columns.get(0);
View Full Code Here

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

      assertFalse(column.isEmpty());
    }
  }

  public void test_columnAccess_isEmpty() throws Exception {
    PanelInfo panel =
        parseJavaInfo(
            "public class Test extends Panel {",
            "  public Test() {",
            "    setLayout(new TableLayout(2));",
            "    {",
            "      Button button = new Button();",
            "      add(button);",
            "    }",
            "    add(new Label());",
            "  }",
            "}");
    panel.refresh();
    TableLayoutInfo layout = (TableLayoutInfo) panel.getLayout();
    //
    List<ColumnInfo> columns = layout.getColumns();
    assertThat(columns).hasSize(2);
    {
      ColumnInfo column = columns.get(0);
View Full Code Here

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

      assertTrue(column.isEmpty());
    }
  }

  public void test_rowAccess() throws Exception {
    PanelInfo panel =
        parseJavaInfo(
            "public class Test extends Panel {",
            "  public Test() {",
            "    setLayout(new TableLayout(1));",
            "    {",
            "      Label label_1 = new Label('A');",
            "      add(label_1);",
            "    }",
            "    {",
            "      Label label_2 = new Label('A');",
            "      add(label_2);",
            "    }",
            "  }",
            "}");
    panel.refresh();
    TableLayoutInfo layout = (TableLayoutInfo) panel.getLayout();
    //
    List<RowInfo> rows = layout.getRows();
    assertThat(rows).hasSize(2);
    {
      RowInfo row = rows.get(0);
View Full Code Here

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

      assertFalse(row.isEmpty());
    }
  }

  public void test_rowAccess_isEmpty() throws Exception {
    PanelInfo panel =
        parseJavaInfo(
            "public class Test extends Panel {",
            "  public Test() {",
            "    setLayout(new TableLayout(1));",
            "    {",
            "      Button button = new Button();",
            "      add(button);",
            "    }",
            "    add(new Label());",
            "  }",
            "}");
    panel.refresh();
    TableLayoutInfo layout = (TableLayoutInfo) panel.getLayout();
    //
    List<RowInfo> rows = layout.getRows();
    assertThat(rows).hasSize(2);
    {
      RowInfo row = rows.get(0);
View Full Code Here

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

      assertTrue(row.isEmpty());
    }
  }

  public void test_deleteColumn() throws Exception {
    PanelInfo panel =
        parseJavaInfo(
            "import com.google.gwt.user.client.ui.Button;",
            "public class Test extends Panel {",
            "  public Test() {",
            "    setLayout(new TableLayout(3));",
            "    {",
            "      Button button = new Button('0');",
            "      add(button, new TableLayoutData(3));",
            "    }",
            "    {",
            "      Button button = new Button('1');",
            "      add(button);",
            "    }",
            "    {",
            "      Button button = new Button('2');",
            "      add(button);",
            "    }",
            "    {",
            "      Button button = new Button('3');",
            "      add(button);",
            "    }",
            "  }",
            "}");
    panel.refresh();
    TableLayoutInfo layout = (TableLayoutInfo) panel.getLayout();
    //
    try {
      panel.startEdit();
      layout.command_deleteColumn(1, true);
    } finally {
      panel.endEdit();
    }
    assertEditor(
        "import com.google.gwt.user.client.ui.Button;",
        "public class Test extends Panel {",
        "  public Test() {",
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.