Directory

SvgComponent - Vaadin Add-on Directory

Use SVG with Vaadin today without losing IE support. SvgComponent - Vaadin Add-on Directory
SvgComponent helps to use of SVG in Vaadin. Plain Embedded supports SVG as well, but SvgComponent has some enhancements like simple client-server communication and IE support. The SVG can be provided as Resource via Embedded.setSource(Resource). The SvgComponent also has helper methods setSvg(String) and setSvg(InputStream). To support Internet Explorer, SvgComponent uses svgweb library built by Bradd Neuberg. Svgweb uses javascript and flash to provide SVG support with close to 100% browser coverage The linked project page for more information. Note that for other browsers svgweb is not used. IE9 uses solely its built-in SVG rendering like other modern browsers. NOTE, the svgweb fallback requires mime type mapping for .htc file. This is easily achieved eg. in java servers by adding following snippet to your web.xml htctext/x-component The component also provides a simple messaging mechanism from SVG to the wrapping SvgComponent. See SvgMessageListener.