Package org.eclipse.wb.draw2d.geometry

Examples of org.eclipse.wb.draw2d.geometry.Rectangle.translate()


   */
  public Rectangle getButtonBarBounds() {
    Object buttonBar = ReflectionUtils.invokeMethodEx(getObject(), "getButtonBar()");
    Object buttonBarElement = getUIObjectUtils().getElement(buttonBar);
    Rectangle bounds = getState().getAbsoluteBounds(buttonBarElement);
    bounds.translate(getModelBounds().getLocation().getNegated());
    return bounds;
  }

  /**
   * @return {@link ButtonInfo}-s added using <code>addButton()</code>.
View Full Code Here


          m_deviceFigure.setSize(image.getBounds().width, image.getBounds().height);
        }
        // update EditPart figure
        {
          Rectangle bounds = device.getDisplayBounds().getCopy();
          bounds.translate(DEVICE_LOCATION);
          m_editPart.getFigure().setBounds(bounds);
        }
      } else {
        Rectangle bounds = m_object.getBounds();
        bounds =
View Full Code Here

      // absolute bounds
      m_absoluteBounds = getState().getAbsoluteBounds(element);
      // model/parent bounds
      Rectangle bounds = m_absoluteBounds.getCopy();
      AbstractComponentInfo parent = (AbstractComponentInfo) getParent();
      bounds.translate(parent.getAbsoluteBounds().getLocation().getNegated());
      bounds.translate(parent.getClientAreaInsets().getNegated());
      setModelBounds(bounds);
    }
  }
  ////////////////////////////////////////////////////////////////////////////
View Full Code Here

      m_absoluteBounds = getState().getAbsoluteBounds(element);
      // model/parent bounds
      Rectangle bounds = m_absoluteBounds.getCopy();
      AbstractComponentInfo parent = (AbstractComponentInfo) getParent();
      bounds.translate(parent.getAbsoluteBounds().getLocation().getNegated());
      bounds.translate(parent.getClientAreaInsets().getNegated());
      setModelBounds(bounds);
    }
  }
  ////////////////////////////////////////////////////////////////////////////
  //
View Full Code Here

    m_absoluteBounds = fetchAbsoluteBounds(element);
    {
      Rectangle bounds = m_absoluteBounds.getCopy();
      if (getParent() instanceof UIObjectInfo) {
        UIObjectInfo parent = (UIObjectInfo) getParent();
        bounds.translate(parent.m_absoluteBounds.getLocation().getNegated());
        bounds.translate(parent.getClientAreaInsets().getNegated());
      }
      setModelBounds(bounds);
    }
  }
View Full Code Here

    {
      Rectangle bounds = m_absoluteBounds.getCopy();
      if (getParent() instanceof UIObjectInfo) {
        UIObjectInfo parent = (UIObjectInfo) getParent();
        bounds.translate(parent.m_absoluteBounds.getLocation().getNegated());
        bounds.translate(parent.getClientAreaInsets().getNegated());
      }
      setModelBounds(bounds);
    }
  }
View Full Code Here

      Rectangle bounds =
          new Rectangle(interval.begin,
              0,
              interval.length + 1,
              ((GraphicalEditPart) getParent()).getFigure().getSize().height);
      bounds.translate(getOffset().x, 0);
      figure.setBounds(bounds);
    }
  }

  ////////////////////////////////////////////////////////////////////////////
View Full Code Here

      Rectangle bounds =
          new Rectangle(0,
              interval.begin,
              ((GraphicalEditPart) getParent()).getFigure().getSize().width,
              interval.length + 1);
      bounds.translate(0, getOffset().y);
      figure.setBounds(bounds);
    }
  }

  ////////////////////////////////////////////////////////////////////////////
View Full Code Here

    private Rectangle getBoundsEx() throws Exception {
      Object container = getColumnContainer();
      Object containerElement = getUIObjectUtils().getElement(container);
      Rectangle bounds = getState().getAbsoluteBounds(containerElement);
      bounds.translate(getState().getAbsoluteBounds(getElement()).getLocation().getNegated());
      // exclude spacing
      {
        int spacing = ReflectionUtils.getFieldInt(getObject(), "spacing");
        bounds.moveX(spacing);
      }
View Full Code Here

    m_headers.clear();
    for (TabItemInfo item : getItems()) {
      Object headerObject = ReflectionUtils.invokeMethod(item.getObject(), "getHeader()");
      Object headerElement = ReflectionUtils.invokeMethod(headerObject, "getElement()");
      Rectangle headerBounds = getState().getAbsoluteBounds(headerElement);
      headerBounds.translate(getAbsoluteBounds().getLocation().getNegated());
      m_headers.add(new Header(item, headerBounds));
    }
  }

  ////////////////////////////////////////////////////////////////////////////
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.