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

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


    WidgetInfo button_2 = getJavaInfoByName("button_2");
    //
    List<WidgetHandle> handles = panel.getWidgetHandles();
    assertThat(handles).hasSize(2);
    {
      WidgetHandle handle = handles.get(0);
      assertSame(button_1, handle.getWidget());
      Rectangle bounds = handle.getBounds();
      assertThat(bounds.x).isLessThan(10);
      assertThat(bounds.y).isEqualTo(0);
      assertThat(bounds.width).isGreaterThan(90);
      assertThat(bounds.height).isGreaterThan(20);
    }
    {
      WidgetHandle handle = handles.get(1);
      assertSame(button_2, handle.getWidget());
      Rectangle bounds = handle.getBounds();
      assertThat(bounds.x).isGreaterThan(10 + 80);
      assertThat(bounds.y).isEqualTo(0);
      assertThat(bounds.width).isGreaterThan(100);
      assertThat(bounds.height).isGreaterThan(20);
    }
View Full Code Here


            "    }",
            "  }",
            "}");
    // drag header of "button_2"
    {
      WidgetHandle widgetHandle = panel.getWidgetHandles().get(1);
      Point handleCenter = widgetHandle.getBounds().getCenter();
      canvas.moveTo(panel, handleCenter.x, handleCenter.y);
      canvas.beginDrag().dragTo(panel, 5, 0).endDrag();
    }
    assertEditor(
        "public class Test extends TabPanel {",
View Full Code Here

            "    }",
            "  }",
            "}");
    // drag header of "button_1"
    {
      WidgetHandle widgetHandle = panel.getWidgetHandles().get(0);
      Point handleCenter = widgetHandle.getBounds().getCenter();
      canvas.moveTo(panel, handleCenter.x, handleCenter.y);
      canvas.beginDrag().dragTo(panel, -5, 0).endDrag();
    }
    assertEditor(
        "public class Test extends TabPanel {",
View Full Code Here

TOP

Related Classes of com.google.gdt.eclipse.designer.model.widgets.panels.TabPanelInfo.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.