mouseDragged [message #196404] |
Mon, 19 September 2005 16:13 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03423 seconds