Package org.eclipse.draw2d.geometry

Examples of org.eclipse.draw2d.geometry.Point.translate()


    Point location = this.constraint.getLocation();
    CompoundModel parent = this.getParentModel();

    if (parent != null && parent instanceof CompoundModel)
    {
      location.translate(parent.getLocationAbs());
    }

    return location;
  }
View Full Code Here


        IFigure contents = viewport.getContents();
       
        if (contents == null) return;
        Point p = viewport.getClientArea().getLocation();

        p.translate(viewport.getViewLocation().getNegated());
       
        Dimension newSize = viewport.getClientArea().getSize();
       
        contents.setBounds(new Rectangle(p, newSize));
      }
View Full Code Here

        dy = Math.ceil(((middley - point.y) / zoomedBounds.height) * lw);
      } else {
        dy = Math.floor(((middley - point.y) / zoomedBounds.height) * lw);
      }

      point.translate((int) dx, (int) dy);

      ret.addPoint(point);
    }
    return ret;
  }
View Full Code Here

* @see PasteTemplateAction#getPasteLocation(GraphicalEditPart)
*/
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

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.