Examples of WidgetHandle


Examples of com.google.gdt.eclipse.designer.model.widgets.panels.StackLayoutPanelInfo.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).isEqualTo(0);
      assertThat(bounds.y).isEqualTo(0);
      assertThat(bounds.width).isGreaterThan(390);
      assertThat(bounds.height).isGreaterThan(15);
    }
    {
      WidgetHandle handle = handles.get(1);
      assertSame(button_2, handle.getWidget());
      Rectangle bounds = handle.getBounds();
      assertThat(bounds.x).isEqualTo(0);
      assertThat(bounds.y).isGreaterThan(250);
      assertThat(bounds.width).isGreaterThan(390);
      assertThat(bounds.height).isGreaterThan(15);
    }
View Full Code Here

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

    StackLayoutPanelInfo panel = getJavaInfoByName("panel");
    //
    List<WidgetHandle> handles = panel.getWidgetHandles();
    assertThat(handles).hasSize(1);
    {
      WidgetHandle handle = handles.get(0);
      Rectangle bounds = handle.getBounds();
      assertThat(bounds.x).isEqualTo(0);
      assertThat(bounds.y).isEqualTo(0);
      assertThat(bounds.width).isEqualTo(250);
      assertThat(bounds.height).isGreaterThan(30);
    }
View Full Code Here

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

    WidgetInfo button_2 = panel.getChildrenWidgets().get(1);
    //
    List<WidgetHandle> handles = panel.getWidgetHandles();
    assertThat(handles).hasSize(2);
    {
      WidgetHandle handle = handles.get(0);
      assertSame(button_1, handle.getWidget());
      assertThat(handle.getBounds().x).isEqualTo(0);
      assertThat(handle.getBounds().y).isEqualTo(0);
      assertThat(handle.getBounds().width).isGreaterThan(390);
      assertThat(handle.getBounds().height).isGreaterThan(20);
    }
    {
      WidgetHandle handle = handles.get(1);
      assertSame(button_2, handle.getWidget());
      assertThat(handle.getBounds().x).isEqualTo(0);
      assertThat(handle.getBounds().y).isGreaterThan(250);
      assertThat(handle.getBounds().width).isGreaterThan(390);
      assertThat(handle.getBounds().height).isGreaterThan(20);
    }
  }
View Full Code Here

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

    WidgetInfo button_1 = getJavaInfoByName("button_1");
    WidgetInfo button_2 = getJavaInfoByName("button_2");
    //
    List<WidgetHandle> handles = panel.getWidgetHandles();
    assertThat(handles).hasSize(2);
    WidgetHandle handle_1 = handles.get(0);
    WidgetHandle handle_2 = handles.get(1);
    Rectangle bounds_1 = handle_1.getBounds();
    Rectangle bounds_2 = handle_2.getBounds();
    {
      assertSame(button_1, handle_1.getWidget());
      assertThat(bounds_1.x).isEqualTo(0);
      assertThat(bounds_1.y).isEqualTo(0);
      assertThat(bounds_1.width).isGreaterThan(40).isLessThan(60);
      assertThat(bounds_1.height).isGreaterThan(20);
    }
    {
      assertSame(button_2, handle_2.getWidget());
      assertThat(bounds_2.x).isEqualTo(bounds_1.right());
      assertThat(bounds_2.y).isEqualTo(0);
      assertThat(bounds_2.width).isGreaterThan(70).isLessThan(90);
      assertThat(bounds_2.height).isEqualTo(bounds_1.height);
    }
View Full Code Here

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

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

            "    }",
            "  }",
            "}");
    // 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

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

            "    }",
            "  }",
            "}");
    // 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

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

    WidgetInfo button_2 = getObjectByName("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).isEqualTo(0);
      assertThat(bounds.y).isEqualTo(0);
      assertThat(bounds.width).isGreaterThan(390);
      assertThat(bounds.height).isGreaterThan(15);
    }
    {
      WidgetHandle handle = handles.get(1);
      assertSame(button_2, handle.getWidget());
      Rectangle bounds = handle.getBounds();
      assertThat(bounds.x).isEqualTo(0);
      assertThat(bounds.y).isGreaterThan(250);
      assertThat(bounds.width).isGreaterThan(390);
      assertThat(bounds.height).isGreaterThan(15);
    }
View Full Code Here

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

    refresh();
    //
    List<WidgetHandle> handles = panel.getWidgetHandles();
    assertThat(handles).hasSize(1);
    {
      WidgetHandle handle = handles.get(0);
      Rectangle bounds = handle.getBounds();
      assertThat(bounds.x).isEqualTo(0);
      assertThat(bounds.y).isEqualTo(0);
      assertThat(bounds.width).isEqualTo(450);
      assertThat(bounds.height).isGreaterThan(30).isLessThan(50);
    }
View Full Code Here

Examples of com.google.gdt.eclipse.designer.uibinder.model.widgets.StackPanelInfo.WidgetHandle

    WidgetInfo button_2 = getObjectByName("button_2");
    //
    List<WidgetHandle> handles = panel.getWidgetHandles();
    assertThat(handles).hasSize(2);
    {
      WidgetHandle handle = handles.get(0);
      assertSame(button_1, handle.getWidget());
      assertThat(handle.getBounds().x).isEqualTo(0);
      assertThat(handle.getBounds().y).isEqualTo(0);
      assertThat(handle.getBounds().width).isGreaterThan(390);
      assertThat(handle.getBounds().height).isGreaterThan(20);
    }
    {
      WidgetHandle handle = handles.get(1);
      assertSame(button_2, handle.getWidget());
      assertThat(handle.getBounds().x).isEqualTo(0);
      assertThat(handle.getBounds().y).isGreaterThan(250);
      assertThat(handle.getBounds().width).isGreaterThan(390);
      assertThat(handle.getBounds().height).isGreaterThan(20);
    }
  }
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.