Skip to main content



      Home
Home » Eclipse Projects » NatTable » Column widths - scaled / unscaled
Column widths - scaled / unscaled [message #1835151] Wed, 25 November 2020 12:35 Go to next message
Eclipse UserFriend
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] Wed, 25 November 2020 23:37 Go to previous messageGo to next message
Eclipse UserFriend
getConfiguredColumnWidthByPosition(int)
Re: Column widths - scaled / unscaled [message #1835161 is a reply to message #1835159] Thu, 26 November 2020 02:24 Go to previous messageGo to next message
Eclipse UserFriend
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 04:36 Go to previous messageGo to next message
Eclipse UserFriend
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 05:52 Go to previous message
Eclipse UserFriend
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: Fri May 16 02:17:36 EDT 2025

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

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

Back to the top