|
Re: single click vs double click in draw2d [message #201250 is a reply to message #201194] |
Mon, 31 October 2005 14:07 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
Seems pretty simple to me:
click:
MouseDown
MouseUp
not a click:
MouseDown
MouseDoubleClick
MouseUp
"Andrew Eisenberg" <ade@cs.ubc.ca> wrote in message
news:dk4dpd$bst$1@news.eclipse.org...
> Hi,
>
> I am working in draw2d (not GEF) and I need a MouseListener object to
> react
> differently to a mouse double click event and a mouse click (simulated by
> a
> mouse press event followed by a mouse release event). However, I don't
> know
> how to do this.
>
> The problem is that the listener will receive mouse press and release
> events
> before receiving the double-click event, and as far as I know, there's no
> way to ignore the mouse press/release iff there is a double click coming
> next.
>
> Has anyone solved this problem?
>
> thanks,
> andrew eisenberg
>
>
|
|
|
|
Re: single click vs double click in draw2d [message #203102 is a reply to message #201310] |
Thu, 17 November 2005 15:57 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
We handle this case for you in the SelectEditPartTracker. The only way to
handle it is to do what the windows desktop does. You have to create a timer
and look for the double-click event before the timer goes off. Unfortunately
you'll have to guess how long the timer should be since the double-click
threshold is not exposed through SWT.
"Andrew Eisenberg" <ade@cs.ubc.ca> wrote in message
news:dk5edm$llq$1@news.eclipse.org...
> It's actually not like that:
>
> Click looks like this::
> MouseDown
> MouseUp
>
> Double Click looks like this:
> MouseDown
> MouseUp <=== I need to know here if I should do the single click or the
> double click
> MouseDown
> DoubleClick
> MouseUp
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.02748 seconds