Package org.eclipse.draw2d

Examples of org.eclipse.draw2d.IFigure.translateToAbsolute()


      @Override
      public Rectangle getBounds()
      {
        IFigure partFigure = this.editPart.getFigure();
          final org.eclipse.draw2d.geometry.Rectangle bounds = partFigure.getBounds().getCopy();
          partFigure.translateToAbsolute(bounds);
          Point viewerOrigin = this.diagramEditor.getGraphicalViewer().getControl().getLocation();
          viewerOrigin = this.diagramEditor.getGraphicalViewer().getControl().toDisplay(viewerOrigin);
          bounds.x += viewerOrigin.x;
          bounds.y += viewerOrigin.y;
          return new Rectangle( bounds.x, bounds.y, bounds.width, 20 );
View Full Code Here


  }

  private Rectangle getBounds() {
    final IFigure figure = ((GraphicalEditPart) part).getFigure();
    final Rectangle bounds = figure.getBounds().getCopy();
    figure.translateToAbsolute(bounds);
    return bounds;
  }

  public SWTBotGefEditPart activateDirectEdit() {
    return activateDirectEdit(null);
View Full Code Here

*/
protected Point getPasteLocation(GraphicalEditPart container) {
  Point result = new Point(10, 10);
  IFigure fig = container.getContentPane();
  result.translate(fig.getClientArea(Rectangle.SINGLETON).getLocation());
  fig.translateToAbsolute(result);
  return result;
}

}
View Full Code Here

   * @return the absolute bounds
   */
  private Rectangle getAbsoluteBounds(final SWTBotGefEditPart editPart) {
    IFigure figure = ((GraphicalEditPart) editPart.part()).getFigure();
    Rectangle bounds = figure.getBounds().getCopy();
    figure.translateToAbsolute(bounds);
    return bounds;
  }

  /**
   * Drag and drop the edit part which owns the specified label to the specified location
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.