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

Examples of com.google.gdt.eclipse.designer.model.widgets.panels.StackLayoutPanelInfo$WidgetHandle


  ////////////////////////////////////////////////////////////////////////////
  /**
   * Copy/paste of {@link WidgetInfo} on {@link StackLayoutPanelInfo}.
   */
  public void test_clipboard_Widget() throws Exception {
    final StackLayoutPanelInfo panel =
        parseJavaInfo(
            "public class Test extends StackLayoutPanel {",
            "  public Test() {",
            "    super(Unit.EM);",
            "    {",
            "      Button myButton = new Button();",
            "      add(myButton, new HTML('header'), 1.5);",
            "    }",
            "  }",
            "}");
    panel.refresh();
    //
    {
      WidgetInfo myButton = getJavaInfoByName("myButton");
      doCopyPaste(myButton, new PasteProcedure<WidgetInfo>() {
        public void run(WidgetInfo copy) throws Exception {
          panel.command_CREATE2(copy, null);
        }
      });
    }
    assertEditor(
        "public class Test extends StackLayoutPanel {",
View Full Code Here


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

  //
  // CREATE
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_CREATE_canvas_empty() throws Exception {
    StackLayoutPanelInfo panel =
        openJavaInfo(
            "public class Test extends StackLayoutPanel {",
            "  public Test() {",
            "    super(Unit.EM);",
            "  }",
View Full Code Here

        "  }",
        "}");
  }

  public void test_CREATE_canvas_before() throws Exception {
    StackLayoutPanelInfo panel =
        openJavaInfo(
            "public class Test extends StackLayoutPanel {",
            "  public Test() {",
            "    super(Unit.EM);",
            "    {",
View Full Code Here

        "  }",
        "}");
  }

  public void test_CREATE_canvas_after() throws Exception {
    StackLayoutPanelInfo panel =
        openJavaInfo(
            "public class Test extends StackLayoutPanel {",
            "  public Test() {",
            "    super(Unit.EM);",
            "    {",
View Full Code Here

        "  }",
        "}");
  }

  public void test_CREATE_tree() throws Exception {
    StackLayoutPanelInfo panel =
        openJavaInfo(
            "public class Test extends StackLayoutPanel {",
            "  public Test() {",
            "    super(Unit.EM);",
            "  }",
View Full Code Here

  //
  // PASTE
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_PASTE() throws Exception {
    StackLayoutPanelInfo panel =
        openJavaInfo(
            "public class Test extends StackLayoutPanel {",
            "  public Test() {",
            "    super(Unit.EM);",
            "    {",
View Full Code Here

  //
  // MOVE
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_MOVE_widget() throws Exception {
    StackLayoutPanelInfo panel =
        openJavaInfo(
            "public class Test extends StackLayoutPanel {",
            "  public Test() {",
            "    super(Unit.EM);",
            "    {",
View Full Code Here

        "  }",
        "}");
  }

  public void test_MOVE_header() throws Exception {
    StackLayoutPanelInfo panel =
        openJavaInfo(
            "public class Test extends StackLayoutPanel {",
            "  public Test() {",
            "    super(Unit.EM);",
            "    {",
            "      Button button_1 = new Button();",
            "      add(button_1, new HTML('A'), 2.0);",
            "    }",
            "    {",
            "      Button button_2 = new Button();",
            "      add(button_2, new HTML('B'), 2.0);",
            "    }",
            "  }",
            "}");
    // drag header of "button_2"
    {
      Rectangle bounds = panel.getWidgetHandles().get(1).getBounds();
      Point handleCenter = bounds.getCenter();
      canvas.moveTo(panel, handleCenter.x, handleCenter.y);
      canvas.beginDrag().dragTo(panel, 5, 0).endDrag();
    }
    assertEditor(
View Full Code Here

        "      rootPanel.setWidgetLeftWidth(button, 10, Unit.PX, 150, Unit.PX);",
        "      rootPanel.setWidgetTopHeight(button, 250, Unit.PX, 50, Unit.PX);",
        "    }",
        "  }",
        "}");
    StackLayoutPanelInfo panel = getJavaInfoByName("panel");
    WidgetInfo button = getJavaInfoByName("button");
    //
    canvas.beginDrag(button).dragTo(panel, 0.5, 5).endDrag();
    assertEditor(
        "public class Test implements EntryPoint {",
View Full Code Here

TOP

Related Classes of com.google.gdt.eclipse.designer.model.widgets.panels.StackLayoutPanelInfo$WidgetHandle

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.