Package org.eclipse.wb.draw2d.geometry

Examples of org.eclipse.wb.draw2d.geometry.Point


            "  </g:StackLayoutPanel>",
            "</ui:UiBinder>");
    // 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");
    assertXML(
View Full Code Here


            "  </g:TabLayoutPanel>",
            "</ui:UiBinder>");
    // 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, 0, 5).endDrag();
    }
    assertXML(
        "// filler filler filler filler filler",
View Full Code Here

            "  </g:TabLayoutPanel>",
            "</ui:UiBinder>");
    // drag header of "button_1"
    {
      Rectangle bounds = panel.getWidgetHandles().get(0).getBounds();
      Point handleCenter = bounds.getCenter();
      canvas.moveTo(panel, handleCenter.x, handleCenter.y);
      canvas.beginDrag().dragTo(panel, -1, 5).endDrag();
    }
    assertXML(
        "<ui:UiBinder>",
View Full Code Here

    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));
    assertTrue(isVisible(button_2));
View Full Code Here

            "  </g:TabLayoutPanel>",
            "</ui:UiBinder>");
    // 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");
    assertXML(
View Full Code Here

            "}");
    frame.refresh();
    // add new Button
    ComponentInfo newButton = createButton();
    frame.command_CREATE2(newButton, null);
    frame.command_BOUNDS(newButton, new Point(100, 50), new Dimension(200, 30));
    frame.refresh();
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
View Full Code Here

            "  }",
            "}");
    AbsoluteLayoutInfo layout = (AbsoluteLayoutInfo) panel.getLayout();
    WidgetInfo label = panel.getChildrenWidgets().get(0);
    //
    layout.command_BOUNDS(label, new Point(100, 50), null);
    assertEditor(
        "public class Test extends Panel {",
        "  public Test() {",
        "    setLayout(new AbsoluteLayout());",
        "    {",
View Full Code Here

            "}");
    panel.refresh();
    AbsoluteLayoutInfo layout = (AbsoluteLayoutInfo) panel.getLayout();
    WidgetInfo label = panel.getChildrenWidgets().get(1);
    // Bounds
    layout.command_BOUNDS(label, new Point(5, 5), null);
    assertEditor(
        "public class Test extends Panel {",
        "  public Test() {",
        "    setLayout(new AbsoluteLayout());",
        "    {",
View Full Code Here

  /**
   * @return the offset of {@link Figure} with headers relative to the absolute layer.
   */
  public final Point getOffset() {
    Point offset = new Point(0, 0);
    FigureUtils.translateFigureToAbsolute2(m_containerFigure, offset);
    offset.translate(m_layout.getContainer().getClientAreaInsets());
    return offset;
  }
View Full Code Here

            "</ui:UiBinder>");
    refresh();
    //
    WidgetInfo button = getObjectByName("button");
    button.getBounds().setSize(150, 50);
    frame.command_LOCATION(button, new Point(10, 20));
    assertXML(
        "// filler filler filler filler filler",
        "<ui:UiBinder>",
        "  <g:LayoutPanel>",
        "    <g:layer left='10px' width='150px' top='20px' height='50px'>",
View Full Code Here

TOP

Related Classes of org.eclipse.wb.draw2d.geometry.Point

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.