Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Column widths - scaled / unscaled
Column widths - scaled / unscaled [message #1835151] Wed, 25 November 2020 17:35 Go to next message
Klaus Reger is currently offline Klaus RegerFriend
Messages: 13
Registered: December 2016
Junior Member
Hello

I noticed, that the methods

getColumnWidthByPosition(int columnPosition,) and 
setColumnWidthByPosition(int columnPosition, int width)

in the Class DataLayer behave differently.

The set-Method puts the width in pixel-size, but the get-Method returns a up- or downscaled value.

How can I get the raw-Value (pixels) from the DataLayer?

Cheers, Klaus
Re: Column widths - scaled / unscaled [message #1835159 is a reply to message #1835151] Thu, 26 November 2020 04:37 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
getConfiguredColumnWidthByPosition(int)
Re: Column widths - scaled / unscaled [message #1835161 is a reply to message #1835159] Thu, 26 November 2020 07:24 Go to previous messageGo to next message
Klaus Reger is currently offline Klaus RegerFriend
Messages: 13
Registered: December 2016
Junior Member
Dirk Fauth wrote on Thu, 26 November 2020 04:37
getConfiguredColumnWidthByPosition(int)


Was this added in 1.6? I am using nattable-1.5.
Re: Column widths - scaled / unscaled [message #1835168 is a reply to message #1835161] Thu, 26 November 2020 09:36 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Yes it was added with 1.6 because it was not easily possible to get the configured column width with 1.5. With 1.5 you will need to get the column width and then perform a downscale operation. Not sure if there was an API available in 1.5. Maybe via GUIHelper#convertXxx. If no scaling needs to be performed, the value should not change.

1.5 is more than 2 years old and I am currently working on the 2.0 release. So I am not sure about the old API anymore.
Re: Column widths - scaled / unscaled [message #1835175 is a reply to message #1835168] Thu, 26 November 2020 10:52 Go to previous message
Klaus Reger is currently offline Klaus RegerFriend
Messages: 13
Registered: December 2016
Junior Member
Thank you very much.
Indeed the GUIHelper can be used to downscale again.
Previous Topic:Drag the mouse to select multiple row headers to select multiple rows
Next Topic:Please test the latest NatTable 2.0 SNAPSHOT
Goto Forum:
  


Current Time: Thu Apr 25 12:31:12 GMT 2024

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

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

Back to the top