Examples of TabLayoutPanelInfo


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

        "  }",
        "}");
  }

  public void test_MOVE_header_after() throws Exception {
    TabLayoutPanelInfo panel =
        openJavaInfo(
            "public class Test extends TabLayoutPanel {",
            "  public Test() {",
            "    super(1.5, Unit.EM);",
            "    {",
            "      Button button_1 = new Button();",
            "      add(button_1, 'AAAAAA', false);",
            "    }",
            "    {",
            "      Button button_2 = new Button();",
            "      add(button_2, 'BBBBBB', false);",
            "    }",
            "    {",
            "      Button button_3 = new Button();",
            "      add(button_3, 'CCCCCC', false);",
            "    }",
            "  }",
            "}");
    // drag header of "button_1"
    {
      Rectangle bounds = panel.getWidgetHandles().get(0).getBounds();
      canvas.moveTo(panel, bounds.x, bounds.y);
      canvas.beginDrag().dragTo(panel, -5, 10).endDrag();
    }
    assertEditor(
        "public class Test extends TabLayoutPanel {",
View Full Code Here

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

  //
  // Handle
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_canvas_doubleClickHandle() throws Exception {
    TabLayoutPanelInfo panel =
        openJavaInfo(
            "public class Test extends TabLayoutPanel {",
            "  public Test() {",
            "    super(1.5, Unit.EM);",
            "    {",
            "      Button button_1 = new Button();",
            "      add(button_1, 'AAAAAA', false);",
            "    }",
            "    {",
            "      Button button_2 = new Button();",
            "      add(button_2, 'BBBBBB', false);",
            "    }",
            "  }",
            "}");
    WidgetInfo button_1 = getJavaInfoByName("button_1");
    WidgetInfo button_2 = getJavaInfoByName("button_2");
    // initially "button_1" is visible
    assertTrue(isVisible(button_1));
    assertFalse(isVisible(button_2));
    // double click handle of "button_1"
    {
      Rectangle bounds = panel.getWidgetHandles().get(1).getBounds();
      Point handleCenter = bounds.getCenter();
      canvas.moveTo(panel, handleCenter.x, handleCenter.y).doubleClick();
    }
    // now "button_2" is visible
    assertFalse(isVisible(button_1));
View Full Code Here

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

    assertFalse(isVisible(button_1));
    assertTrue(isVisible(button_2));
  }

  public void test_canvas_directEditHandle() throws Exception {
    TabLayoutPanelInfo panel =
        openJavaInfo(
            "public class Test extends TabLayoutPanel {",
            "  public Test() {",
            "    super(1.5, Unit.EM);",
            "    {",
            "      Button button_1 = new Button();",
            "      add(button_1, 'AAA', false);",
            "    }",
            "  }",
            "}");
    // select header
    {
      Rectangle bounds = panel.getWidgetHandles().get(0).getBounds();
      Point handleCenter = bounds.getCenter();
      canvas.moveTo(panel, handleCenter.x, handleCenter.y).click();
    }
    // do direct edit
    canvas.performDirectEdit("123");
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.