SWT mouseDoubleClicked / mouseUp / mouseDown

You are interested in both double clicks and single clicks in your SWT application ??

You have a problem since when the user double clicks the code for single clicks is also called !!!

Here is a useful discussion on SWT news group proposing a solution. (You must login in eclipse forums to access this link).

This solution works, nevertheless i would be interested in any other way to do this … if you have a solution please let me know.


One thought on “SWT mouseDoubleClicked / mouseUp / mouseDown

  1. There is no way to predict what the user will do next. All you can do is delay the single click job until you are sure there is no double-click event coming. There is no other possibilty.
    Knowing the exact double-click delay would help of course, because otherwise you have to wait the maximum double-click time.
    Another option is to use the right mouse button, or shift-click for certain tasks. Single click should always just select, double click open, etc. You could add a context menu.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s