Examples of RootPanelInfo


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

  ////////////////////////////////////////////////////////////////////////////
  /**
   * Even empty <code>HorizontalPanel</code> has some reasonable size.
   */
  public void test_empty() throws Exception {
    RootPanelInfo frame =
        parseJavaInfo(
            "public class Test implements EntryPoint {",
            "  public void onModuleLoad() {",
            "    RootPanel rootPanel = RootPanel.get();",
            "    HorizontalPanel panel = new HorizontalPanel();",
            "    rootPanel.add(panel);",
            "  }",
            "}");
    frame.refresh();
    HorizontalPanelInfo panel = (HorizontalPanelInfo) frame.getChildrenWidgets().get(0);
    assertThat(panel.getBounds().width).isGreaterThan(140);
    assertThat(panel.getBounds().height).isGreaterThan(20);
  }
View Full Code Here

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

  /**
   * Test for "Cell" property.
   */
  public void test_propertyCell() throws Exception {
    RootPanelInfo frame =
        parseJavaInfo(
            "public class Test implements EntryPoint {",
            "  public void onModuleLoad() {",
            "    RootPanel rootPanel = RootPanel.get();",
            "    HorizontalPanel panel = new HorizontalPanel();",
            "    rootPanel.add(panel);",
            "    {",
            "      Button button = new Button();",
            "      panel.add(button);",
            "    }",
            "  }",
            "}");
    frame.refresh();
    //
    WidgetInfo button = getJavaInfoByName("button");
    assertNotNull(PropertyUtils.getByPath(button, "Cell"));
  }
