Animation blueprints for Swing
Over at Pushing Pixels i have ran the series on adding animations to enable rich interactivity expected from modern Swing applications. The code is part of the Onyx project which aims to provide blueprints for animated Swing applications powered by the Trident animation library, and the series has covered the following:
- Part 1 - adding simple animation behavior to such scenarios as component appearance (fade in), rollovers 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 Onyx
- The Onyx 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.onyx.DemoApp class, passing your Amazon key as the only parameter to this class, adding the Amazon, Trident and Onyx classes 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 Swing applications, you’re more than welcome to explore Trident and Onyx and report any bugs and missing features in the project forums and mailing lists.
- Login or register to post comments
- Printer-friendly version
- kirillcool's blog
- 1621 reads






Comments
by kirillcool - 2009-05-28 15:40
Gili, There are no Javadocs yet - the partial documentation (the library itself is work in progress) is in the project Wiki. To build Trident with Ant, you'll need the matching platform SWT jars in the classpath - i do not intend to bundle them with Trident. Thanks Kirillby cowwoc - 2009-05-28 14:54
Kirill, I tried building Trident using Ant but ran into a bunch of SWT-related compilation errors. It would be really nice to be able to look at the Trident Javadoc without having to try to figure out the build process. Giliby aleixmr - 2009-05-28 13:24
Thannksss Kirill !!!! What would happen to swing without you ?? really awesome !!! I will try to add trident to my projects !! :-)