Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » How to configure the DefaultSelectionLayerConfiguration(How to configure the DefaultSelectionLayerConfiguration to select additionally the next row with SHIFT+Arrow-Down)
How to configure the DefaultSelectionLayerConfiguration [message #1799431] Thu, 06 December 2018 17:14 Go to next message
Hilger Steenblock is currently offline Hilger SteenblockFriend
Messages: 16
Registered: June 2016
Junior Member
I try to implement following behavior:
- click with the mouse in the row header to select one row fully
- use the keyboard command SHIFT+ARROW_DOWN to extend the row selection.

The DefaultRowSelectionLayerConfiguration has this feature but on the other side the disadvantage (at least for us) to select a row fully if the Arrow-Right or Arrow-Left key is used. Any comments you have would be appreciated.
Re: How to configure the DefaultSelectionLayerConfiguration [message #1799436 is a reply to message #1799431] Thu, 06 December 2018 18:27 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2690
Registered: July 2012
Senior Member
Actually I think this is a bug in the SelectRowCommandHandler. The lastSelectedCell is set to the first column instead of the last column. If set to the last column the behavior is as expected.
Re: How to configure the DefaultSelectionLayerConfiguration [message #1799439 is a reply to message #1799436] Thu, 06 December 2018 19:02 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2690
Registered: July 2012
Senior Member
I just tried to change this, but then multiple test cases are failing. Seems a bug fix will take some time to ensure there are no negative side effects.
Feel free to create a bug report for this.
In the meantime you can create and register your own SelectRowCommandHandler where the last selected cell is set to columnPosition selectionLayer.getColumnCount().

The failed test cases are related to selection traversal. Not sure if the test cases need to be adjusted or if there are negative side effects. I will need to check this in more detail to be sure.
Re: How to configure the DefaultSelectionLayerConfiguration [message #1799442 is a reply to message #1799439] Thu, 06 December 2018 19:56 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2690
Registered: July 2012
Senior Member
I have created https://bugs.eclipse.org/bugs/show_bug.cgi?id=542486 for this and already provided a patch. It is not merged yet as some tests should be done in advance.
Re: How to configure the DefaultSelectionLayerConfiguration [message #1799519 is a reply to message #1799442] Sat, 08 December 2018 09:15 Go to previous message
Hilger Steenblock is currently offline Hilger SteenblockFriend
Messages: 16
Registered: June 2016
Junior Member
The new patch works very well.
Previous Topic:How to configure the Selection Style to not override the text foreground color of a selected cell
Next Topic:Problem with Column Group Reorder and Column Grouping by Value
Goto Forum:
  


Current Time: Mon Jun 17 15:07:17 GMT 2019

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

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

Back to the top