Skip to main content



      Home
Home » Eclipse Projects » NatTable » default column size issue
default column size issue [message #1716700] Mon, 07 December 2015 10:53 Go to next message
Eclipse UserFriend
I have a strange problem when creating a table where columns width are set in percentages:
bodyDataLayer = new DataLayer(bodyDataProvider);
bodyDataLayer.setColumnWidthByPosition(0, 34);
bodyDataLayer.setColumnWidthByPosition(1, 33);
bodyDataLayer.setColumnWidthByPosition(2, 33);
bodyDataLayer.setColumnPercentageSizing(true);


Video is attached, also here:
https://drive.google.com/file/d/0B2Ajd8pcJvUjbnNDUGUyT1pDWEU/view?usp=sharing

After creation of a table the columns do no grab 100% of space and there is a bit of horizontal space left. As soon as I resize in vertical direction, the columns correctly span the whole horizontal space. After some debugging I can see there is something strange with the size calculation. In particular in function DataLayer::doCommand() clientAreaResizeCommand.getCalcArea().width returns the initially incorrect size (off by 15) , and the value jumps by 15 straight after resize event. Am I doing something wrong? Or is it a bug?

[Updated on: Mon, 07 December 2015 11:42] by Moderator

Re: default column size issue [message #1716720 is a reply to message #1716700] Mon, 07 December 2015 13:08 Go to previous messageGo to next message
Eclipse UserFriend
Please test with the latest 1.4 SNAPSHOT build. Might be that this was is a bug that has already been fixed there.
Re: default column size issue [message #1716850 is a reply to message #1716720] Tue, 08 December 2015 09:51 Go to previous messageGo to next message
Eclipse UserFriend
Thanks, I will try the snapshot, but it's not clear if we can use non-released build in production. In the meantime I checked that this problem doesn't happen on Ubuntu, and on Windows 8 the table flickers when resized and it's visible that the vertical scrollbar is drawn and then hidden, so that empty space is probably (?) occupied by hidden scrollbar.
Re: default column size issue [message #1716863 is a reply to message #1716850] Tue, 08 December 2015 11:42 Go to previous messageGo to next message
Eclipse UserFriend
Right, it seems like this issue was reported before: https://www.eclipse.org/forums/index.php/t/1067521/
Re: default column size issue [message #1717066 is a reply to message #1716863] Wed, 09 December 2015 13:52 Go to previous messageGo to next message
Eclipse UserFriend
All right, updated to the latest snapshot 456, is solved the above mentioned problem, but the new one appears in this build, even nastier (on windows 10, macos is OK). When I try to decrease the size of the table, I get the attached effect and the spinning wheel of death.
Re: default column size issue [message #1717077 is a reply to message #1717066] Wed, 09 December 2015 15:10 Go to previous messageGo to next message
Eclipse UserFriend
I think I have found the solution for this. The fix for the first issue introduced the one you are seeing. I pushed a possible fix for this to Gerrit: https://git.eclipse.org/r/#/c/62343/

Would be great if you could test this, so we are sure the issue is fixed correctly now. In my local tests the resizing looks very good with that patch, but I want to be sure.
Re: default column size issue [message #1717156 is a reply to message #1717077] Thu, 10 December 2015 05:47 Go to previous messageGo to next message
Eclipse UserFriend
Thanks, I'll try as soon as possible. At the moment, it's not a one-click solution to get git-repos into our project, we rely on maven to get the builds. Btw, are there concrete plans for 1.4.0 release?
Re: default column size issue [message #1717161 is a reply to message #1717156] Thu, 10 December 2015 06:33 Go to previous messageGo to next message
Eclipse UserFriend
Well, I think it should be easy to checkout the NatTable project and try to create a simple project that brings up the issue to see if it is solved with the patch. But ok ...

There are no concrete plans because I have to finish two major feature requests first. But I wanted to release 1.4 in the beginning of 2016.

BTW, if you want that all your columns have the same size with percentage sizing, you don't need to configure every column. The size calculation in the back is distributing the available space even to all columns if percentage sizing is enabled and nothing is configured for the columns.
Re: default column size issue [message #1717303 is a reply to message #1717161] Fri, 11 December 2015 08:50 Go to previous message
Eclipse UserFriend
Hi, yes it should be easy, I'll definitely try, the thing is that I don't use windows for development, so I have only a minimal ad-hoc build environment on local VM. For now we decided to use officially available builds and just get rid off percentage sizing.
Previous Topic:Doubleclick from a NatTable doesn't work with MacOS
Next Topic:Hide horizontal lines only
Goto Forum:
  


Current Time: Fri Jun 20 13:39:40 EDT 2025

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

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

Back to the top