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 06:09 Go to next message
Aurelien Pupier is currently offline Aurelien Pupier
Messages: 558
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 blog
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 08:24 Go to previous messageGo to next message
Aurelien Pupier is currently offline Aurelien Pupier
Messages: 558
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 blog
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 09:30 Go to previous message
Aurelien Pupier is currently offline Aurelien Pupier
Messages: 558
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 blog
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: Sat Aug 30 20:31:09 EDT 2014

Powered by FUDForum. Page generated in 0.08251 seconds