Project: Eclipse_Platform_UI
Bug 208335 [JFace] AbstractColumnLayout does not handle columns with minimum and weight correctly
Reported: 2007-10-31 18:43:55 | Status: verified fixed

When calculating the widths of columns that have a ColumnWeightData with both weight and minimum width, the AbstractColumnLayout appends the minimum width on to the width calculation rather than using it as an actual minimum value. This causes the widths of the columns not to honor their weight settings correctly. Say for instance that you construct a table or tree with two columns, the first with a weight of 1 and a min width of 50, the second with a weight of 1 and a min width of 100. If there are 400 pixels of available space we should see both columns having equal width. The minimums should not come in to play in this instance. Instead the second column is larger than the first. The algorithm in question is located in AbstractColumnLayout#layoutTableTree

Files changed in fix:
bundles/org.eclipse.jface/src/org/eclipse/jface/layout/AbstractColumnLayout.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/layout/AbstractColumnLayoutTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/layout/AllTests.java