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

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


        "    SimplePanel panel = new SimplePanel();",
        "    rootPanel.add(panel);",
        "  }",
        "}");
    refresh();
    SimplePanelInfo panel = getJavaInfoByName("panel");
    //
    assertNull(panel.getWidget());
    assertThat(panel.getBounds().width).isGreaterThan(150);
    assertThat(panel.getBounds().height).isGreaterThan(20);
  }
View Full Code Here


  ////////////////////////////////////////////////////////////////////////////
  /**
   * Test for {@link SimplePanelInfo#command_CREATE(WidgetInfo)}.
   */
  public void test_CREATE() throws Exception {
    SimplePanelInfo panel =
        parseJavaInfo(
            "// filler filler filler filler filler",
            "public class Test extends SimplePanel {",
            "  public Test() {",
            "  }",
            "}");
    refresh();
    SimpleContainer simpleContainer = getSimpleContainer(panel);
    // no child Widget initially
    assertTrue(simpleContainer.isEmpty());
    // do CREATE
    WidgetInfo newButton = createButton();
    simpleContainer.command_CREATE(newButton);
    assertEditor(
        "// filler filler filler filler filler",
        "public class Test extends SimplePanel {",
        "  public Test() {",
        "    {",
        "      Button button = new Button();",
        "      setWidget(button);",
        "      button.setSize('100%', '100%');",
        "    }",
        "  }",
        "}");
    assertSame(newButton, panel.getWidget());
    assertFalse(simpleContainer.isEmpty());
  }
View Full Code Here

        "    }",
        "  }",
        "}");
    refresh();
    WidgetInfo button = getJavaInfoByName("button");
    SimplePanelInfo panel = getJavaInfoByName("panel");
    SimpleContainer simpleContainer = getSimpleContainer(panel);
    // do ADD
    simpleContainer.command_ADD(button);
    assertEditor(
        "public class Test implements EntryPoint {",
View Full Code Here

            "  }",
            "}");
    frame.refresh();
    // do copy/paste
    {
      SimplePanelInfo panel = getJavaInfoByName("panel");
      doCopyPaste(panel, new PasteProcedure<WidgetInfo>() {
        public void run(WidgetInfo copy) throws Exception {
          flowContainer_CREATE(frame, copy, null);
        }
      });
View Full Code Here

TOP

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

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.