Package com.google.gdt.eclipse.designer.model.widgets.panels.grid

Examples of com.google.gdt.eclipse.designer.model.widgets.panels.grid.HTMLTableInfo


            "    panel.setWidget(1, 1, new Button('B'));",
            "  }",
            "}");
    frame.refresh();
    assertNoErrors(frame);
    HTMLTableInfo panel = (HTMLTableInfo) frame.getChildrenWidgets().get(0);
    assertThat(panel.getColumns()).hasSize(2);
    assertThat(panel.getRows()).hasSize(2);
    // do operation
    panel.deleteColumn(0);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    Grid panel = new Grid(2, 1);",
        "    rootPanel.add(panel);",
        "    panel.setWidget(1, 0, new Button('B'));",
        "  }",
        "}");
    assertThat(panel.getColumns()).hasSize(1);
    assertThat(panel.getRows()).hasSize(2);
  }
View Full Code Here


            "    panel.setWidget(1, 1, new Button('B'));",
            "  }",
            "}");
    frame.refresh();
    assertNoErrors(frame);
    HTMLTableInfo panel = (HTMLTableInfo) frame.getChildrenWidgets().get(0);
    assertThat(panel.getColumns()).hasSize(2);
    assertThat(panel.getRows()).hasSize(2);
    // do operation
    panel.clearColumn(0);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    Grid panel = new Grid(2, 2);",
        "    rootPanel.add(panel);",
        "    panel.setWidget(1, 1, new Button('B'));",
        "  }",
        "}");
    assertThat(panel.getColumns()).hasSize(2);
    assertThat(panel.getRows()).hasSize(2);
  }
View Full Code Here

            "    rootPanel.add(panel);",
            "  }",
            "}");
    frame.refresh();
    assertNoErrors(frame);
    final HTMLTableInfo panel = getJavaInfoByName("panel");
    // do CREATE
    final WidgetInfo newButton = createButton();
    ExecutionUtils.run(panel, new RunnableEx() {
      public void run() throws Exception {
        panel.command_CREATE(newButton, 2, false, 1, false);
      }
    });
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
View Full Code Here

        "    panel.setWidget(0, 0, new Button('A'));",
        "    panel.setWidget(1, 2, new Button('B'));",
        "  }",
        "}");
    refresh();
    final HTMLTableInfo panel = getJavaInfoByName("panel");
    assertThat(panel.getColumns()).hasSize(3);
    assertThat(panel.getRows()).hasSize(2);
    // do CREATE
    final WidgetInfo newButton = createButton();
    ExecutionUtils.run(panel, new RunnableEx() {
      public void run() throws Exception {
        panel.command_CREATE(newButton, 1, true, 1, true);
      }
    });
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    Grid panel = new Grid(3, 4);",
        "    rootPanel.add(panel);",
        "    panel.setWidget(0, 0, new Button('A'));",
        "    {",
        "      Button button = new Button();",
        "      panel.setWidget(1, 1, button);",
        "    }",
        "    panel.setWidget(2, 3, new Button('B'));",
        "  }",
        "}");
    assertThat(panel.getColumns()).hasSize(4);
    assertThat(panel.getRows()).hasSize(3);
  }
View Full Code Here

            "    rootPanel.add(panel);",
            "  }",
            "}");
    frame.refresh();
    assertNoErrors(frame);
    HTMLTableInfo panel = (HTMLTableInfo) frame.getChildrenWidgets().get(0);
    assertThat(panel.getColumns()).hasSize(1);
    assertThat(panel.getRows()).hasSize(1);
    // do CREATE
    WidgetInfo newButton = createButton();
    panel.command_CREATE(newButton, 2, false, 1, false);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    Grid panel = new Grid(2, 3);",
        "    rootPanel.add(panel);",
        "    {",
        "      Button button = new Button();",
        "      panel.setWidget(1, 2, button);",
        "    }",
        "  }",
        "}");
    assertThat(panel.getColumns()).hasSize(3);
    assertThat(panel.getRows()).hasSize(2);
  }
View Full Code Here

            "    }",
            "  }",
            "}");
    frame.refresh();
    assertNoErrors(frame);
    HTMLTableInfo panel = (HTMLTableInfo) frame.getChildrenWidgets().get(0);
    assertThat(panel.getColumns()).hasSize(3);
    assertThat(panel.getRows()).hasSize(2);
    WidgetInfo button_2 = panel.getChildrenWidgets().get(1);
    // do MOVE
    panel.command_MOVE(button_2, 0, false, 0, false);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    Grid panel = new Grid(1, 2);",
        "    rootPanel.add(panel);",
        "    {",
        "      Button button_2 = new Button();",
        "      panel.setWidget(0, 0, button_2);",
        "    }",
        "    {",
        "      Button button_1 = new Button();",
        "      panel.setWidget(0, 1, button_1);",
        "    }",
        "  }",
        "}");
    assertThat(panel.getColumns()).hasSize(2);
    assertThat(panel.getRows()).hasSize(1);
  }
