org.apache.fop.render

Class AbstractGenericSVGHandler

Implemented Interfaces:
RendererContextConstants, XMLHandler
Known Direct Subclasses:
AFPSVGHandler, PCLSVGHandler, PDFSVGHandler

public abstract class AbstractGenericSVGHandler
extends java.lang.Object
implements XMLHandler, RendererContextConstants

Generic XML handler for SVG. Uses Apache Batik for SVG processing and simply paints to a Graphics2DAdapter and thus ultimatively to Graphics2D interface that is presented.

To use this class, subclass it and implement the missing methods (supportsRenderer, for example).

Fields inherited from interface org.apache.fop.render.RendererContextConstants

FOREIGN_ATTRIBUTES, HANDLER_CONFIGURATION, HEIGHT, OUTPUT_STREAM, PAGE_VIEWPORT, WIDTH, XPOS, YPOS

Fields inherited from interface org.apache.fop.render.XMLHandler

HANDLE_ALL

Method Summary

String
getNamespace()
void
handleXML(RendererContext context, Document doc, String ns)
protected void
renderSVGDocument(RendererContext context, Document doc)
Render the SVG document.
protected void
updateRendererContext(RendererContext context)
Override this method to update the renderer context if it needs special settings for certain conditions.

Method Details

getNamespace

public String getNamespace()
Specified by:
getNamespace in interface XMLHandler

handleXML

public void handleXML(RendererContext context,
                      Document doc,
                      String ns)
            throws Exception
Specified by:
handleXML in interface XMLHandler

renderSVGDocument

protected void renderSVGDocument(RendererContext context,
                                 Document doc)
            throws IOException
Render the SVG document.
Parameters:
context - the renderer context
doc - the SVG document

updateRendererContext

protected void updateRendererContext(RendererContext context)
Override this method to update the renderer context if it needs special settings for certain conditions.
Parameters:
context - the renderer context

Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.