Bug 121736 - [Viewers] JFace viewer classes could be more helpful for complex text presentations
Summary: [Viewers] JFace viewer classes could be more helpful for complex text present...
Status: RESOLVED DUPLICATE of bug 188333
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1.1   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Boris Bokowski CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-21 10:35 EST by benson margulies CLA
Modified: 2007-06-26 14:10 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 benson margulies CLA 2005-12-21 10:35:38 EST
The list viewer imposes a requirement that all of the text displayed has to be in one font. I've just been through the process of constructing a Viewer subclass that, as much as possible, behaves just like the list viewer, but displays a list of more complex items. In this case, the items are several text controls so text can be in more than one font.

I ended up duplicating a lot of the contents of the ListViewer and even the AbstractListViewer, and I'm still not completely satisfied with my product.

On Win32, there's a concept of 'owner draw' that allows an app to get all the structural functionality of a complex control while still owning the painting process. I don't even need that; I just need a ListViewer-y thing that is modelled as a list of Composites into which I create whatever children I care to. Obviously, there is no concept of a label provider here in the 'return a string' sense, but there could still be a separate interface for taking an object from the model and setting up the appropriate current content of the controls within a list item.
Comment 1 Boris Bokowski CLA 2005-12-21 15:17:43 EST
As far as I understand, SWT will not implement owner-draw capabilities in the forseeable future.

You might want to have a look at KTable (on sourceforge I think) or CompositeTable (check out org.eclipse.jface.examples.databinding from CVS). Note that CompositeTable is not part of JFace.
Comment 2 benson margulies CLA 2005-12-21 17:18:33 EST
I understand that a full-blown owner draw architecture would be a massive undertaking. However, I submit that a fairly painless refactoring would allow viewers with a richer control environment. Thanks for the pointer; I have separate needs for a tabular control that isn't handicapped by the SWT table's dependence on the Windows List Control, which isn't really a table.
Comment 3 Boris Bokowski CLA 2007-06-26 14:10:24 EDT

*** This bug has been marked as a duplicate of bug 188333 ***