fop 0.90alpha1

org.apache.fop.render.java2d
Class Java2DSVGHandler

java.lang.Object
  |
  +--org.apache.fop.render.java2d.Java2DSVGHandler
All Implemented Interfaces:
XMLHandler

public class Java2DSVGHandler
extends java.lang.Object
implements XMLHandler

Java2D XML handler for SVG (uses Apache Batik). This handler handles XML for foreign objects when rendering to Java2D. The properties from the Java2D renderer are subject to change.


Inner Class Summary
static class Java2DSVGHandler.Java2DInfo
          Java2D information structure for drawing the XML document.
protected  class Java2DSVGHandler.SVGHandler
          This method is placed in an inner class so that we don't get class loading errors if batik is not present.
 
Field Summary
static java.lang.String JAVA2D_HEIGHT
          The height of the svg image/document to render.
static java.lang.String JAVA2D_STATE
          The current Java2DGraphicsState.
static java.lang.String JAVA2D_WIDTH
          The width of the svg image/document to render.
static java.lang.String JAVA2D_XPOS
          The x position that this is being drawn at.
static java.lang.String JAVA2D_YPOS
          The y position that this is being drawn at.
 
Fields inherited from interface org.apache.fop.render.XMLHandler
HANDLE_ALL
 
Constructor Summary
Java2DSVGHandler(java.lang.String mime)
          Create a new Java2D XML handler for use by the Java2D renderer.
 
Method Summary
static Java2DSVGHandler.Java2DInfo getJava2DInfo(RendererContext context)
          Get the pdf information from the render context.
 java.lang.String getMimeType()
           
 java.lang.String getNamespace()
           
 void handleXML(RendererContext context, org.w3c.dom.Document doc, java.lang.String ns)
          Handle an external xml document inside a Foreign Object Area.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JAVA2D_STATE

public static final java.lang.String JAVA2D_STATE
The current Java2DGraphicsState.

JAVA2D_WIDTH

public static final java.lang.String JAVA2D_WIDTH
The width of the svg image/document to render.

JAVA2D_HEIGHT

public static final java.lang.String JAVA2D_HEIGHT
The height of the svg image/document to render.

JAVA2D_XPOS

public static final java.lang.String JAVA2D_XPOS
The x position that this is being drawn at.

JAVA2D_YPOS

public static final java.lang.String JAVA2D_YPOS
The y position that this is being drawn at.
Constructor Detail

Java2DSVGHandler

public Java2DSVGHandler(java.lang.String mime)
Create a new Java2D XML handler for use by the Java2D renderer.
Parameters:
mime - MIME type that this handler is used for
Method Detail

handleXML

public void handleXML(RendererContext context,
                      org.w3c.dom.Document doc,
                      java.lang.String ns)
               throws java.lang.Exception
Description copied from interface: XMLHandler

Handle an external xml document inside a Foreign Object Area.

This may throw an exception if for some reason it cannot be handled. The caller is expected to deal with this exception.

The implementation may convert the XML document internally to another XML dialect (SVG, for example) and call renderXML() on the AbstractRenderer again (which can be retrieved through the RendererContext).

Specified by:
handleXML in interface XMLHandler
See Also:
XMLHandler

getJava2DInfo

public static Java2DSVGHandler.Java2DInfo getJava2DInfo(RendererContext context)
Get the pdf information from the render context.
Parameters:
context - the renderer context
Returns:
the pdf information retrieved from the context

getMimeType

public java.lang.String getMimeType()
Specified by:
getMimeType in interface XMLHandler
See Also:
XMLHandler.getMimeType()

getNamespace

public java.lang.String getNamespace()
Specified by:
getNamespace in interface XMLHandler
See Also:
XMLHandler.getNamespace()

fop 0.90alpha1

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