Rich Graphics with Apache Pivot 2.0

DZone 's Guide to

Rich Graphics with Apache Pivot 2.0

· Java Zone ·
Free Resource

Pivot 2.0 is expected to be released shortly and there are some great enhancements in this version. Just one that I'm excited about is the new SVG support, thanks to the integration of SVGSalamander. Using Pivot 2.0's Drawing class it is easy to load and scale vector graphics created by any vector graphic application such as Inkscape or Illustrator. The result of scaling an SVG drawing versus a PNG image is shown below:

Scaled Pivot Logo

Pivot's skin and theme system is already excellent and now using SVG based images it is also easy to dynamically adapt the images to any color theme your application might use. Bitmap based images are not longer necessary, neither is the the need to recreate them for each possible skin/theme your application may have.

Pivot's new Drawing class is backed by SVGSalamander's SVGDiagram which also provides a powerful scenegraph with retained nodes that can be dynamically created, edited and animated. Plus the scenegraph is completely based on the excellent SVG standard from the W3C.

Unlike JavaFX, which forced a node based programming paradigm as the only choice for rendering graphics, Pivot also provides the full power of immediate mode rendering using the Graphics2D. Now, the best approach can be used and mixed to provide lean, performant and rich graphics.

The horizon for Pivot looks better all the time, its well designed framework made it easy to integrate SVGSalamander and other scenegraph frameworks like ZVTM can also be integrated just as easily. Pivot as an RIA framework has provided what JavaFX was not able to and it has emerged as the best Java option available for the Rich, Internet and Application aspects that modern Java applications require.

The reality that took a long time to come face to face with is that JavaFX will never be an RIA framework, only a possible future set of Java multimedia and UI APIs, after another long wait until they become available in Q3 2011. Pivot certainly welcomes anything that may yet come forth from JavaFX with open arms.

Pivot is a Java RIA replacement for Microsoft Silverlight and Adobe Flex that is not based on Swing, rather it provides an application framework featuring a robust set of UI components, Internet service integration and graphics that can be used today. In addition, Pivot features the powerful BXML script which facilitates building the UI or other object graphs and very robust data binding. There are plenty of demos and tutorials allowing the developer to come up to speed fast. Enjoy Pivot!

Checkout RIA in Java with Apache Pivot here


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}