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

Examples of com.google.gdt.eclipse.designer.model.widgets.panels.ComplexPanelInfo


            "      }",
            "    }",
            "  }",
            "}");
    frame.refresh();
    ComplexPanelInfo panel = (ComplexPanelInfo) frame.getChildrenWidgets().get(0);
    WidgetInfo button_1 = panel.getChildrenWidgets().get(0);
    WidgetInfo button_2 = panel.getChildrenWidgets().get(1);
    // move "button"
    frame.startEdit();
    panel.command_MOVE2(button_2, button_1);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    {",
View Full Code Here


    assertEquals(2, ScriptUtils.evaluate("getColumnCount()", dataGrid.getObject()));
    assertEquals(5, ScriptUtils.evaluate("getRowCount()", dataGrid.getObject()));
  }

  public void test_createDataGrid() throws Exception {
    ComplexPanelInfo panel =
        parseJavaInfo(
            "// filler filler filler filler filler",
            "// filler filler filler filler filler",
            "public class Test extends FlowPanel {",
            "  public Test() {",
View Full Code Here

            "      rootPanel.add(button);",
            "    }",
            "  }",
            "}");
    frame.refresh();
    ComplexPanelInfo panel = (ComplexPanelInfo) frame.getChildrenWidgets().get(0);
    WidgetInfo button = frame.getChildrenWidgets().get(1);
    // move "button"
    frame.startEdit();
    panel.command_MOVE2(button, null);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    {",
View Full Code Here

        "  }",
        "}");
  }

  public void test_clipboard() throws Exception {
    final ComplexPanelInfo panel =
        parseJavaInfo(
            "public class Test extends FlowPanel {",
            "  public Test() {",
            "    {",
            "      DataGrid<User> grid = new DataGrid<User>();",
View Full Code Here

    refresh();
    assertNoErrors(m_lastParseInfo);
  }

  public void test_create() throws Exception {
    ComplexPanelInfo panel =
        parseJavaInfo(
            "// filler filler filler filler filler",
            "// filler filler filler filler filler",
            "public class Test extends FlowPanel {",
            "  public Test() {",
            "  }",
            "}");
    panel.refresh();
    // do create
    {
      CellListInfo cellList = createJavaInfo("com.google.gwt.user.cellview.client.CellList");
      cellList.putTemplateArgument("rowType", "test.client.User");
      flowContainer_CREATE(panel, cellList, null);
View Full Code Here

                + " xmlns:g='urn:import:com.google.gwt.user.client.ui'>",
            "<g:FlowPanel width='100px'/>",
            "</ui:UiBinder>"));
    waitForAutoBuild();
    // parse
    ComplexPanelInfo panel =
        parseJavaInfo(
            "public class Test extends FlowPanel {",
            "  public Test() {",
            "    MyComponent component = new MyComponent();",
            "    add(component);",
            "  }",
            "}");
    refresh();
    WidgetInfo component = getJavaInfoByName("component");
    // initially "100px"
    assertThat(component.getBounds().width).isEqualTo(100);
    // initially no refresh required
    {
      EditorActivatedRequest request = new EditorActivatedRequest();
      panel.getBroadcast(EditorActivatedListener.class).invoke(request);
      assertFalse(request.isReparseRequested());
      assertFalse(request.isRefreshRequested());
    }
    // update UiBinder template
    setFileContentSrc(
        "test/client/MyComponent.ui.xml",
        getSourceDQ(
            "<ui:UiBinder"
                + " xmlns:ui='urn:ui:com.google.gwt.uibinder'"
                + " xmlns:g='urn:import:com.google.gwt.user.client.ui'>",
            "<g:FlowPanel width='200px'/>",
            "</ui:UiBinder>"));
    waitForAutoBuild();
    // now reparse required
    {
      EditorActivatedRequest request = new EditorActivatedRequest();
      panel.getBroadcast(EditorActivatedListener.class).invoke(request);
      assertTrue(request.isReparseRequested());
      assertFalse(request.isRefreshRequested());
    }
  }
