How to decorate an image? [message #333006] |
Wed, 19 November 2008 12:41  |
Eclipse User |
|
|
|
Hello,
I'm using a TreeViewer together with ColumnLabelProviders. I've found out
that there is no DecoratingLabelProvider for columns and therefore I've to
implement decorating myself.
My question is if I have to write the decorating code myself, or is there
a smart helper somewhere?
Id I call:
decorator.decorateImage(image, element);
and get into my decorator it looks like this:
@Override
public Image decorateImage(Image image, Object element) {
// TODO Auto-generated method stub
return null;
}
At this part I would like to get the job done by someone else :)
Thanks
|
|
|
Re: How to decorate an image? [message #333011 is a reply to message #333006] |
Wed, 19 November 2008 14:10   |
Eclipse User |
|
|
|
Jan Kohnert wrote:
> I'm using a TreeViewer together with ColumnLabelProviders. I've found
> out that there is no DecoratingLabelProvider for columns and therefore
> I've to implement decorating myself.
>
> My question is if I have to write the decorating code myself, or is
> there a smart helper somewhere?
>
> Id I call:
> decorator.decorateImage(image, element);
>
> and get into my decorator it looks like this:
> @Override
> public Image decorateImage(Image image, Object element) {
> // TODO Auto-generated method stub
> return null;
> }
>
> At this part I would like to get the job done by someone else :)
Maybe to this one?
https://bugs.eclipse.org/bugs/attachment.cgi?id=88319
HTH && Greetings from Bremen,
Daniel Krügler
|
|
|
Re: How to decorate an image? [message #333012 is a reply to message #333011] |
Wed, 19 November 2008 14:22   |
Eclipse User |
|
|
|
Daniel Krügler wrote:
> Jan Kohnert wrote:
>> I'm using a TreeViewer together with ColumnLabelProviders. I've found
>> out that there is no DecoratingLabelProvider for columns and therefore
>> I've to implement decorating myself.
>>
>> My question is if I have to write the decorating code myself, or is
>> there a smart helper somewhere?
>>
>> Id I call:
>> decorator.decorateImage(image, element);
>>
>> and get into my decorator it looks like this:
>> @Override
>> public Image decorateImage(Image image, Object element) {
>> // TODO Auto-generated method stub
>> return null;
>> }
>>
>> At this part I would like to get the job done by someone else :)
>
> Maybe to this one?
>
> https://bugs.eclipse.org/bugs/attachment.cgi?id=88319
Btw.: As of Eclipse 3.4 you have DecoratingStyledCellLabelProvider
available.
- Daniel
|
|
|
Re: How to decorate an image? [message #333014 is a reply to message #333012] |
Wed, 19 November 2008 15:25   |
Eclipse User |
|
|
|
Thank you Daniel!
DecoratingStyledCellLabelProvider needs a ILabelDecorator in its
contructor. Does'nt I end up at exactly the same possition where I was
when using it?
Or is there a smart way to get the labeldecorator and decoration context?
Its somehow hard to finde examples even using google.
Jan
|
|
|
|
Powered by
FUDForum. Page generated in 0.03491 seconds