Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Icons in TreeViewer
Icons in TreeViewer [message #130577] Tue, 28 April 2009 14:22 Go to next message
No real name is currently offline No real nameFriend
Messages: 38
Registered: July 2009
Member
Hello,

How can I change the icons in a TreeViewer? If I change the code in the
LabelProvider then I can't start my application.
It doesn't work with the following code in the LabelProvider.

class ViewLabelProvider extends LabelProvider {
public String getText(Object obj) {
return obj.toString();
}
public Image getImage(Object obj) {
ImageDescriptor=descriptor=AbstractUIPlugin.imageDescriptorF romPlugin( "ProcessAdministrationGUI",imageKey);
return descriptor.createImage();
//return Activator.getImageDescriptor("icons/details.gif").createImage();

}
}

Kristin
Re: Icons in TreeViewer [message #130686 is a reply to message #130577] Tue, 28 April 2009 15:35 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
Kristin Polenz wrote:
> Hello,
>
> How can I change the icons in a TreeViewer? If I change the code in the
> LabelProvider then I can't start my application. It doesn't work with
> the following code in the LabelProvider.
Why can't you start the application?

>
> class ViewLabelProvider extends LabelProvider {
> public String getText(Object obj) {
> return obj.toString();
> }
> public Image getImage(Object obj) {
> ImageDescriptor=descriptor=AbstractUIPlugin.imageDescriptorF romPlugin( "ProcessAdministrationGUI",imageKey);
imageDescriptorFromPlugin expects the plug-in-id as the first
parameter and then the plug-in-relative path to the image. (see JavaDoc)

>
> return descriptor.createImage();
> //return Activator.getImageDescriptor("icons/details.gif").createImage();
>
> }
> }
>
> Kristin
>
Re: Icons in TreeViewer [message #130762 is a reply to message #130686] Wed, 29 April 2009 08:42 Go to previous message
No real name is currently offline No real nameFriend
Messages: 38
Registered: July 2009
Member
Hello,

It works now. I can't say what the problem was.
Perhaps, I had a mistake in my code.

Kristin
Previous Topic:Default Context Menu
Next Topic:Questions on session invalidate process
Goto Forum:
  


Current Time: Wed Dec 01 22:36:09 GMT 2021

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

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

Back to the top