Animation blueprints for SWT – the conclusion

August 11th, 2009

Concluding the series on adding animations to enable rich interactivity expected from modern SWT applications, here is what we have seen so far:

  • Part 1 – adding simple animation behavior to such scenarios as component appearance (fade in) and window disposal (fade-out) using built in and custom class attributes and setters.
  • Part 2 – adding animated load progress indication while the application is loading data.
  • Part 3 – loading the album art matching the specific search string and asynchronously displaying the associated images.
  • Part 4 – scrolling the album covers showed in the container and adding animations to the scrolling.
  • Part 5 – complex transition scenarios.

How can you run this code locally?

  • Get the latest SVN snapshots of Trident and Granite
  • Add the following Eclipse libraries to the project: org.eclipse.core.jobs, org.eclipse.equinox.common, org.eclipse.osgi
  • The Granite distribution contains the lib/amazon.jar. It has been created with the following steps:
    • wsimport -d ./build -s ./src -p com.ECS.client.jax http://ecs.amazonaws.com/AWSECommerceService/AWSECommerceService.wsdl .
    • jar cvf ../amazon.jar .
  • Get an Amazon E-commerce key
  • Run the org.pushingpixels.granite.DemoApp class, passing your Amazon key as the only parameter to this class, adding the Amazon, Trident and Granite classes, as well as Eclipse jars to the classpath

If all went right, you should see the main application running and displaying Sarah McLachlan albums as in this video:

I hope you enjoyed this series. If you’re interested in adding rich animations to your SWT applications, you’re more than welcome to explore Trident and Granite and report any bugs and missing features in the project forums and mailing lists.