View Full Code Here

            "    add(new MyComponent());",
            "  }",
            "}"));
    waitForAutoBuild();
    // parse
    ComplexPanelInfo panel =
        parseJavaInfo(
            "public class Test extends FlowPanel {",
            "  public Test() {",
            "    MyComponent2 component = new MyComponent2();",
            "    add(component);",
            "  }",
            "}");
    refresh();
    WidgetInfo component = getJavaInfoByName("component");
    // initially "100px"
    assertThat(component.getBounds().width).isEqualTo(100);
    // initially no refresh required
    {
      EditorActivatedRequest request = new EditorActivatedRequest();
      panel.getBroadcast(EditorActivatedListener.class).invoke(request);
      assertFalse(request.isReparseRequested());
      assertFalse(request.isRefreshRequested());
    }
    // update UiBinder template
    setFileContentSrc(
        "test/client/MyComponent.ui.xml",
        getSourceDQ(
            "<ui:UiBinder"
                + " xmlns:ui='urn:ui:com.google.gwt.uibinder'"
                + " xmlns:g='urn:import:com.google.gwt.user.client.ui'>",
            "<g:FlowPanel width='200px'/>",
            "</ui:UiBinder>"));
    waitForAutoBuild();
    // now reparse required
    {
      EditorActivatedRequest request = new EditorActivatedRequest();
      panel.getBroadcast(EditorActivatedListener.class).invoke(request);
      assertTrue(request.isReparseRequested());
      assertFalse(request.isRefreshRequested());
    }
  }
View Full Code Here

  //
  // Tests
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_CREATE() throws Exception {
    ComplexPanelInfo panel =
        parseJavaInfo(
            "// filler filler filler filler filler",
            "public class Test extends FlowPanel {",
            "  public Test() {",
            "  }",
            "}");
    panel.refresh();
    //
    WidgetInfo newButton = createWidget("com.google.gwt.widget.client.TextButton");
    flowContainer_CREATE(panel, newButton, null);
    assertEditor(
        "import com.google.gwt.widget.client.TextButton;",
View Full Code Here

  /**
   * Test for {@link GridInfo#command_CREATE(ColumnConfigInfo, ColumnConfigInfo)}.
   */
  public void test_columns_CREATE_asArray() throws Exception {
    ComplexPanelInfo panel =
        parseJavaInfo(
            "import java.util.Arrays;",
            "import com.extjs.gxt.ui.client.store.*;",
            "import com.extjs.gxt.ui.client.widget.grid.*;",
            "public class Test extends com.google.gwt.user.client.ui.HorizontalPanel {",
            "  public Test() {",
            "    {",
            "      ColumnConfig column_1 = new ColumnConfig();",
            "      Grid grid = new Grid(new ListStore(), new ColumnModel(Arrays.asList(column_1)));",
            "      add(grid);",
            "    }",
            "  }",
            "}");
    panel.refresh();
    GridInfo grid = getJavaInfoByName("grid");
    ColumnConfigInfo column_1 = getJavaInfoByName("column_1");
    //
    ColumnConfigInfo newColumn = createJavaInfo("com.extjs.gxt.ui.client.widget.grid.ColumnConfig");
    grid.command_CREATE(newColumn, column_1);
View Full Code Here

  /**
   * Test for {@link GridInfo#command_MOVE(ColumnConfigInfo, ColumnConfigInfo)}.
   */
  public void test_columns_MOVE_asArray() throws Exception {
    ComplexPanelInfo panel =
        parseJavaInfo(
            "import java.util.Arrays;",
            "import com.extjs.gxt.ui.client.store.*;",
            "import com.extjs.gxt.ui.client.widget.grid.*;",
            "public class Test extends com.google.gwt.user.client.ui.HorizontalPanel {",
            "  public Test() {",
            "    {",
            "      ColumnConfig column_1 = new ColumnConfig();",
            "      ColumnConfig column_2 = new ColumnConfig();",
            "      Grid grid = new Grid(new ListStore(), new ColumnModel(Arrays.asList(column_1, column_2)));",
            "      add(grid);",
            "    }",
            "  }",
            "}");
    panel.refresh();
    GridInfo grid = getJavaInfoByName("grid");
    ColumnConfigInfo column_1 = getJavaInfoByName("column_1");
    //
    grid.command_MOVE(column_1, null);
    assertNoLoggedExceptions();
View Full Code Here

TOP

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

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.