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 #530998] Mon, 03 May 2010 10:09 Go to next message
Aurelien Pupier is currently online 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,


Aurélien Pupier - Bonitasoft S.A.
My company Eclipse-related blog
Re: How to use decorator with nebula gallery [message #531024 is a reply to message #530998] Mon, 03 May 2010 12:24 Go to previous messageGo to next message
Aurelien Pupier is currently online 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);
		}
}



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

Ok, I retrieved the wrong GalleryItem. Now it works fine.

Aurélien Pupier - Bonitasoft S.A.
My company Eclipse-related blog
Previous Topic:XViewer widget status
Next Topic:How to use decorator with nebula gallery
Goto Forum:
  


Current Time: Fri Dec 19 10:19:50 GMT 2014

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

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