Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Paste action location
Paste action location [message #126335] Wed, 07 April 2004 14:07 Go to next message
Eclipse UserFriend
Originally posted by: grandan.tiscali.it

I'm implementing a paste action in my GEF application.
How can I know the mouse coordinates, so to paste the new element in this
position?
I'd like to have a getPasteLocation() method which tell me the mouse
position.

Thank you very much,

Daniele
Re: Paste action location [message #126352 is a reply to message #126335] Wed, 07 April 2004 14:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: phil.williams.toadmail.com

I do this a little differently. I get the past location based off of
the copied element's location. Then I just shift it before I paste.

Daniele wrote:

>I'm implementing a paste action in my GEF application.
>How can I know the mouse coordinates, so to paste the new element in this
>position?
>I'd like to have a getPasteLocation() method which tell me the mouse
>position.
>
>Thank you very much,
>
>Daniele
>
>
>
>
>
Re: Paste action location [message #126793 is a reply to message #126352] Mon, 12 April 2004 14:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Good idea. The mouse could be anywhere on the screen!

"Phil Williams" <phil.williams@toadmail.com> wrote in message
news:c51485$5i7$1@eclipse.org...
> I do this a little differently. I get the past location based off of
> the copied element's location. Then I just shift it before I paste.
>
> Daniele wrote:
>
> >I'm implementing a paste action in my GEF application.
> >How can I know the mouse coordinates, so to paste the new element in this
> >position?
> >I'd like to have a getPasteLocation() method which tell me the mouse
> >position.
> >
> >Thank you very much,
> >
> >Daniele
> >
> >
> >
> >
> >
Re: Paste action location [message #149003 is a reply to message #126793] Mon, 30 August 2004 16:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: gayatri.us.ibm.com

Randy,
Can you please explain how this can be done? I have a way of finding out
the mouse location so I can use that for my paste location. However, if
we are using only the keyboard, then how do I find the paste location?

thanks,
gayatri

Randy Hudson wrote:

> Good idea. The mouse could be anywhere on the screen!
>
> "Phil Williams" <phil.williams@toadmail.com> wrote in message
> news:c51485$5i7$1@eclipse.org...
>
>>I do this a little differently. I get the past location based off of
>>the copied element's location. Then I just shift it before I paste.
>>
>>Daniele wrote:
>>
>>
>>>I'm implementing a paste action in my GEF application.
>>>How can I know the mouse coordinates, so to paste the new element in this
>>>position?
>>>I'd like to have a getPasteLocation() method which tell me the mouse
>>>position.
>>>
>>>Thank you very much,
>>>
>>>Daniele
>>>
>>>
>>>
>>>
>>>
>
>
>
Re: Paste action location [message #149057 is a reply to message #149003] Mon, 30 August 2004 17:08 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

You can't find it. You can just query where the mouse is but it doesn't
mean anything. The best way is to paste in a default location such as the
middle of the diagram, or the original location PLUS some offset down and to
the right.

"grenga" <gayatri@us.ibm.com> wrote in message
news:cgvkhh$ls6$1@eclipse.org...
> Randy,
> Can you please explain how this can be done? I have a way of finding out
> the mouse location so I can use that for my paste location. However, if
> we are using only the keyboard, then how do I find the paste location?
>
> thanks,
> gayatri
>
> Randy Hudson wrote:
>
> > Good idea. The mouse could be anywhere on the screen!
> >
> > "Phil Williams" <phil.williams@toadmail.com> wrote in message
> > news:c51485$5i7$1@eclipse.org...
> >
> >>I do this a little differently. I get the past location based off of
> >>the copied element's location. Then I just shift it before I paste.
> >>
> >>Daniele wrote:
> >>
> >>
> >>>I'm implementing a paste action in my GEF application.
> >>>How can I know the mouse coordinates, so to paste the new element in
this
> >>>position?
> >>>I'd like to have a getPasteLocation() method which tell me the mouse
> >>>position.
> >>>
> >>>Thank you very much,
> >>>
> >>>Daniele
> >>>
> >>>
> >>>
> >>>
> >>>
> >
> >
> >
>
Previous Topic:Creating an Image of the figures
Next Topic:How to create Table in GEF ?
Goto Forum:
  


Current Time: Fri Apr 19 23:32:53 GMT 2024

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

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

Back to the top