Archive for the ‘SWT’ Category

ShareMedia 0.3.2 released

May 28th, 2008

ShareMedia is a photo manager based on Eclipse RCP. (open source / EPL)

Main features are :

  • Automatic file management (like in iTunes)
  • Sort and search using photos metadata
  • Standard and OpenGL photo viewers
  • Connect to Picasa, Jabber and Flickr (alpha) to share files
  • Ability to copy files between 2 accounts (Picasa/Picasa, Picasa/Flickr, Picasa/local files)
  • Plug-ins support (like all RCP applications)
  • much more…

This new release (0.3.2) includes :

  • Integrated intro content with tutorials and usefull links
  • SWT Animation Toolkit is now used to provide nice UI effects
  • Better error checking for password
  • Several bug fixes on the OpenGL viewer

For SWT/RCP developpers :
The Nebula Gallery Widget and the SAT toolkit where initially developed for this application so it is a good example on how they can be used.

Used libraries : SWT, RCP, Nebula widgets, LWJGL, DerbyDB, SmackAPI, Drew Noakes’s metadata Extractor, GData, FlickrAPI, SAT.

Screencasts :

Part 1 : Connect to a Picasa account, 3D and 2D fullscreen display

Part 2 : Download and upload photo, see metadata, create album and intelligent lists.

For the next release, I’m looking for some Java feedback. If you’re a Java developer and you already worked on the following topics, please drop a comment here.
- Writing EXIF / IPTC tags. (ShareMedia only have read support right now)
- Working with videos (creating thumbnails, playing in a SWT UI or OpenGL Canvas).

Thanks,

SWT Animation Toolkit (Part 2)

April 14th, 2008

My blog was offline the whole day because of a network problem. Anyway, I’ll commit this evening 2 new effects for the SWT Animation Toolkit (SAT) :

- Shake, perfect for failed authentifications (like in OSX).
- Grow.

The API was also improved.

The SAT Demo (JavaWebstart) is now up to date, feel free to try it.

SWT Animation Toolkit Preview

April 13th, 2008

I’m currently working on a SWT Animation Toolkit (I named it SAT) which goal is to allow adding motion effects to SWT applications.

The current version supports :

  • Setting alpha level on a Shell
  • Moving any control
  • Resizing any control
  • Adding Smooth scrolling to Shell, StyledText, Canvas or any SWT custom widget

These actions use easing functions, which are well known by Flash users. Available functions are Linear, Exponential, Elastic, Bounce.

Usage :
new SmoothAction().move(shell, shell.getLocation().x, target, 1000, new BounceOut());

I uploaded a very simple demo using java webstart which should work on win32-x86, linux-gtk-x86 and OSX Leopard : SAT Demo (JavaWebstart)

On other platforms, you’ll have to run it from sources, sorry.

Update : view SAT Demo on youtube, instead of eating my bandwidth :-) (Not visible on PlanetEclipse)

The code is available on SVN :

http://sharemedia.svn.sourceforge.net/viewvc/sharemedia/trunk/

Projects :
org.sharemedia.ui.sat/
org.sharemedia.ui.sat.easing/
org.sharemedia.ui.sat.demo/

The demo is using the Nebula Gallery widget, available on eclipse’s cvs.

My RCP photo manager is already using this toolkit : windows fade-in and widgets appear smoothly in fullscreen mode. :-)

I’m not sure if this toolkit would fit in Nebula, probably not, but it would be nice if Eclipse plugins and applications could use fade effects for notifications (Mylyn, RSSOwl) or Smooth scrolling (Text editors).

License is EPL, even if the EPL header is not present on all files. Several easing equations are based on Robert Penner’s easing equations for FlashMX, distributed under the BSD license.

Update : related SWT bugs : 220173, 223637,220175. You can vote for them, if you want to.

Update 2 : This toolkit is now available in the Eclipse Nebula repository. See package org.eclipse.nebula.animation in the Nebula Gallery widget : 0.5.2 release notes, Javadoc.

Smooth Scrolling for the Nebula Gallery widget

February 24th, 2008

This week end, I added Smooth Scrolling for the Gallery view of ShareMedia. This is implemented using a simple class which captures the mouse wheel event and replace the standard behavior by a nice smooth movement (duration can be changed easily).

(Planeteclipse readers : video is not displayed there, just click on the title of the post to go to my blog)


ScrollingSmoother s = new ScrollingSmoother();
s.smoothControl( anyScrollableControl );

Currently, this only works on the Nebula Gallery Widget (maybe others), because fake events which are generated do not include all data required by standard SWT controls. The next step is to handle any scrollable control, and smooth scrolling even if scrollbars are used.

This class can be found here.
This is only a POC, the code is horrible but will be cleaned up soon.

UPDATE : this class currently work with the following widgets :
Shell
Canvas
StyledText

NOT working :
Tree
Table
Text

BTW : ShareMedia 0.3.1 is finally released, download it on sourceforge

Nebula Gallery widget updates

January 11th, 2008

Here are the latest news of the Nebula Gallery widget :

JFace Viewer : a viewer is now available for the Gallery widget :
The widget can be used this way :

GalleryTreeViewer viewer = new GalleryTreeViewer(shell);
viewer.setContentProvider(contentProvider);
viewer.setLabelProvider(labelProvider);
viewer.setInput(new Object());

See SnippetGalleryViewerTester

Item-level font and color settings :
Each item can use a different font or color :

item.setFont( font );
item.setForegroundColor( textColor );
item.setBackgroundColor( backgroundColor );

Gallery Viewer snippet

Fixed H_SCROLL problems :
A gallery can be created using H_SCROLL and previous issues like partial redraws and margin problems are fixed.

Improved API : better consistency with SWT controls :
- getSelection() does no longer return null when nothing is selected.
- other small fixes.

Thanks to Peter Centgraf who contributed the jface viewer and several other patchs.

Gallery Navigator plugin :
I’ve also started to write an eclipse plugin which displays the current folder’s content in a Gallery. Images are loaded so you can get a quick overview right within Eclipse. Thumbnail size can be set in real time.

Gallery navigator

Sources are on sourceforge, see Gallery navigator plugin.

Until next time…