View Full Code Here

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

  /**
   * Test for {@link HorizontalPanelInfo#command_CREATE2(WidgetInfo, WidgetInfo)}.
   */
  public void test_CREATE() throws Exception {
    RootPanelInfo frame =
        parseJavaInfo(
            "public class Test implements EntryPoint {",
            "  public void onModuleLoad() {",
            "    RootPanel rootPanel = RootPanel.get();",
            "    HorizontalPanel panel = new HorizontalPanel();",
            "    rootPanel.add(panel);",
            "  }",
            "}");
    frame.refresh();
    HorizontalPanelInfo panel = (HorizontalPanelInfo) frame.getChildrenWidgets().get(0);
    //
    WidgetInfo newButton = createButton();
    panel.command_CREATE2(newButton, null);
    assertEditor(
        "public class Test implements EntryPoint {",
View Full Code Here

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

  /**
   * Test for {@link HorizontalPanelInfo#command_MOVE2(WidgetInfo, WidgetInfo)}.
   */
  public void test_MOVE() throws Exception {
    RootPanelInfo frame =
        parseJavaInfo(
            "public class Test implements EntryPoint {",
            "  public void onModuleLoad() {",
            "    RootPanel rootPanel = RootPanel.get();",
            "    HorizontalPanel panel = new HorizontalPanel();",
            "    rootPanel.add(panel);",
            "    {",
            "      Button button_1 = new Button();",
            "      panel.add(button_1);",
            "    }",
            "    {",
            "      Button button_2 = new Button();",
            "      panel.add(button_2);",
            "    }",
            "  }",
            "}");
    frame.refresh();
    HorizontalPanelInfo panel = (HorizontalPanelInfo) frame.getChildrenWidgets().get(0);
    WidgetInfo button_1 = panel.getChildrenWidgets().get(0);
    WidgetInfo button_2 = panel.getChildrenWidgets().get(1);
    //
    panel.command_MOVE2(button_2, button_1);
    assertEditor(
View Full Code Here

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

  /**
   * Test for copy/paste {@link HorizontalPanelInfo} with its children.
   */
  public void test_clipboard() throws Exception {
    final RootPanelInfo frame =
        parseJavaInfo(
            "public class Test implements EntryPoint {",
            "  public void onModuleLoad() {",
            "    RootPanel rootPanel = RootPanel.get();",
            "    {",
            "      HorizontalPanel panel = new HorizontalPanel();",
            "      rootPanel.add(panel);",
            "      {",
            "        Button button_1 = new Button('A');",
            "        panel.add(button_1);",
            "      }",
            "      {",
            "        Button button_2 = new Button('B');",
            "        panel.add(button_2);",
            "      }",
            "    }",
            "  }",
            "}");
    frame.refresh();
    //
    {
      HorizontalPanelInfo panel = getJavaInfoByName("panel");
      doCopyPaste(panel, new PasteProcedure<WidgetInfo>() {
        public void run(WidgetInfo copy) throws Exception {
          frame.command_CREATE2(copy, null);
        }
      });
    }
    assertEditor(
        "public class Test implements EntryPoint {",
View Full Code Here

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

  //
  // Tests
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_exposedFaces() throws Exception {
    RootPanelInfo frame =
        parseJavaInfo(
            "public class Test implements EntryPoint {",
            "  public void onModuleLoad() {",
            "    RootPanel rootPanel = RootPanel.get();",
            "    PushButton button = new PushButton('My text');",
            "    rootPanel.add(button);",
            "  }",
            "}");
    frame.refresh();
    CustomButtonInfo button = (CustomButtonInfo) frame.getChildrenWidgets().get(0);
    // check for properties for faces
    hasFace(button, "UpFace");
    hasFace(button, "UpDisabledFace");
    hasFace(button, "UpHoveringFace");
    hasFace(button, "DownFace");
View Full Code Here

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

    assertNotNull("No property for " + faceName, faceProperty);
    assertTrue(faceProperty.getCategory().isSystem());
  }

  public void test_resetFace() throws Exception {
    RootPanelInfo frame =
        parseJavaInfo(
            "public class Test implements EntryPoint {",
            "  public void onModuleLoad() {",
            "    RootPanel rootPanel = RootPanel.get();",
            "    PushButton button = new PushButton('My text');",
            "    rootPanel.add(button);",
            "    button.getDownFace().setText('down text');",
            "  }",
            "}");
    frame.refresh();
    CustomButtonInfo button = (CustomButtonInfo) frame.getChildrenWidgets().get(0);
    // check for properties for faces
    button.getPropertyByTitle("DownFace").setValue(Property.UNKNOWN_VALUE);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
View Full Code Here

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

  /**
   * When set HTML/text/image property, all other properties should be reset.
   */
  public void test_setFaceProperty() throws Exception {
    RootPanelInfo frame =
        parseJavaInfo(
            "public class Test implements EntryPoint {",
            "  public void onModuleLoad() {",
            "    RootPanel rootPanel = RootPanel.get();",
            "    {",
            "      PushButton button = new PushButton();",
            "      button.getUpFace().setText('the text');",
            "      rootPanel.add(button);",
            "    }",
            "  }",
            "}");
    frame.refresh();
    CustomButtonInfo button = (CustomButtonInfo) frame.getChildrenWidgets().get(0);
    // check for properties for faces
    Property upProperty = button.getPropertyByTitle("UpFace");
    Property[] upProperties = getSubProperties(upProperty);
    // check existing "text" property
    {
View Full Code Here

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

  //
  // Tests
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_noBundles() throws Exception {
    RootPanelInfo frame =
        parseJavaInfo(
            "public class Test implements EntryPoint {",
            "  public void onModuleLoad() {",
            "    RootPanel rootPanel = RootPanel.get();",
            "  }",
View Full Code Here

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

            "  AbstractImagePrototype first();",
            "  AbstractImagePrototype second();",
            "}"));
    waitForAutoBuild();
    // parse
    RootPanelInfo frame =
        parseJavaInfo(
            "public class Test implements EntryPoint {",
            "  private static final MyImageBundle m_myBundle = GWT.create(MyImageBundle.class);",
            "  public void onModuleLoad() {",
            "    RootPanel rootPanel = RootPanel.get();",
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.