Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Icons in TreeViewer
Icons in TreeViewer [message #130577] Tue, 28 April 2009 10:22 Go to next message
Eclipse UserFriend
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 11:35 Go to previous messageGo to next message
Eclipse UserFriend
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 04:42 Go to previous message
Eclipse UserFriend
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: Sun Nov 09 14:13:46 EST 2025

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

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

Back to the top