Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Translating from request.getLocation() to container coordinates
Translating from request.getLocation() to container coordinates [message #175625] Tue, 05 April 2005 17:06 Go to next message
Eclipse UserFriend
Originally posted by: Angel.Roman.prismtech.com

Hi Everyone,

When the user clicks on a container figure with a creation tool my
policy receives a request who's location is set to the viewer
coordinates. What's the best way to translate the request.getLocation()
position to the container figure location?

Regards,
Angel
Re: Translating from request.getLocation() to container coordinates [message #175669 is a reply to message #175625] Tue, 05 April 2005 18:06 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
containerFigure.translateToRelative(location)

"Angel Roman" <Angel.Roman@prismtech.com> wrote in message
news:d2ugq2$kpu$1@news.eclipse.org...
> Hi Everyone,
>
> When the user clicks on a container figure with a creation tool my
> policy receives a request who's location is set to the viewer
> coordinates. What's the best way to translate the request.getLocation()
> position to the container figure location?
>
> Regards,
> Angel
Re: Translating from request.getLocation() to container coordinates [message #175685 is a reply to message #175669] Tue, 05 April 2005 19:57 Go to previous message
Eclipse UserFriend
Originally posted by: Angel.Roman.prismtech.com

Pratik Shah wrote:
> containerFigure.translateToRelative(location)
>
> "Angel Roman" <Angel.Roman@prismtech.com> wrote in message
> news:d2ugq2$kpu$1@news.eclipse.org...
>
>>Hi Everyone,
>>
>>When the user clicks on a container figure with a creation tool my
>>policy receives a request who's location is set to the viewer
>>coordinates. What's the best way to translate the request.getLocation()
>>position to the container figure location?
>>
>>Regards,
>>Angel
>
>
>
Thanks for the answer. It led me to the function I needed which is
translateFromParent().
Previous Topic:Drawing terminals in a figure like the logic example
Next Topic:LineBorder, ConnectionAnchors and Zooming
Goto Forum:
  


Current Time: Thu Apr 25 07:08:29 GMT 2024

Powered by FUDForum. Page generated in 0.03280 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top