Package org.eclipse.wb.draw2d.geometry

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


  // "Live" support
  //
  ////////////////////////////////////////////////////////////////////////////
  @Override
  protected Dimension getLivePreferredSize() {
    Dimension size = super.getLivePreferredSize();
    CanvasInfo canvas = getCanvas();
    if (size == null && canvas != null) {
      size = canvas.getPreferredSize();
    }
    return size;
View Full Code Here


   */
  protected Dimension fetchObjectSize() throws Exception {
    Object object = getObject();
    Integer width = (Integer) ReflectionUtils.invokeMethodEx(object, "getVisibleWidth()");
    Integer height = (Integer) ReflectionUtils.invokeMethodEx(object, "getVisibleHeight()");
    return new Dimension(width, height);
  }
View Full Code Here

  public int getContainerGapValue(IAbstractComponentInfo component, int direction) {
    return AbsolutePolicyUtils.DEFAULT_CONTAINER_GAP;
  }

  public Dimension getContainerSize() {
    Dimension size = m_form.getModelBounds().getSize().getCopy();
    Insets insets = m_form.getClientAreaInsets();
    return size.shrink(insets.getWidth(), insets.getHeight());
  }
View Full Code Here

    return AbsolutePolicyUtils.DEFAULT_CONTAINER_GAP;
  }

  public Dimension getContainerSize() {
    ContainerInfo container = m_layout.getContainer();
    Dimension size = container.getModelBounds().getSize().getCopy();
    Insets insets = container.getClientAreaInsets();
    return size.shrink(insets.getWidth(), insets.getHeight());
  }
View Full Code Here

      protected void executeEdit() throws Exception {
        placementsSupport.commitAdd();
        Rectangle widgetModelBounds = component.getModelBounds();
        m_layout.command_CREATE(component, null);
        Point location = widgetModelBounds.getLocation();
        Dimension size = getSize(widgetModelBounds);
        m_layout.command_BOUNDS(component, location, size);
      }

      private Dimension getSize(Rectangle widgetModelBounds) {
        boolean hasForcedSize =
View Full Code Here

            "  }",
            "}");
    frame.refresh();
    ViewportInfo viewport = getJavaInfoByName("viewport");
    //
    assertEquals(new Dimension(300, 200), viewport.getBounds().getSize());
  }
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

            "}");
    container.refresh();
    AbsoluteLayoutInfo layout = (AbsoluteLayoutInfo) container.getLayout();
    WidgetInfo button = container.getWidgets().get(0);
    // set size
    layout.command_BOUNDS(button, null, new Dimension(100, 50));
    assertEditor(
        "public class Test extends LayoutContainer {",
        "  public Test() {",
        "    setLayout(new AbsoluteLayout());",
        "    {",
View Full Code Here

            "}");
    container.refresh();
    AbsoluteLayoutInfo layout = (AbsoluteLayoutInfo) container.getLayout();
    WidgetInfo button = container.getWidgets().get(0);
    // set size
    layout.command_BOUNDS(button, null, new Dimension(100, 50));
    assertEditor(
        "public class Test extends LayoutContainer {",
        "  public Test() {",
        "    setLayout(new AbsoluteLayout());",
        "    {",
View Full Code Here

        "      add(button);",
        "    }",
        "  }",
        "}");
    // set bounds
    layout.command_BOUNDS(newButton, new Point(10, 20), new Dimension(100, 50));
    assertEditor(
        "public class Test extends LayoutContainer {",
        "  public Test() {",
        "    setLayout(new AbsoluteLayout());",
        "    {",
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.