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

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


        "  }",
        "}");
  }

  public void test_SIZE_update_LeftWidth_TopHeight_LL_PX() 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, 10.0, Unit.PX, 100.0, Unit.PX);",
            "      rootPanel.setWidgetTopHeight(button, 20.0, Unit.PX, 50.0, Unit.PX);",
            "    }",
            "  }",
            "}");
    frame.refresh();
    //
    WidgetInfo button = getJavaInfoByName("button");
    frame.command_SIZE(
        button,
        new Dimension(90, 40),
        ResizeDirection.LEADING,
        ResizeDirection.LEADING);
    assertEditor(
View Full Code Here


        "  }",
        "}");
  }

  public void test_SIZE_update_RightWidth_BottomHeight_TT_PX() 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.setWidgetRightWidth(button, 100.0, Unit.PX, 100.0, Unit.PX);",
            "      rootPanel.setWidgetBottomHeight(button, 100.0, Unit.PX, 50.0, Unit.PX);",
            "    }",
            "  }",
            "}");
    frame.refresh();
    //
    WidgetInfo button = getJavaInfoByName("button");
    frame.command_SIZE(
        button,
        new Dimension(150, 75),
        ResizeDirection.TRAILING,
        ResizeDirection.TRAILING);
    assertEditor(
View Full Code Here

        "  }",
        "}");
  }

  public void test_SIZE_update_RightWidth_BottomHeight_LL_PX() 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.setWidgetRightWidth(button, 100.0, Unit.PX, 100.0, Unit.PX);",
            "      rootPanel.setWidgetBottomHeight(button, 100.0, Unit.PX, 50.0, Unit.PX);",
            "    }",
            "  }",
            "}");
    frame.refresh();
    //
    WidgetInfo button = getJavaInfoByName("button");
    frame.command_SIZE(
        button,
        new Dimension(150, 75),
        ResizeDirection.LEADING,
        ResizeDirection.LEADING);
    assertEditor(
View Full Code Here

        "  }",
        "}");
  }

  public void test_SIZE_update_LeftRight_TopBottom_LL_PX() 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.setWidgetLeftRight(button, 100.0, Unit.PX, 100.0, Unit.PX);",
            "      rootPanel.setWidgetTopBottom(button, 50.0, Unit.PX, 50.0, Unit.PX);",
            "    }",
            "  }",
            "}");
    frame.refresh();
    //
    WidgetInfo button = getJavaInfoByName("button");
    frame.command_SIZE(
        button,
        new Dimension(150, 100),
        ResizeDirection.LEADING,
        ResizeDirection.LEADING);
    assertEditor(
View Full Code Here

        "  }",
        "}");
  }

  public void test_SIZE_update_LeftRight_TopBottom_TT_PX() 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.setWidgetLeftRight(button, 100.0, Unit.PX, 100.0, Unit.PX);",
            "      rootPanel.setWidgetTopBottom(button, 50.0, Unit.PX, 50.0, Unit.PX);",
            "    }",
            "  }",
            "}");
    frame.refresh();
    //
    WidgetInfo button = getJavaInfoByName("button");
    frame.command_SIZE(
        button,
        new Dimension(150, 100),
        ResizeDirection.TRAILING,
        ResizeDirection.TRAILING);
    assertEditor(
View Full Code Here

  private void check_ANCHOR(boolean horizontal,
      Anchor initialAnchor,
      String initialDesc,
      Anchor newAnchor,
      String expectedDesc) throws Exception {
    RootLayoutPanelInfo frame =
        parseJavaInfo(
            "public class Test implements EntryPoint {",
            "  public void onModuleLoad() {",
            "    RootLayoutPanel rootPanel = RootLayoutPanel.get();",
            "    {",
            "      Button button = new Button();",
            "      rootPanel.add(button);",
            "      " + getAnchorLine(initialDesc),
            "    }",
            "  }",
            "}");
    anchor_removeEmptyLine_inEditor();
    frame.refresh();
    WidgetInfo button = getJavaInfoByName("button");
    // initial anchor
    {
      Anchor anchor = frame.getAnchor(button, horizontal);
      assertSame(initialAnchor, anchor);
      assertNotNull(anchor.getImage(horizontal));
      assertNotNull(anchor.getSmallImage(horizontal));
    }
    // set new anchor
    frame.command_ANCHOR(button, horizontal, newAnchor);
    anchor_assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootLayoutPanel rootPanel = RootLayoutPanel.get();",
        "    {",
        "      Button button = new Button();",
        "      rootPanel.add(button);",
        "      " + getAnchorLine(expectedDesc),
        "    }",
        "  }",
        "}");
    {
      Anchor anchor = frame.getAnchor(button, horizontal);
      assertSame(newAnchor, anchor);
    }
  }
View Full Code Here

  //
  // Alignment actions
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_alignmentActions_noSelection() throws Exception {
    RootLayoutPanelInfo frame =
        parseJavaInfo(
            "public class Test implements EntryPoint {",
            "  public void onModuleLoad() {",
            "    RootLayoutPanel rootPanel = RootLayoutPanel.get();",
            "  }",
            "}");
    frame.refresh();
    //
    List<Object> actions = getSelectionActions_noSelection(frame);
    assertThat(actions.isEmpty());
  }
View Full Code Here

    List<Object> actions = getSelectionActions_noSelection(frame);
    assertThat(actions.isEmpty());
  }

  public void test_alignmentActions_wrongSelection() throws Exception {
    RootLayoutPanelInfo frame =
        parseJavaInfo(
            "public class Test implements EntryPoint {",
            "  public void onModuleLoad() {",
            "    RootLayoutPanel rootPanel = RootLayoutPanel.get();",
            "  }",
            "}");
    frame.refresh();
    //
    List<Object> actions = getSelectionActions(frame);
    assertThat(actions.isEmpty());
  }
View Full Code Here

    List<Object> actions = getSelectionActions(frame);
    assertThat(actions.isEmpty());
  }

  public void test_alignmentActions_LW_to_RW() 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, Unit.PX, 150, Unit.PX);",
            "    }",
            "  }",
            "}");
    frame.refresh();
    WidgetInfo button = getJavaInfoByName("button");
    //
    List<Object> actions = getSelectionActions(button);
    // "left + width" is checked
    {
View Full Code Here

        "  }",
        "}");
  }

  public void test_alignmentActions_TH_to_BH() 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, Unit.PX, 150, Unit.PX);",
            "    }",
            "  }",
            "}");
    frame.refresh();
    WidgetInfo button = getJavaInfoByName("button");
    //
    List<Object> actions = getSelectionActions(button);
    // "top + height" is checked
    {
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.