Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » mouseDragged
mouseDragged [message #196404] Mon, 19 September 2005 16:13 Go to next message
Eclipse UserFriend
Originally posted by: bbieth.free.fr

Hello,

I'm trying to do a point which could be dragged over a Figure. So I
added a mouse motion listener to my point (currently a small
RectangleFigure). When the user does a quick move, the mouseDragged
method is not correctly called : only the beginning of the move is
notified ... so my point doesn't follow the cursor !
In fact it seem that the mouseDragged method is called when the cursor
is over the figure, so when it moves too fast the figure is not moved as
fast as the cursor and the cursor left the figure area ...
Is there a smart way to do it ?

Thanks,

Bruno
Re: mouseDragged [message #196435 is a reply to message #196404] Tue, 20 September 2005 00:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

to capture the mouse, you must consume the mousedown event. This tells GEF
that the current tool shouldn't continue to process the mouse, and it locks
all mouse events to that figure until the mouse is released.

"Bruno" <bbieth@free.fr> wrote in message
news:dgmo12$nub$1@news.eclipse.org...
> Hello,
>
> I'm trying to do a point which could be dragged over a Figure. So I added
> a mouse motion listener to my point (currently a small RectangleFigure).
> When the user does a quick move, the mouseDragged method is not correctly
> called : only the beginning of the move is notified ... so my point
> doesn't follow the cursor !
> In fact it seem that the mouseDragged method is called when the cursor is
> over the figure, so when it moves too fast the figure is not moved as fast
> as the cursor and the cursor left the figure area ...
> Is there a smart way to do it ?
>
> Thanks,
>
> Bruno
Re: mouseDragged [message #196450 is a reply to message #196435] Tue, 20 September 2005 12:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bbieth.free.fr

Ok thanks, I'll try it as soon as I can.

Randy Hudson a écrit :
> to capture the mouse, you must consume the mousedown event. This tells GEF
> that the current tool shouldn't continue to process the mouse, and it locks
> all mouse events to that figure until the mouse is released.
>
> "Bruno" <bbieth@free.fr> wrote in message
> news:dgmo12$nub$1@news.eclipse.org...
>
>>Hello,
>>
>>I'm trying to do a point which could be dragged over a Figure. So I added
>>a mouse motion listener to my point (currently a small RectangleFigure).
>>When the user does a quick move, the mouseDragged method is not correctly
>>called : only the beginning of the move is notified ... so my point
>>doesn't follow the cursor !
>>In fact it seem that the mouseDragged method is called when the cursor is
>>over the figure, so when it moves too fast the figure is not moved as fast
>>as the cursor and the cursor left the figure area ...
>>Is there a smart way to do it ?
>>
>>Thanks,
>>
>>Bruno
>
>
>
Re: mouseDragged [message #196458 is a reply to message #196435] Tue, 20 September 2005 13:05 Go to previous message
Eclipse UserFriend
Originally posted by: bbieth.free.fr

It works perfectly !! And it's so simple !
Thanks a lot !

Randy Hudson a écrit :
> to capture the mouse, you must consume the mousedown event. This tells GEF
> that the current tool shouldn't continue to process the mouse, and it locks
> all mouse events to that figure until the mouse is released.
>
> "Bruno" <bbieth@free.fr> wrote in message
> news:dgmo12$nub$1@news.eclipse.org...
>
>>Hello,
>>
>>I'm trying to do a point which could be dragged over a Figure. So I added
>>a mouse motion listener to my point (currently a small RectangleFigure).
>>When the user does a quick move, the mouseDragged method is not correctly
>>called : only the beginning of the move is notified ... so my point
>>doesn't follow the cursor !
>>In fact it seem that the mouseDragged method is called when the cursor is
>>over the figure, so when it moves too fast the figure is not moved as fast
>>as the cursor and the cursor left the figure area ...
>>Is there a smart way to do it ?
>>
>>Thanks,
>>
>>Bruno
>
>
>
Previous Topic:Hooking NewObject Wizard with Palette Drop
Next Topic:DirectedGraphLayout
Goto Forum:
  


Current Time: Thu Apr 25 07:38:37 GMT 2024

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

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

Back to the top