lib-gwt-svg is a library to add SVG graphics to a GWT application.
It offers the following features:
- Many additional helper methods to improve development productivity.
- Tight integration with GWT, including: SVG resources (with XML validation), SVG in UiBinder definitions, integration with GWT event system, SVG Widgets (images, push and toggle buttons).
- Tight integration with Java, including: iteratable collections, subclassing of SVG elements, complete integration of W3C documentation in the javadocs.
- Open source license (LGPL)
Lib-gwt-svg requires GWT 2.x. Depending on the version you GWT you are using, you must choose a version of lib-gwt-svg which matches it, as described in the following table:
|GWT version||lib-gwt-svg version|
|2.1.0 / 2.1.1||0.5.0|
|2.4.0||0.5.6, 0.5.5, 0.5.4 or 0.5.3|
lib-gwt-svg has been tested on the following SVG-enabled web browsers:
|Opera||10.x or greater|
|Chrome||5.x or greater|
|IE||9.x (NB: on IE, xpath support is provided by integrating the excellent, Creative-Commons-licenced xpath.js library, by Cameron McCormack)|
|Firefox for Android||10.x (NB: firefox supports touch events, but only single touch at the moment. Support for true multitouch is planned for 11.x)|
|Android browser||Android 3.2 (NB: Android does not implement touch events for SVG)|
You can find samples demonstrating the API in action here:
- lib-gwt-svg-chess (a chess game)
- lib-gwt-svg-samples (basic usage)
- lib-gwt-svg-edu (educational games)
The library currently requires GWT 2.x. Debugging is possible using GWT dev mode.
The documentation currently available consists in:
- a maven site with javadoc, source cross-reference, dependencies
- a post discussing the library goals and design.
- a post discussing why the library is currently limited to classic HTML GWT containers
You can use the lib-gwt-svg Google group to ask questions about lib-gwt-svg usage. I (or somebody else) will do my best to answer it as quickly as possible
Note: the original 0.0.1 version was released under the GPL license. As of version 0.2, lib-gwt-svg is re-released under the LGPL license