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

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


  //
  // Location properties
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_propertiesH_leftValue() throws Exception {
    RootLayoutPanelInfo frame =
        parseJavaInfo(
            "public class Test implements EntryPoint {",
            "  public void onModuleLoad() {",
            "    RootLayoutPanel rootPanel = RootLayoutPanel.get();",
            "    {",
            "      Button button = new Button();",
            "      rootPanel.add(button);",
            "      rootPanel.setWidgetLeftWidth(button, 100.0, Unit.PX, 200.0, Unit.PX);",
            "    }",
            "  }",
            "}");
    frame.refresh();
    WidgetInfo button = getJavaInfoByName("button");
    //
    Property leftProperty = PropertyUtils.getByPath(button, "Anchor H/left");
    assertNotNull(leftProperty);
    assertTrue(leftProperty.isModified());
View Full Code Here


        "  }",
        "}");
  }

  public void test_propertiesV_topValue() throws Exception {
    RootLayoutPanelInfo frame =
        parseJavaInfo(
            "public class Test implements EntryPoint {",
            "  public void onModuleLoad() {",
            "    RootLayoutPanel rootPanel = RootLayoutPanel.get();",
            "    {",
            "      Button button = new Button();",
            "      rootPanel.add(button);",
            "      rootPanel.setWidgetTopHeight(button, 100.0, Unit.PX, 50.0, Unit.PX);",
            "    }",
            "  }",
            "}");
    frame.refresh();
    WidgetInfo button = getJavaInfoByName("button");
    //
    Property topProperty = PropertyUtils.getByPath(button, "Anchor V/top");
    assertNotNull(topProperty);
    assertTrue(topProperty.isModified());
View Full Code Here

        "  }",
        "}");
  }

  public void test_propertiesH_leftUnit_PXtoMM() throws Exception {
    RootLayoutPanelInfo frame =
        parseJavaInfo(
            "public class Test implements EntryPoint {",
            "  public void onModuleLoad() {",
            "    RootLayoutPanel rootPanel = RootLayoutPanel.get();",
            "    {",
            "      Button button = new Button();",
            "      rootPanel.add(button);",
            "      rootPanel.setWidgetLeftWidth(button, 100.0, Unit.PX, 200.0, Unit.PX);",
            "    }",
            "  }",
            "}");
    frame.refresh();
    WidgetInfo button = getJavaInfoByName("button");
    //
    Property leftProperty = PropertyUtils.getByPath(button, "Anchor H/left unit");
    assertNotNull(leftProperty);
    assertTrue(leftProperty.isModified());
View Full Code Here

        "  }",
        "}");
  }

  public void test_propertiesH_leftUnit_PXtoEX() throws Exception {
    RootLayoutPanelInfo frame =
        parseJavaInfo(
            "public class Test implements EntryPoint {",
            "  public void onModuleLoad() {",
            "    RootLayoutPanel rootPanel = RootLayoutPanel.get();",
            "    {",
            "      Button button = new Button();",
            "      rootPanel.add(button);",
            "      rootPanel.setWidgetLeftWidth(button, 100.0, Unit.PX, 200.0, Unit.PX);",
            "    }",
            "  }",
            "}");
    frame.refresh();
    WidgetInfo button = getJavaInfoByName("button");
    //
    Property leftProperty = PropertyUtils.getByPath(button, "Anchor H/left unit");
    assertNotNull(leftProperty);
    assertTrue(leftProperty.isModified());
View Full Code Here

        "  }",
        "}");
  }

  public void test_propertiesV_topUnit_PXtoMM() throws Exception {
    RootLayoutPanelInfo frame =
        parseJavaInfo(
            "public class Test implements EntryPoint {",
            "  public void onModuleLoad() {",
            "    RootLayoutPanel rootPanel = RootLayoutPanel.get();",
            "    {",
            "      Button button = new Button();",
            "      rootPanel.add(button);",
            "      rootPanel.setWidgetTopHeight(button, 100.0, Unit.PX, 50.0, Unit.PX);",
            "    }",
            "  }",
            "}");
    frame.refresh();
    WidgetInfo button = getJavaInfoByName("button");
    //
    Property topProperty = PropertyUtils.getByPath(button, "Anchor V/top unit");
    assertNotNull(topProperty);
    assertTrue(topProperty.isModified());
View Full Code Here

  //
  // Tests
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_parse_ClassInstanceCreation() throws Exception {
    RootLayoutPanelInfo frame =
        parseJavaInfo(
            "public class Test implements EntryPoint {",
            "  public void onModuleLoad() {",
            "    RootLayoutPanel rootPanel = RootLayoutPanel.get();",
            "    DockLayoutPanel panel = new DockLayoutPanel(Unit.PX);",
            "    rootPanel.add(panel);",
            "  }",
            "}");
    assertHierarchy(
        "{RootLayoutPanel.get()} {local-unique: rootPanel} {/RootLayoutPanel.get()/ /rootPanel.add(panel)/}",
        "  {new: com.google.gwt.user.client.ui.DockLayoutPanel} {local-unique: panel} {/new DockLayoutPanel(Unit.PX)/ /rootPanel.add(panel)/}");
    frame.refresh();
    DockLayoutPanelInfo panel = getJavaInfoByName("panel");
    // bounds
    assertEquals(new Rectangle(0, 0, 450, 300), panel.getBounds());
    // Unit property
    {
View Full Code Here

      assertEquals("CM", getPropertyText(unitProperty));
    }
  }

  public void test_CREATE_it() throws Exception {
    RootLayoutPanelInfo frame =
        parseJavaInfo(
            "public class Test implements EntryPoint {",
            "  public void onModuleLoad() {",
            "    RootLayoutPanel rootPanel = RootLayoutPanel.get();",
            "  }",
            "}");
    frame.refresh();
    //
    DockLayoutPanelInfo panel = createJavaInfo("com.google.gwt.user.client.ui.DockLayoutPanel");
    frame.command_CREATE2(panel, null);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootLayoutPanel rootPanel = RootLayoutPanel.get();",
        "    {",
View Full Code Here

  //
  // Clipboard
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_clipboard() throws Exception {
    final RootLayoutPanelInfo frame =
        parseJavaInfo(
            "public class Test implements EntryPoint {",
            "  public void onModuleLoad() {",
            "    RootLayoutPanel rootPanel = RootLayoutPanel.get();",
            "    {",
            "      DockLayoutPanel panel = new DockLayoutPanel(Unit.CM);",
            "      rootPanel.add(panel);",
            "      {",
            "        Button button = new Button();",
            "        panel.addWest(button, 1.0);",
            "      }",
            "      {",
            "        Button button = new Button();",
            "        panel.addNorth(button, 2.0);",
            "      }",
            "    }",
            "  }",
            "}");
    frame.refresh();
    //
    {
      DockLayoutPanelInfo 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

  //
  // Tests
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_parse_ClassInstanceCreation() throws Exception {
    RootLayoutPanelInfo frame =
        parseJavaInfo(
            "public class Test implements EntryPoint {",
            "  public void onModuleLoad() {",
            "    RootLayoutPanel rootPanel = RootLayoutPanel.get();",
            "    SplitLayoutPanel panel = new SplitLayoutPanel();",
            "    rootPanel.add(panel);",
            "  }",
            "}");
    assertHierarchy(
        "{RootLayoutPanel.get()} {local-unique: rootPanel} {/RootLayoutPanel.get()/ /rootPanel.add(panel)/}",
        "  {new: com.google.gwt.user.client.ui.SplitLayoutPanel} {local-unique: panel} {/new SplitLayoutPanel()/ /rootPanel.add(panel)/}");
    frame.refresh();
    DockLayoutPanelInfo panel = getJavaInfoByName("panel");
    // bounds
    assertEquals(new Rectangle(0, 0, 450, 300), panel.getBounds());
    // no Unit property
    {
View Full Code Here

      assertThat(bounds.height).isEqualTo(300);
    }
  }

  public void test_CREATE_it() throws Exception {
    RootLayoutPanelInfo frame =
        parseJavaInfo(
            "public class Test implements EntryPoint {",
            "  public void onModuleLoad() {",
            "    RootLayoutPanel rootPanel = RootLayoutPanel.get();",
            "  }",
            "}");
    frame.refresh();
    //
    DockLayoutPanelInfo panel = createJavaInfo("com.google.gwt.user.client.ui.SplitLayoutPanel");
    frame.command_CREATE2(panel, null);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootLayoutPanel rootPanel = RootLayoutPanel.get();",
        "    {",
View Full Code Here

TOP

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

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.