Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » TreeViewer with special rendering for items
TreeViewer with special rendering for items [message #502219] Mon, 07 December 2009 09:41 Go to next message
cdsosi is currently offline cdsosiFriend
Messages: 10
Registered: November 2009
Junior Member
Hi,
Question about TreeViewers :

The basic rendering often presented as examples is a class implementing the interface ILabelProvider which defines two methods public Image getImage(Object element) and public String getText(Object element). This instance of ILabelProvider is parameter of the setLabelProvider method on the Treeviewer.

The question is :
Is it possible to build a TreeViewer with special rendering for items visible in the tree (setting a more sophisticated rendering with StyledText for instance)?
I want for example to have a particular background color for special items in the tree or special fonts, ...

Any help would be appreciated.

Regards
Re: TreeViewer with special rendering for items [message #502235 is a reply to message #502219] Mon, 07 December 2009 10:48 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
http://wiki.eclipse.org/JFaceSnippets#Snippet049StyledCellLa belProvider
cdsosi schrieb:
> Hi,
> Question about TreeViewers :
>
> The basic rendering often presented as examples is a class implementing
> the interface ILabelProvider which defines two methods public Image
> getImage(Object element) and public String getText(Object element). This
> instance of ILabelProvider is parameter of the setLabelProvider method
> on the Treeviewer.
>
> The question is :
> Is it possible to build a TreeViewer with special rendering for items
> visible in the tree (setting a more sophisticated rendering with
> StyledText for instance)?
> I want for example to have a particular background color for special
> items in the tree or special fonts, ...
>
> Any help would be appreciated.
>
> Regards
>
Previous Topic:Add a MultiButtonCellEditor to a tableViewer
Next Topic:Why doesn't my Composite receive Keyboard events even after I call setFocus?
Goto Forum:
  


Current Time: Tue Apr 23 12:38:39 GMT 2024

Powered by FUDForum. Page generated in 0.03216 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top