Wrong calculation of column startX after loadState() [message #1077849] |
Fri, 02 August 2013 08:17 |
Franz-Josef Wiszniewsky 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
|
|
|
|
Powered by
FUDForum. Page generated in 0.03245 seconds