Nebula Gallery example updated

I’ve just fixed bug 268743 – Gallery example need update to show latest features. As a result, you can now play with all Gallery features within the Nebula example application.

Being able to combine all options freely let me spot some problems with untested usecases :

270736 : Group selection selects the last item of the group if not using SWT.MULTI

270737 : Margin issues with animation

270934 : Decorators : Wrong position for bottom left et top right decorators

266614 :Item selection background can be visible on closed group when animations turned on

I fixed these 4 items while I was at it.

You can download this example from the nebula CVS. It works both as a view or as a stand alone application.

You can also test it from webstart. (Windows only, I’m still fighting with some issues with java web start on Linux and MacOS – bugs 270421, 270617, 270948, 270949, 270950).

update : webstart now works on linux

Next on my todo list :
- get nebula nighlty builds running for all widgets (almost done)
- host the webstart on eclipse
- add an example tab for nebula animation package.




  • You won't be able to 'paint' one single native widget like Text everywhere. Don't forget widgets are not emulated/painted by java code, but use native OS widgets, so you cannot play with them like you would do with Swing.

    I think you'll probably have to create several widgets and move them according to user actions....

    Another solution is to emulate widgets (full java drawing). This is easy for buttons/checkboxes, but can become harder with complex widgets like text.
  • Nicolas
    Hello Nicolas,
    Thank you for the answer !
    I'm working on it, I've just the problem that for the rendering, it's mandatory to use one Text widget and reuse it (paint it several times with different state) like a JLabel renderer in the swing JTable component... but like i'm still a little new to SWT, I've any idea for making this in SWT...
    thanks,
    Nicolas
  • Hi Nicolas,

    Being able to use native widgets (Text, Checkboxes, Sections, ...) within the Gallery widget is a frequent request, but I didn't have time to look at it. I believe that other nebula widgets are able to do so.

    You can open a bug for this particular request, but I don't think I'll be able to work on it soon. If you have some time to investigate, feel free to attach patch(s).

    This would probably be done in an item renderer or custom drawing.
  • nicolasj
    Hello Nicolas,
    The Gallery widget is very very interesting, and i've a question about it, if you have time to anwer :
    is there a way for using a Text widget for the image description (a Text widget with vertical scrolling, it could be very interesting)... indeed, using a custom draw for GalleryItem including a Text widget for the text description of the image.

    thanks,
    Nicolas
  • Jeganathan
    Hi Nicolas,

    Thanks for your reply. I will try this in weekend and get you back and opened the bug on bugs.eclipse.org .
  • Jeganathan,

    This will be emulated checkboxes, since it's a custom draw widget.

    You will have to create your owns group and item renderers. The item renderer will draw a check box and the Group send the mouseDown events to the right item.

    you can use item.setData to store checkboxes status.

    Take a look at DefaultGalleryGroupRenderer#mouseDown and DefaultGroupRenderer#getItem(Point mouseCoords ). This will be similar to the expand/collapse button of each group.

    You can then contribute the patch to nebula to let us provide this feature natively :)

    Please open a bug on bugs.eclipse.org to track this enhancement.
  • Thanks Chris.
    I hope to be able to add this example soon :)
  • Jeganathan
    Hi,
    Thanks for giving nebula, We are nebula gallery in our project. In addition to this we are using Table viewer. As per our new requirement I have to add Check Box to Gallery Item, Please give me suggestion to achieve this.

    Thanks
    Jegan
  • Awesome! I'm really excited to see the Nebula animation package come to life!
blog comments powered by Disqus