View Full Code Here

            "    }",
            "  }",
            "}");
    frame.refresh();
    //
    HTMLTableInfo panel = (HTMLTableInfo) frame.getChildrenWidgets().get(0);
    Class<?> classGrid = m_lastLoader.loadClass("com.google.gwt.user.client.ui.Grid");
    MorphingTargetDescription target = new MorphingTargetDescription(classGrid, null);
    MorphingSupport.morph("com.google.gwt.user.client.ui.Widget", panel, target);
    assertEditor(
        "public class Test implements EntryPoint {",
View Full Code Here

            "    panel.setWidget(0, 1, new Button('A'));",
            "  }",
            "}");
    frame.refresh();
    assertNoErrors(frame);
    final HTMLTableInfo panel = (HTMLTableInfo) frame.getChildrenWidgets().get(0);
    assertThat(panel.getColumns()).hasSize(2);
    assertThat(panel.getRows()).hasSize(1);
    assertEquals("2 1 [2] {(0,0)=(1,1) (1,0)=(1,1)}", panel.getStatus().toString());
    // do operation
    ExecutionUtils.run(frame, new RunnableEx() {
      public void run() throws Exception {
        WidgetInfo newButton = createButton();
        panel.command_CREATE(newButton, 0, false, 1, false);
      }
    });
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    FlexTable panel = new FlexTable();",
        "    rootPanel.add(panel);",
        "    panel.setWidget(0, 1, new Button('A'));",
        "    {",
        "      Button button = new Button();",
        "      panel.setWidget(1, 0, button);",
        "    }",
        "  }",
        "}");
    assertThat(panel.getColumns()).hasSize(2);
    assertThat(panel.getRows()).hasSize(2);
    assertEquals(
        "2 2 [2, 2] {(0,0)=(1,1) (1,0)=(1,1) (0,1)=(1,1) (1,1)=(1,1)}",
        panel.getStatus().toString());
  }
View Full Code Here

            "    panel.getRowFormatter().setStyleName(1, 'B');",
            "  }",
            "}");
    frame.refresh();
    assertNoErrors(frame);
    final HTMLTableInfo panel = (HTMLTableInfo) frame.getChildrenWidgets().get(0);
    assertThat(panel.getColumns()).hasSize(1);
    assertThat(panel.getRows()).hasSize(2);
    assertEquals("1 2 [1, 1] {(0,0)=(1,1) (0,1)=(1,1)}", panel.getStatus().toString());
    // do operation
    ExecutionUtils.run(frame, new RunnableEx() {
      public void run() throws Exception {
        panel.insertRow(1);
      }
    });
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    FlexTable panel = new FlexTable();",
        "    rootPanel.add(panel);",
        "    panel.setWidget(0, 0, new Button('A'));",
        "    panel.setWidget(2, 0, new Button('B'));",
        "    panel.getCellFormatter().setWidth(0, 0, '10px');",
        "    panel.getCellFormatter().setWidth(2, 0, '20px');",
        "    panel.getFlexCellFormatter().setColSpan(0, 0, 1);",
        "    panel.getFlexCellFormatter().setColSpan(2, 0, 1);",
        "    panel.getColumnFormatter().setWidth(0, '100px');",
        "    panel.getRowFormatter().setStyleName(0, 'A');",
        "    panel.getRowFormatter().setStyleName(2, 'B');",
        "  }",
        "}");
    assertThat(panel.getColumns()).hasSize(1);
    assertThat(panel.getRows()).hasSize(3);
    assertEquals(
        "1 3 [1, 1, 1] {(0,0)=(1,1) (0,1)=(1,1) (0,2)=(1,1)}",
        panel.getStatus().toString());
  }
View Full Code Here

            "    panel.getFlexCellFormatter().setRowSpan(1, 1, 2);",
            "  }",
            "}");
    frame.refresh();
    assertNoErrors(frame);
    final HTMLTableInfo panel = (HTMLTableInfo) frame.getChildrenWidgets().get(0);
    assertThat(panel.getColumns()).hasSize(3);
    assertThat(panel.getRows()).hasSize(3);
    assertEquals("3 3 [3, 3, 3] {"
        + "(0,0)=(1,1) (1,0)=(1,1) (2,0)=(1,1) "
        + "(0,1)=(1,1) (1,1)=(1,2) (2,1)=(1,1) "
        + "(0,2)=(1,1) (1,2)=(1,1) (2,2)=(1,1)}", panel.getStatus().toString());
    // do operation
    ExecutionUtils.run(frame, new RunnableEx() {
      public void run() throws Exception {
        panel.insertRow(2);
      }
    });
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    FlexTable panel = new FlexTable();",
        "    rootPanel.add(panel);",
        "    panel.setWidget(0, 0, new Button('A'));",
        "    panel.setWidget(1, 1, new Button('B'));",
        "    panel.setWidget(3, 2, new Button('C'));",
        "    panel.getFlexCellFormatter().setRowSpan(1, 1, 3);",
        "  }",
        "}");
    assertThat(panel.getColumns()).hasSize(3);
    assertThat(panel.getRows()).hasSize(4);
    assertEquals("3 4 [3, 3, 3, 3] {"
        + "(0,0)=(1,1) (1,0)=(1,1) (2,0)=(1,1) "
        + "(0,1)=(1,1) (1,1)=(1,3) (2,1)=(1,1) "
        + "(0,2)=(1,1) (1,2)=(1,1) (2,2)=(1,1) "
        + "(0,3)=(1,1) (1,3)=(1,1) (2,3)=(1,1)}", panel.getStatus().toString());
  }
View Full Code Here

TOP

Related Classes of com.google.gdt.eclipse.designer.model.widgets.panels.grid.HTMLTableInfo

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.