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

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


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


  //
  // Manage active
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_manageActive() throws Exception {
    TabLayoutPanelInfo container =
        parseJavaInfo(
            "public class Test extends TabLayoutPanel {",
            "  public Test() {",
            "    super(1.5, Unit.EM);",
            "    {",
            "      Button button_1 = new Button();",
            "      add(button_1, 'A', false);",
            "    }",
            "    {",
            "      Button button_2 = new Button();",
            "      add(button_2, 'B', false);",
            "    }",
            "  }",
            "}");
    container.refresh();
    WidgetInfo button_1 = getJavaInfoByName("button_1");
    WidgetInfo button_2 = getJavaInfoByName("button_2");
    // initially "button_1" is active
    assertActiveWidget(container, button_1);
    // notify about "button_2"
    {
      boolean shouldRefresh = notifySelecting(button_2);
      assertTrue(shouldRefresh);
      container.refresh();
      // now "button_2" is active
      assertActiveWidget(container, button_2);
    }
    // second notification about "button_2" does not cause refresh()
    {
View Full Code Here

  //
  // Children
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_activeWidget() 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");
    // "button_1" is active, so it should be selected on click
    assertSame(button_1, panel.getActiveWidget());
    canvas.click(panel, 100, 100);
    canvas.assertPrimarySelected(button_1);
    // select "button_2"
    panel.getWidgetHandles().get(1).show();
    canvas.deselectAll();
    canvas.click(panel, 100, 100);
    canvas.assertPrimarySelected(button_2);
  }
View Full Code Here

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

        "  }",
        "}");
  }

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

        "  }",
        "}");
  }

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

        "  }",
        "}");
  }

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

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

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

        "  }",
        "}");
  }

  public void test_MOVE_header_before() 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);",
            "    }",
            "  }",
            "}");
    // drag header of "button_2"
    {
      Rectangle bounds = panel.getWidgetHandles().get(1).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

TOP

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

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.