Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » DoubleClick with key pressing on viewer
DoubleClick with key pressing on viewer [message #911243] Tue, 11 September 2012 04:26 Go to next message
Eclipse UserFriend
Hello,

I am trying to implement a doubleclick listener which uses key pressing, too.
For example I want to open another editor I click double on the item while pressing the ctrl key.

Adding the DoubleClickListener is very easy with the method addDoubleClickListener from the viewer class.

But how to combine both?
My idea was to get the pressed key while the event occured, but I don't know how to get that information.

Thanks for any advices.
Re: DoubleClick with key pressing on viewer [message #911551 is a reply to message #911243] Tue, 11 September 2012 16:56 Go to previous messageGo to next message
Eclipse UserFriend
The double click event originating in SWT does contain info about the
pressed modifier keys in its stateMask, so if you're able to get at the
viewer's underlying SWT Control then you can add an SWT.MouseDoubleClick
listener to the SWT Control instead of adding it to the viewer.

If you're not able to do this for some reason then you can ask about
this on the eclipse.platform.jface newgroup/forum.

Grant


On 9/11/2012 4:26 AM, Missing name Mising name wrote:
> Hello,
>
> I am trying to implement a doubleclick listener which uses key pressing,
> too.
> For example I want to open another editor I click double on the item
> while pressing the ctrl key.
>
> Adding the DoubleClickListener is very easy with the method
> addDoubleClickListener from the viewer class.
>
> But how to combine both?
> My idea was to get the pressed key while the event occured, but I don't
> know how to get that information.
>
> Thanks for any advices.
Re: DoubleClick with key pressing on viewer [message #911853 is a reply to message #911551] Wed, 12 September 2012 09:02 Go to previous message
Eclipse UserFriend
Thanks for the advice, it worked for me.
Previous Topic:HTML5 support for SWTBrowser
Next Topic:Native Bottom Bar on Mac OS X Lion
Goto Forum:
  


Current Time: Wed Jul 23 17:33:22 EDT 2025

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

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

Back to the top