Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Wrong calculation of column startX after loadState()
Wrong calculation of column startX after loadState() [message #1077849] Fri, 02 August 2013 08:17 Go to next message
Franz-Josef Wiszniewsky is currently offline Franz-Josef WiszniewskyFriend
Messages: 11
Registered: January 2013
Junior Member
Hello,

currently I'm experiencing a weird behaviour while saving and reloading natTable states.

When I switch the last with the second last column in a table, then resize the (previously second last, now) last column and save this state via

Properties properties = new Properties();
nattable.saveState(prefix, properties)

and then reload these properties and apply them to the nattable via

nattable.loadState(prefix, properties);


the table gets erased, in case I reduced the column width. When I enlarge the column width instead, then a gap is displayed between the second last and the last column. It seems to me as if the default width is reassigned to the last column (even it clearly should not) and the startX index for the column is calculated wrong. The endX index stays correct though.

The properties to load are as follows:

myPrefix.COLUMN_HEADER.FILTER_ROW.rowHeight.resizableByDefault=true
myPrefix.BODY.columnIndexOrder=0,1,2,3,4,6,5,
myPrefix.BODY.columnWidth.resizableByDefault=true
myPrefix.COLUMN_HEADER.FILTER_ROW.columnWidth.resizableByDefault=true
myPrefix.COLUMN_HEADER.columnHeader.columnWidth.defaultSize=100
myPrefix.BODY.columnWidth.percentageSizing=false
myPrefix.COLUMN_HEADER.columnHeader.columnWidth.percentageSizing=false
myPrefix.COLUMN_HEADER.FILTER_ROW.columnWidth.percentageSizing=false
myPrefix.COLUMN_HEADER.FILTER_ROW.columnWidth.defaultSize=100
myPrefix.BODY.columnWidth.defaultSize=100
myPrefix.COLUMN_HEADER.FILTER_ROW.rowHeight.defaultSize=20
myPrefix.COLUMN_HEADER.columnHeader.rowHeight.percentageSizing=false
myPrefix.BODY.rowHeight.defaultSize=20
myPrefix.BODY.rowHeight.percentageSizing=false
myPrefix.COLUMN_HEADER.FILTER_ROW.rowHeight.percentageSizing=false
myPrefix.COLUMN_HEADER.columnHeader.columnWidth.resizableByDefault=true
myPrefix.BODY.rowHeight.resizableByDefault=true
myPrefix.COLUMN_HEADER.columnHeader.rowHeight.defaultSize=20
myPrefix.BODY.columnWidth.sizes=5\:179,
myPrefix.COLUMN_HEADER.columnHeader.rowHeight.resizableByDefault=true


As you can see I use pixel sized not percentage sized column widths.

Did anyone of you experience a similar behaviour? Do you have an advice how to fix this ?

[Updated on: Fri, 02 August 2013 08:17]

Report message to a moderator

Re: Wrong calculation of column startX after loadState() [message #1078141 is a reply to message #1077849] Fri, 02 August 2013 15:32 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Sorry I wasn't able to investigate on this. Maybe it is just an issue of composition. How is your layer stack composed?

In Git there are some new examples. Would need to extend to investigate your issue. But currently there is not plenty of time to do that.
Previous Topic:Upgrade from SourceForge 0.9 To Nebula 1.0.1
Next Topic:Selection multiple cells - possible bug
Goto Forum:
  


Current Time: Thu Apr 25 04:02:32 GMT 2024

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

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

Back to the top