Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » TreeViewer with special rendering for items(org.eclipse.jface.viewers.TreeViewer)
TreeViewer with special rendering for items [message #501960] Fri, 04 December 2009 10:27 Go to next message
Eclipse UserFriend
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 #502027 is a reply to message #501960] Fri, 04 December 2009 15:11 Go to previous messageGo to next message
Eclipse UserFriend
cdsosi wrote:
> Hi,
> Question about TreeViewers :

Best asked on eclipse.platform.swt, probably.
Re: TreeViewer with special rendering for items [message #502218 is a reply to message #502027] Mon, 07 December 2009 04:40 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

I 'll also try on eclipse.platform.swt (Wink) but i think anyone can help on this forum as Java Outline display special rendering for types on member variables!!

Regards
Re: TreeViewer with special rendering for items [message #502401 is a reply to message #502218] Mon, 07 December 2009 20:11 Go to previous messageGo to next message
Eclipse UserFriend
cdsosi wrote:
> Hi,
>
> I 'll also try on eclipse.platform.swt (;)) but i think anyone can help
> on this forum as Java Outline display special rendering for types on
> member variables!!

Have you taken a look at the jdt.ui code that does that? If you have a question
about how or where a feature in JDT UI is implemented, this is a good forum to
ask in but it will help if you can be specific about which particular JDT
feature you're asking about, and where you've already looked.
Re: TreeViewer with special rendering for items [message #503710 is a reply to message #502218] Tue, 15 December 2009 07:23 Go to previous messageGo to next message
Eclipse UserFriend
cdsosi wrote:
> Hi,
>
> I 'll also try on eclipse.platform.swt (;)) but i think anyone can
> help on this forum as Java Outline display special rendering for types
> on member variables!!
See org.eclipse.jface.viewers.DecoratingStyledCellLabelProvider.

Dani
>
> Regards
Re: TreeViewer with special rendering for items [message #503881 is a reply to message #501960] Wed, 16 December 2009 03:48 Go to previous message
Eclipse UserFriend
Thanks Dani for your reply.

I 've already had a look at the class you mentioned and that is, for the moment, enough for what I wanted to do...

Regards
Previous Topic:Delete Me
Next Topic:JavaRuntime.getDefaultVMInstall() throws a NullPointerException on Mac OS X
Goto Forum:
  


Current Time: Fri Mar 21 04:17:46 EDT 2025

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

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

Back to the top