Examples of PanelInfo


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

        "  }",
        "}");
  }

  public void test_deleteColumn_deleteAlsoEmptyRows() 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();
    //
    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

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

  /**
   * Test for {@link ColumnInfo#delete()}.
   */
  public void test_columnDelete() 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.getColumns().get(1).delete();
    } finally {
      panel.endEdit();
    }
    assertEditor(
        "import com.google.gwt.user.client.ui.Button;",
        "public class Test extends Panel {",
        "  public Test() {",
View Full Code Here

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

        "  }",
        "}");
  }

  public void test_deleteRow() 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(3);",
            "      add(button, tableLayoutData);",
            "    }",
            "    {",
            "      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_deleteRow(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

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

        "  }",
        "}");
  }

  public void test_deleteRow_deleteAlsoEmptyColumns() 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();
    //
    try {
      panel.startEdit();
      layout.command_deleteRow(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

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

  //
  // MOVE COLUMN
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_MOVE_COLUMN_before() 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();
    //
    try {
      layout.startEdit();
      layout.command_MOVE_COLUMN(1, 0);
    } finally {
View Full Code Here

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

  //
  // Tests
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_parse() throws Exception {
    PanelInfo panel =
        parseJavaInfo(
            "public class Test extends Panel {",
            "  public Test() {",
            "    setLayout(new HorizontalLayout(10));",
            "    {",
            "      Label label = new Label();",
            "      add(label);",
            "    }",
            "  }",
            "}");
    assertSame(LayoutInfo.class, panel.getLayout().getClass());
    assertHierarchy(
        "{this: com.gwtext.client.widgets.Panel} {this} {/setLayout(new HorizontalLayout(10))/ /add(label)/}",
        "  {new: com.gwtext.client.widgets.layout.HorizontalLayout} {empty} {/setLayout(new HorizontalLayout(10))/}",
        "  {new: com.gwtext.client.widgets.form.Label} {local-unique: label} {/new Label()/ /add(label)/}");
  }
View Full Code Here

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

        "  }",
        "}");
  }

  public void test_MOVE_COLUMN_after() 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();
    //
    try {
      layout.startEdit();
      layout.command_MOVE_COLUMN(0, 2);
    } finally {
View Full Code Here

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

  //
  // MOVE ROW
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_MOVE_ROW_before() 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();
    //
    try {
      layout.startEdit();
      layout.command_MOVE_ROW(1, 0);
    } finally {
View Full Code Here

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

        "  }",
        "}");
  }

  public void test_MOVE_ROW_after() 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();
    //
    try {
      layout.startEdit();
      layout.command_MOVE_ROW(0, 2);
    } finally {
View Full Code Here

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

  /**
   * Test for {@link TableLayoutInfo#command_normalizeSpanning()}.<br>
   * Single control spanned on two columns.
   */
  public void test_normalizeSpanning_1() 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));",
            "    }",
            "  }",
            "}");
    panel.refresh();
    TableLayoutInfo layout = (TableLayoutInfo) panel.getLayout();
    //
    layout.command_normalizeSpanning();
    assertEditor(
        "import com.google.gwt.user.client.ui.Button;",
        "public class Test extends Panel {",
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.