Swing Vector Graphics

Luan O’Carroll, director of Xeotrope and lead developer of the XUI project, talked about how to improve your average pizza box-like business User Interface with Swing and Vector Graphics. According to Luan, the basic application UI is horrible with lack of style. It is hard to enhance or create a custom Swing Look and Feel so most developers don’t bother and instead hope and wait that Sun will make a push for the desktop.

Luan provides a prescription for better User Interfaces which include using Synth, SVG, Swing, Java2D, Swinglabs, Timing Framework, and the Painter API.

Synth provides support for application UI skins and themes. Synth is basically a configurable L&F which can easily allow for skins. Synth requires less knowledge for customing the UI that creating a new L&F from scratch. Luan recommends you use SVG instead of rasterized images with Synth because one size does not fit all with raster images.

SVG is an XML-based standardized format for describing vector graphics. Gaphic illustrators and graphics tools are familiar with this format. SVG provides a rich feature set such as animations, layers, overlays, and effects. There are seveal Java toolkits for woking with SVG, such as Apache Batik and SVG Salamander.

You can breakout of the square Swing component with SVG graphics. Custom SVG/Swing components can be animated and support mouse events such as clicks and rollovers. It is possible to have Jave2D interact with SVG and vice versa so you can get the best of both worlds.

Luan mentioned the Synth SkinBuilder application which helps to customize the Synth Look and Feel. As of this writing, SkinBuilder does not seem to be available check Luan’s blog for updates.

Technorati Tags: , , , , , , ,