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

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


  //
  // Tests
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_CREATE() throws Exception {
    ComplexPanelInfo panel =
        parseJavaInfo(
            "public class Test extends com.google.gwt.user.client.ui.HorizontalPanel {",
            "  public Test() {",
            "  }",
            "}");
    panel.refresh();
    // prepare new Grid
    WidgetInfo newGrid = createJavaInfo("com.extjs.gxt.ui.client.widget.treegrid.EditorTreeGrid");
    // check "live image"
    {
      Image liveImage = newGrid.getImage();
      assertEquals(302, liveImage.getBounds().width);
      assertEquals(202, liveImage.getBounds().height);
    }
    // do create
    panel.command_CREATE2(newGrid, null);
    assertEditor(
        "import com.extjs.gxt.ui.client.widget.treegrid.EditorTreeGrid;",
        "import com.extjs.gxt.ui.client.store.TreeStore;",
        "import com.extjs.gxt.ui.client.widget.grid.ColumnModel;",
        "import java.util.ArrayList;",
View Full Code Here


  /**
   * Test for {@link HorizontalSplitPanelInfo#command_MOVE(WidgetInfo, String)}
   */
  public void test_MOVE_reparent() throws Exception {
    ComplexPanelInfo frame =
        parseJavaInfo(
            "public class Test extends FlowPanel {",
            "  public Test() {",
            "    HorizontalSplitPanel panel = new HorizontalSplitPanel();",
            "    add(panel);",
            "    {",
            "      Button button = new Button();",
            "      add(button);",
            "    }",
            "  }",
            "}");
    refresh();
    HorizontalSplitPanelInfo panel = getJavaInfoByName("panel");
    // initial state
    WidgetInfo button = frame.getChildrenWidgets().get(1);
    assertNull(panel.getLeftWidget());
    assertNull(panel.getRightWidget());
    // do move
    panel.command_MOVE(button, "right");
    assertEditor(
View Full Code Here

  /**
   * Test for copy/paste {@link HorizontalSplitPanelInfo} with its children.
   */
  public void test_clipboard() throws Exception {
    final ComplexPanelInfo frame =
        parseJavaInfo(
            "public class Test extends FlowPanel {",
            "  public Test() {",
            "    {",
            "      HorizontalSplitPanel panel = new HorizontalSplitPanel();",
View Full Code Here

  ////////////////////////////////////////////////////////////////////////////
  /**
   * Test for copy/paste {@link VerticalSplitPanelInfo} with its children.
   */
  public void test_clipboard() throws Exception {
    final ComplexPanelInfo frame =
        parseJavaInfo(
            "public class Test extends FlowPanel {",
            "  public Test() {",
            "    {",
            "      VerticalSplitPanel panel = new VerticalSplitPanel();",
View Full Code Here

        "  }",
        "}");
  }

  public void test_canvas_PASTE_it() throws Exception {
    ComplexPanelInfo flowPanel =
        openJavaInfo(
            "// filler filler filler filler filler",
            "public class Test extends FlowPanel {",
            "  public Test() {",
            "    {",
View Full Code Here

            "  }",
            "}");
    frame.refresh();
    DeckPanelInfo panel = (DeckPanelInfo) frame.getChildrenWidgets().get(0);
    WidgetInfo button_1 = panel.getChildrenWidgets().get(0);
    ComplexPanelInfo flowPanel = (ComplexPanelInfo) panel.getChildrenWidgets().get(1);
    WidgetInfo button_2 = flowPanel.getChildrenWidgets().get(0);
    // initially "button_1" is visible
    assertTrue(isVisible(button_1));
    assertFalse(isVisible(flowPanel));
    // send "selecting" broadcast
    {
View Full Code Here

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

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

            "      rootPanel.add(panel);",
            "    }",
            "  }",
            "}");
    frame.refresh();
    ComplexPanelInfo panel = (ComplexPanelInfo) frame.getChildrenWidgets().get(0);
    // create new Button
    WidgetInfo newButton = createButton();
    frame.startEdit();
    panel.command_CREATE2(newButton, null);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    {",
View Full Code Here

            "      rootPanel.add(panel);",
            "    }",
            "  }",
            "}");
    frame.refresh();
    ComplexPanelInfo panel = (ComplexPanelInfo) frame.getChildrenWidgets().get(0);
    // create new Button
    WidgetInfo newButton = createButton();
    frame.startEdit();
    panel.command_CREATE2(newButton, null);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    {",
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.