Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Select column & RowSelectionModel(Very long hang...)
Select column & RowSelectionModel [message #890982] Sat, 23 June 2012 16:54 Go to next message
Paul Woodward is currently offline Paul WoodwardFriend
Messages: 1
Registered: June 2012
Junior Member
There is a bug between SelectColumnCommandHandler and RowSelectionModel.

SelectColumnCommandHandler uses Integer.MAX_VALUE to identify all rows as being selected, however in RowSelectionModel, it has to iterate each row and store the values (where those rows exist). Looking up 2x10^9 rows takes a very long time however.

As a quick fix I've extended the RowSelectionModel as follows:

public void addSelection(final Rectangle range) {
if (range.y + range.height > gridLayer.getBodyDataProvider().getRowCount()) {
range.height = gridLayer.getBodyDataProvider().getRowCount() - range.y + 1;


Edit: version

[Updated on: Sat, 23 June 2012 18:06]

Report message to a moderator

Re: Select column & RowSelectionModel [message #891922 is a reply to message #890982] Tue, 26 June 2012 15:14 Go to previous message
Edwin Park is currently offline Edwin ParkFriend
Messages: 124
Registered: July 2009
Senior Member
Hi Paul,

Thanks for this - I have checked in a change to RowSelectionModel.addSelection() to consider the layer rowCount in order to limit the iteration.

Previous Topic:Select column upon RMB click
Next Topic:Using a different configuration gives a NullPointerException
Goto Forum:

Current Time: Thu Jan 23 00:16:17 GMT 2020

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

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

Back to the top