Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354120 - AbstractTable: Cell icon not considered when wrapping text
Summary: AbstractTable: Cell icon not considered when wrapping text
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Scout (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-08 06:02 EDT by Beat Schwarzentrub CLA
Modified: 2021-08-19 11:18 EDT (History)
2 users (show)

See Also:
andi.bur: juno+


Attachments
Example.java (1.09 KB, application/octet-stream)
2011-08-08 06:02 EDT, Beat Schwarzentrub CLA
no flags Details
TestTable_NOK.png (1.85 KB, image/png)
2011-08-08 06:02 EDT, Beat Schwarzentrub CLA
no flags Details
TestTable_OK.png (1.95 KB, image/png)
2011-08-08 06:03 EDT, Beat Schwarzentrub CLA
no flags Details
Proposed Patch (1.04 KB, patch)
2012-02-08 09:32 EST, Ralph Steiner CLA
andi.bur: iplog+
Details | Diff
Test Table with the patch applied (18.44 KB, image/png)
2012-02-09 03:27 EST, Ralph Steiner CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Beat Schwarzentrub CLA 2011-08-08 06:02:12 EDT
Build Identifier: 3.7.0.2011-Jun 2011

PROBLEM DESCRIPTION:
When a column has getConfiguredTextWrap() = true, the text is broken up in multiple lines and the row's height is adjusted so that the full text is visible. However, the algorithm that adjusts the row's height does not seem to consider cell icons. It is possible that the text is wrapped, but the row's height is not adjusted.

In the attached example, the word "IMPORTANT" cannot be seen ("NOK"). When the column width is decreased about the width of the icon, the wrapping is correct ("OK").

EVALUATION:
-

PROPOSED SOLUTION:
-

Reproducible: Always
Comment 1 Beat Schwarzentrub CLA 2011-08-08 06:02:45 EDT
Created attachment 201063 [details]
Example.java
Comment 2 Beat Schwarzentrub CLA 2011-08-08 06:02:56 EDT
Created attachment 201064 [details]
TestTable_NOK.png
Comment 3 Beat Schwarzentrub CLA 2011-08-08 06:03:05 EDT
Created attachment 201065 [details]
TestTable_OK.png
Comment 4 Ralph Steiner CLA 2012-02-08 09:32:19 EST
Created attachment 210736 [details]
Proposed Patch

I've found the bug. I had the same problem in a diffrent context. With this patch, all worked fine. I've not tested the patch against the example provided by Beat Schwarzentrub.

As one can see in the patch, the bug and its fix is obvious. (iconR.width would be always '0'. The developer had the 'icon' variable in mind not the 'iconR')
Comment 5 Ralph Steiner CLA 2012-02-09 03:27:21 EST
Created attachment 210776 [details]
Test Table with the patch applied

I have tested now the patch against the test table code from Beat Schwarzentrub. I have created a new empty project and added an empty form with this test table. The attached picture shows the correct behavior with the patch. Test was done on the scout trunk.
Comment 6 Andi Bur CLA 2012-08-17 10:57:57 EDT
Reviewed and applied patch on Scout branches 3.8 and 3.9.
Beat, Ralph: Thanks for your contribution.
Comment 7 Matthias Zimmermann CLA 2012-11-13 02:36:24 EST
shipped with scout juno sr1