Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Right click mouse binding(Righ-click mouse binding)
Right click mouse binding [message #1108242] Fri, 13 September 2013 14:57 Go to next message
john ma is currently offline john ma
Messages: 2
Registered: September 2013
Junior Member
Hi,

I would like to get the mouse right click binding to select when I right click over a row that is not selected.
I can configure to do the selection with the following:

uiBindingRegistry.registerMouseDownBinding(MouseEventMatcher.bodyRightClick(SWT.NONE), new SelectRowAction());

However this also applies the selection action when I right click on selected rows which I don't want it to do.
For example, I highlight multiple rows and then I right click over it.
In this situation, it removes my selections and selects the row I right clicked over.

Is there a way to solve this?

Thanks,

John.
Re: Right click mouse binding [message #1108360 is a reply to message #1108242] Fri, 13 September 2013 18:53 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk Fauth
Messages: 1300
Registered: July 2012
Senior Member
If I understand you correctly you want to avoid performing a selection if the rows are already selected. Is that correct?

In this case you should implement a custom action that performs a check on the selected state of the row prior performing the SelectRowAction.
Re: Right click mouse binding [message #1108374 is a reply to message #1108360] Fri, 13 September 2013 19:16 Go to previous message
john ma is currently offline john ma
Messages: 2
Registered: September 2013
Junior Member
Yeah I just managed to figure that out and implemented the custom action.
Thanks for you response!

Previous Topic:Cell, row header, and column header selection not working in RCP app
Next Topic:checkbox problem
Goto Forum:
  


Current Time: Wed Oct 01 04:06:04 GMT 2014

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

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