Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 353564 - [Tree] Empty space in header after packing tree columns
Summary: [Tree] Empty space in header after packing tree columns
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.5   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.5 M1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-02 07:47 EDT by Ivan Furnadjiev CLA
Modified: 2011-08-09 05:30 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Furnadjiev CLA 2011-08-02 07:47:22 EDT
Reproducible with Controls Demo -> Tree tab from CVS HEAD. Change TreeTab.java line 119 to pack any column, but not the last.
1. Run Controls Demo -> Tree tab
2. Resize the main Shell to make all columns visible (including the "dummy" column space at the end).
3. Click on "Pack all columns" button - there is an empty space in the header between the last tree column and the "dummy" column.
Comment 1 Ivan Furnadjiev CLA 2011-08-08 07:13:35 EDT
Currently, left and width of the "dummy" column is updated (TableHeader.js#_renderDummyColumn) only when column width is changed. At that point, the columns have the new width, but columns left still have the old value. This leads to wrong left calculation of "dummy" column left (TableHeader.js#_getDummyColumnLeft). Adding "changeLeft" listener in TableHeader.js#add method that execute TableHeader.js#_renderDummyColumn fixes the problem, but this will trigger unnecessary _renderDummyColumn calls. Tim, what do you think?
Comment 2 Tim Buschtoens CLA 2011-08-08 08:57:48 EDT
I think that this isnt a very a elegant solution, but the entire tableheader stuff isnt very elegantly implemented to begin with. A better solution in my opinion would be to set the layout of the columns on the Tree at once, like we do with the item metrics. But your approach would be ok too if we dont have the time for refactoring this.
Comment 3 Ivan Furnadjiev CLA 2011-08-09 05:30:17 EDT
Fixed by adding "changeLeft" listener in TableHeader.js#add. Changes are in CVS HEAD.