Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How to get the location of the mouse in the editor canvas
How to get the location of the mouse in the editor canvas [message #190182] Tue, 02 August 2005 19:49 Go to next message
Brahmanandam Somanchi is currently offline Brahmanandam SomanchiFriend
Messages: 11
Registered: July 2009
Junior Member
Hi

How do I get the location in the Graphical Editor where the user right
clicks to get the Context Menu?

Here is the problem :

In my graphical editor, user can right-click and select an action ( called
"New Class") and bring up New Class dialog. Once the user fills in the
required details and press OK, the class figure need to be placed in the
location where the user right clicked in the editor canvas.

How do I get the location (in the editor canvas) so that I can place the
figure at the correct location

Regards
Brahma
Re: How to get the location of the mouse in the editor canvas [message #190245 is a reply to message #190182] Tue, 02 August 2005 21:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.unknown.com

We suggest that you do this in a location-neutral manner. What happens if
the context menu is brought up by pressing Shift+F10?

"Brahma Somanchi" <somanchi@ugs.com> wrote in message
news:c75b672bb8a5eb45291e9f633f20b823$1@www.eclipse.org...
> Hi
>
> How do I get the location in the Graphical Editor where the user right
> clicks to get the Context Menu?
>
> Here is the problem :
>
> In my graphical editor, user can right-click and select an action ( called
> "New Class") and bring up New Class dialog. Once the user fills in the
> required details and press OK, the class figure need to be placed in the
> location where the user right clicked in the editor canvas.
>
> How do I get the location (in the editor canvas) so that I can place the
> figure at the correct location
>
> Regards
> Brahma
>
>
>
Re: How to get the location of the mouse in the editor canvas [message #190250 is a reply to message #190182] Tue, 02 August 2005 22:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.unknown.com

P.S. You should search this newsgroup before posting queries. This has
been discussed several times before.

"Brahma Somanchi" <somanchi@ugs.com> wrote in message
news:c75b672bb8a5eb45291e9f633f20b823$1@www.eclipse.org...
> Hi
>
> How do I get the location in the Graphical Editor where the user right
> clicks to get the Context Menu?
>
> Here is the problem :
>
> In my graphical editor, user can right-click and select an action ( called
> "New Class") and bring up New Class dialog. Once the user fills in the
> required details and press OK, the class figure need to be placed in the
> location where the user right clicked in the editor canvas.
>
> How do I get the location (in the editor canvas) so that I can place the
> figure at the correct location
>
> Regards
> Brahma
>
>
>
Re: How to get the location of the mouse in the editor canvas [message #190746 is a reply to message #190245] Fri, 05 August 2005 17:56 Go to previous messageGo to next message
Brahmanandam Somanchi is currently offline Brahmanandam SomanchiFriend
Messages: 11
Registered: July 2009
Junior Member
Hi Pratik,

I found one discussion thread in the archives. It also suggests to
implement it in a location neutral way.( Here is the link for the archives
http://dev.eclipse.org/newslists/news.eclipse.tools.gef/msg0 2705.html )

Could you please elaborate on how to handle this requirement in a location
neutral manner?

Brahma
Re: How to get the location of the mouse in the editor canvas [message #190762 is a reply to message #190746] Fri, 05 August 2005 18:50 Go to previous message
Eclipse UserFriend
Originally posted by: none.unknown.com

One way is to do what our logic example does. Paste in the top-left corner
of the selected editpart. You might want to paste in the top-left visible
corner or some such thing.

"Brahma Somanchi" <somanchi@ugs.com> wrote in message
news:ad56bea2660cb3f49273a8576ab8eba5$1@www.eclipse.org...
> Hi Pratik,
>
> I found one discussion thread in the archives. It also suggests to
> implement it in a location neutral way.( Here is the link for the archives
> http://dev.eclipse.org/newslists/news.eclipse.tools.gef/msg0 2705.html )
>
> Could you please elaborate on how to handle this requirement in a location
> neutral manner?
>
> Brahma
>
>
>
>
Previous Topic:Adding BreadCrumbs to Palette Viewer
Next Topic:Palette label
Goto Forum:
  


Current Time: Thu Dec 12 20:31:41 GMT 2024

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

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

Back to the top