Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » How to use decorator with nebula gallery
How to use decorator with nebula gallery [message #599565] Mon, 03 May 2010 10:09 Go to next message
Aurelien Pupier is currently offline Aurelien PupierFriend
Messages: 579
Registered: July 2009
Location: Grenoble, FRANCE
Senior Member

Hi,

I'm trying to use decorators on nebula gallery but I by now I didn't find how.

Link to examples or documentation is welcome

Regards,
--
Aurelien Pupier - BonitaSoft S.A.
"http://scratsh.wordpress.com/"


Aurélien Pupier - Bonitasoft S.A.
My company Eclipse-related blog
Re: How to use decorator with nebula gallery [message #599573 is a reply to message #599565] Mon, 03 May 2010 12:24 Go to previous messageGo to next message
Aurelien Pupier is currently offline Aurelien PupierFriend
Messages: 579
Registered: July 2009
Location: Grenoble, FRANCE
Senior Member

I find a snippet on the CVS which do that SnippetSimpleListOverlay

But I can't manage to do it.

In my case, I'm using a virtual gallery and I try to set the decorator in the getImage of my labelProvider:

new LabelProvider(){
@Override
public Image getImage(Object element) {
Image res = getImage(element);
GalleryItem gi = gallery.getItem(indexOf(element));
gi.setData(AbstractGalleryItemRenderer.OVERLAY_TOP_RIGHT, getDecorator(element));
return res;
}
return super.getImage(element);
}
}

--
Aurelien Pupier - BonitaSoft S.A.
"http://scratsh.wordpress.com/"


Aurélien Pupier - Bonitasoft S.A.
My company Eclipse-related blog
[solved]Re: How to use decorator with nebula gallery [message #599581 is a reply to message #599565] Mon, 03 May 2010 13:30 Go to previous message
Aurelien Pupier is currently offline Aurelien PupierFriend
Messages: 579
Registered: July 2009
Location: Grenoble, FRANCE
Senior Member

Ok, I retrieved the wrong GalleryItem. Now it works fine.
--
Aurelien Pupier - BonitaSoft S.A.
"http://scratsh.wordpress.com/"


Aurélien Pupier - Bonitasoft S.A.
My company Eclipse-related blog
Previous Topic:How to use decorator with nebula gallery
Next Topic:FormattedText not working in JFace data binding scenario
Goto Forum:
  


Current Time: Fri Dec 19 14:35:58 GMT 2014

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

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