Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 341812

Summary: [Table][Tree] Support multiline column headers
Product: [RT] RAP Reporter: Andreas Hoegger <Andreas.Hoegger>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: Andreas.Hoegger, ruediger.herrmann, tbuschto
Version: 1.4   
Target Milestone: 1.5 M6   
Hardware: All   
OS: All   
Whiteboard: plan-version=1.5 plan-theme=widgets plan-status=committed
Attachments:
Description Flags
ItemLCAUtil_1.patch
none
RWT_1.patch
none
Table_1.patch none

Description Andreas Hoegger CLA 2011-04-04 11:55:13 EDT
Created attachment 192471 [details]
ItemLCAUtil_1.patch

Hi,

one of the major drawbacks we had in many projects was the imcapability of the swt table to display multi-line headers and multi-line rows.

In RWT we would like to apply the attached patch to at least support for multi-line table headers.
This will patch org.eclipse.rap.rwt and org.eclipse.rap.rwt.q07

Multi-line table rows are however still not reasonably possible (in an easy way without paint and metrics listeners...) due to the core swt method Table.getItemHeight() without an item argument.

-andy
Comment 1 Andreas Hoegger CLA 2011-04-04 11:55:54 EDT
Created attachment 192473 [details]
RWT_1.patch
Comment 2 Andreas Hoegger CLA 2011-04-04 11:56:20 EDT
Created attachment 192474 [details]
Table_1.patch
Comment 3 Rüdiger Herrmann CLA 2011-07-25 08:23:32 EDT
Recently I saw changes for multi-line headers in HEAD. Can this feature request be closed or are there any outstanding issues?
Comment 4 Tim Buschtoens CLA 2011-07-25 09:30:29 EDT
I think the only remaining issue is the API.
Comment 5 Rüdiger Herrmann CLA 2011-10-24 08:47:09 EDT
(In reply to comment #4)
> I think the only remaining issue is the API.
I think we should not provide distinct API for multi-column headers. I suggest to scan for line breaks and use these to split text across multkiple lines.
Example
  tableColumn.setText( "One line\nand another" );
Though this isn't strictly backwards compatible, it seems to me the most obvious way to achieve line breaks in column texts.
Comment 6 Tim Buschtoens CLA 2012-03-13 09:26:58 EDT
Fixed in CVS HEAD as suggested by Rüdiger.