wt.query.template
Class SVGGenerator

java.lang.Object
  extended bywt.query.template.SVGGenerator

public class SVGGenerator
extends Object

This class can be used to capture a Java component's graphics as SVG. It uses Apache's Batik.


Field Summary
private  org.apache.batik.svggen.SVGGraphics2D svgGenerator
          Will be used to generate a DOM of the SVG.
 
Constructor Summary
SVGGenerator()
          Default constructor
 
Method Summary
 void generateSVG(Component component, Writer writer, boolean useCSS)
          Outputs SVG rep of component's graphics to writer potentially using CSS style SVG.
 Reader getSVGReader(Component component, boolean useCSS)
          Provides SVG rep of component's graphics as a reader (for use in further XML processing)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

svgGenerator

private org.apache.batik.svggen.SVGGraphics2D svgGenerator
Will be used to generate a DOM of the SVG.

Constructor Detail

SVGGenerator

public SVGGenerator()
             throws ParserConfigurationException
Default constructor

Method Detail

generateSVG

public void generateSVG(Component component,
                        Writer writer,
                        boolean useCSS)
                 throws IOException
Outputs SVG rep of component's graphics to writer potentially using CSS style SVG.

Throws:
IOException

getSVGReader

public Reader getSVGReader(Component component,
                           boolean useCSS)
                    throws IOException
Provides SVG rep of component's graphics as a reader (for use in further XML processing)

Throws:
IOException