Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Auto resize columns by double clicking on column boundry is not working some time(Auto resize columns by double clicking on column boundry is not working some time)
Auto resize columns by double clicking on column boundry is not working some time [message #1385829] Wed, 11 June 2014 12:48 Go to next message
Chetana Barhate is currently offline Chetana BarhateFriend
Messages: 9
Registered: February 2014
Junior Member
Hello All,

We have migrated our Table Viewer in to NatTable successfully. After some random steps (like resize column, sorting, closing view) the autoresize by clicking on the column boundry is not woking. We are using the Composite layer and register the below command:
compositeLayer.registerCommandHandler(new AutoResizeColumnCommandHandler(
compositeLayer, bodyLayer));
We have debug this issue and we found out the problem as:
In DragModeEventHandler: mouseUp() One condition is added
if (startCol == col && startRow == row) {
parentModeEventHandler.mouseUp(event);
}
Here this condition fails for (startCol == col). The "col" is return as the column position of the column where releasing the mouse.

We didn't found the reason behind it.

Please let me know if anybody having the solution for this issue.
Re: Auto resize columns by double clicking on column boundry is not working some time [message #1385831 is a reply to message #1385829] Wed, 11 June 2014 13:21 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 1407
Registered: July 2012
Senior Member
The issue you are describing is that you are moving the mouse on clicking. Therefore the drag mode is activated. I'm not sure if there is a solution for this. How should be checked that you are trying to perform a double click when moving the mouse while the mouse button is down?
Re: Auto resize columns by double clicking on column boundry is not working some time [message #1385854 is a reply to message #1385831] Wed, 11 June 2014 16:44 Go to previous messageGo to next message
gaurav dubey is currently offline gaurav dubeyFriend
Messages: 40
Registered: July 2009
Member
Hi Dirk,

The actual problem is NatTable not allows column resizing some times and columns get freeze, in that case we have to restart the application to make it again work.

What we found is when resize column command not fire, the issue comes. Reason can be in mouseUp method in DragModeEventHandler class, below condition not executed when column resize fails, because both mouse events provide different column number.
if (startCol == col && startRow == row) {
parentModeEventHandler.mouseUp(event);
}
In this case startCol and col values are different. We have taken an example given in NatTable examples plugin and implemented it in viewpart and it also shows the same issue. Column get freeze in some scenarios. But we are not able to recognize the exact steps for the same and the issue is coming randomly

Could you please help us and let us know if any workaround available for this issue?


[Updated on: Wed, 11 June 2014 16:46]

Report message to a moderator

Re: Auto resize columns by double clicking on column boundry is not working some time [message #1385862 is a reply to message #1385854] Wed, 11 June 2014 17:30 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 1407
Registered: July 2012
Senior Member
You ask for a workaround for a bug that is not exactly reproducible?

I never heard of such a bug, therefore I don't know a workaround. Please open a ticket, I will see when I'm able to take a look.

The code you are referring doesn't seem to me to be the cause as this is the code to trigger a mouse click rather than the drag operation.
Re: Auto resize columns by double clicking on column boundry is not working some time [message #1393710 is a reply to message #1385862] Fri, 04 July 2014 06:36 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 1407
Registered: July 2012
Senior Member
Hi,

I came across the fact that the same question was asked in the SourceForge version. I thought the forum there was made readonly two years ago.

I didn't asked which version you are using, but if you really using the SourceForge version you may have several issues. Me moved from SourceForge to Eclipse about two years ago. The version 2.3.2 is therefore quite old and contains several bugs that have been already fixed in the current Eclipse version which is 1.1.0 atm.

I really recommend to update to the Eclipse version if you haven't done already. There are a lot of improvements and fixes since the 2.3.2 SourceForge version!

Greez,
Dirk
Previous Topic:comboboxcelleditor not working on the column.
Next Topic:Nattable navigation using up/down/left/right arrows
Goto Forum:
  


Current Time: Thu Nov 27 07:11:17 GMT 2014

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

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