|
|
|
Re: How to display the figure's location when it moving [message #199757 is a reply to message #199633] |
Wed, 19 October 2005 02:42 |
Eclipse User |
|
|
|
Originally posted by: chenzhuang2000.126.com
Hi,Pratik,
This method is helpful to me, and I can get the relative location.
And one more question is, how to get the figure which is moving.
Here is part of code in policy for your reference, wish your suggestion.
/* (non-Javadoc)
* @see
org.eclipse.gef.editpolicies.LayoutEditPolicy#getMoveChildre nCommand(org.ecl
ipse.gef.Request)
*/
protected Command getMoveChildrenCommand(Request req) {
// System.out.println(this.getTargetEditPart(req));//it prints null
if(req instanceof ChangeBoundsRequest) {
Point point = ((ChangeBoundsRequest)req).getMoveDelta();
System.out.println(point);
}
return super.getMoveChildrenCommand(req);
}
"Pratik Shah" <none@unknown.com> д
|
|
|
|
Powered by
FUDForum. Page generated in 0.03522 seconds