Copy Location [message #222411] |
Mon, 04 September 2006 10:47 |
Eclipse User |
|
|
|
Originally posted by: vinicius.ferraz.gmail.com
I wanna to copy and paste Objects in my editor, only one thing is
Incorrect: How can I discover Where the mouse was clicked to paste the
element in the correct location?
I'm using the Logic code:
protected Point getPasteLocation(GraphicalEditPart container) {
Point result = new Point(10, 10);
IFigure fig = container.getContentPane();
result.translate(fig.getClientArea(Rectangle.SINGLETON).getL ocation());
fig.translateToAbsolute(result);
return result;
}
However always return the same point... =(
PS: I'm using copy and paste only with the mouse...
Other Thing, if I use one keyboard to copy, Can I know The difference?
|
|
|
Powered by
FUDForum. Page generated in 0.03827 seconds