Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How to decorate an image?
How to decorate an image? [message #333006] Wed, 19 November 2008 12:41 Go to next message
Jan Kohnert is currently offline Jan KohnertFriend
Messages: 196
Registered: July 2009
Senior Member
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 Go to previous messageGo to next message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
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 Go to previous messageGo to next message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
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 Go to previous messageGo to next message
Jan Kohnert is currently offline Jan KohnertFriend
Messages: 196
Registered: July 2009
Senior Member
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
Re: How to decorate an image? [message #333015 is a reply to message #333014] Wed, 19 November 2008 15:29 Go to previous message
Jan Kohnert is currently offline Jan KohnertFriend
Messages: 196
Registered: July 2009
Senior Member
Just found:
http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse. platform.doc.isv/whatsNew/platform_isv_whatsnew.html
Previous Topic:strange warning on an ant build.xml file
Next Topic:Preventing the renaming of a resource (not renamed via refactoring actions)
Goto Forum:
  


Current Time: Wed Apr 24 23:04:39 GMT 2024

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

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

Back to the top