Package org.eclipse.wb.draw2d.geometry

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


      };
      // width
      BoundsProperty<?> widthProperty = new BoundsProperty<CanvasInfo>(canvas, "width") {
        @Override
        public void setValue2(int value, Rectangle modelBounds) throws Exception {
          command_BOUNDS(m_component, null, new Dimension(value, modelBounds.height));
        }
      };
      // height
      BoundsProperty<?> heightProperty = new BoundsProperty<CanvasInfo>(canvas, "height") {
        @Override
        public void setValue2(int value, Rectangle modelBounds) throws Exception {
          command_BOUNDS(m_component, null, new Dimension(modelBounds.width, value));
        }
      };
      boundsProperty.setProperties(new Property[]{
          xProperty,
          yProperty,
View Full Code Here


        graphics.drawLine(r.right() - 1, r.y, r.right() - 1, r.bottom());
        // draw column index
        int titleLeft;
        {
          String title = "" + (1 + m_dimension.getIndex());
          Dimension textExtents = graphics.getTextExtent(title);
          if (r.width < 3 + textExtents.width + 3) {
            return;
          }
          // draw title
          titleLeft = r.x + (r.width - textExtents.width) / 2;
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, null, new Dimension(100, 40));
    assertEditor(
        "public class Test extends Panel {",
        "  public Test() {",
        "    setLayout(new AbsoluteLayout());",
        "    {",
View Full Code Here

        graphics.drawLine(r.x, r.bottom() - 1, r.right(), r.bottom() - 1);
        // draw row index
        int titleTop;
        {
          String title = "" + (1 + m_dimension.getIndex());
          Dimension textExtents = graphics.getTextExtent(title);
          if (r.height < 3 + textExtents.height + 3) {
            return;
          }
          // draw title
          titleTop = r.y + (r.height - textExtents.height) / 2;
View Full Code Here

    refresh();
    //
    WidgetInfo button = getObjectByName("button");
    frame.command_SIZE(
        button,
        new Dimension(200, 50),
        ResizeDirection.TRAILING,
        ResizeDirection.TRAILING);
    assertXML(
        "// filler filler filler filler filler",
        "<ui:UiBinder>",
View Full Code Here

    refresh();
    //
    WidgetInfo button = getObjectByName("button");
    frame.command_SIZE(
        button,
        new Dimension(150, 75),
        ResizeDirection.TRAILING,
        ResizeDirection.TRAILING);
    assertXML(
        "// filler filler filler filler filler",
        "<ui:UiBinder>",
View Full Code Here

    refresh();
    //
    WidgetInfo button = getObjectByName("button");
    frame.command_SIZE(
        button,
        new Dimension(100, 50),
        ResizeDirection.TRAILING,
        ResizeDirection.TRAILING);
    assertXML(
        "// filler filler filler filler filler",
        "<ui:UiBinder>",
View Full Code Here

    refresh();
    //
    WidgetInfo button = getObjectByName("button");
    frame.command_SIZE(
        button,
        new Dimension(90, 40),
        ResizeDirection.LEADING,
        ResizeDirection.LEADING);
    assertXML(
        "// filler filler filler filler filler",
        "<ui:UiBinder>",
View Full Code Here

    refresh();
    //
    WidgetInfo button = getObjectByName("button");
    frame.command_SIZE(
        button,
        new Dimension(150, 75),
        ResizeDirection.TRAILING,
        ResizeDirection.TRAILING);
    assertXML(
        "// filler filler filler filler filler",
        "<ui:UiBinder>",
View Full Code Here

TOP

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

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.