org.apache.fop.render
Class RendererFactory
java.lang.Object
org.apache.fop.render.RendererFactory
public class RendererFactory
extends java.lang.Object
Factory for FOEventHandlers and Renderers.
RendererFactory
public RendererFactory()
Main constructor.
addFOEventHandlerMaker
public void addFOEventHandlerMaker(String className)
Add a new FOEventHandlerMaker. If another maker has already been registered for a
particular MIME type, this call overwrites the existing one.
className
- the fully qualified class name of the FOEventHandlerMaker
addFOEventHandlerMaker
public void addFOEventHandlerMaker(AbstractFOEventHandlerMaker maker)
Add a new FOEventHandlerMaker. If another maker has already been registered for a
particular MIME type, this call overwrites the existing one.
maker
- the FOEventHandlerMaker
addRendererMaker
public void addRendererMaker(String className)
Add a new RendererMaker. If another maker has already been registered for a
particular MIME type, this call overwrites the existing one.
className
- the fully qualified class name of the RendererMaker
addRendererMaker
public void addRendererMaker(AbstractRendererMaker maker)
Add a new RendererMaker. If another maker has already been registered for a
particular MIME type, this call overwrites the existing one.
maker
- the RendererMaker
createFOEventHandler
public FOEventHandler createFOEventHandler(FOUserAgent userAgent,
String outputFormat,
OutputStream out)
throws FOPException
Creates FOEventHandler instances based on the desired output.
userAgent
- the user agent for access to configurationoutputFormat
- the MIME type of the output format to use (ex. "application/pdf").out
- the OutputStream where the output is written to (if applicable)
- the newly constructed FOEventHandler
FOPException
- if the FOEventHandler cannot be properly constructed
createRenderer
public Renderer createRenderer(FOUserAgent userAgent,
String outputFormat)
throws FOPException
Creates a Renderer object based on render-type desired
userAgent
- the user agent for access to configurationoutputFormat
- the MIME type of the output format to use (ex. "application/pdf").
- the new Renderer instance
FOPException
- if the renderer cannot be properly constructed
getFOEventHandlerMaker
public AbstractFOEventHandlerMaker getFOEventHandlerMaker(String mime)
Returns a FOEventHandlerMaker which handles the given MIME type.
mime
- the requested output format
- the requested FOEventHandlerMaker or null if none is available
getRendererMaker
public AbstractRendererMaker getRendererMaker(String mime)
Returns a RendererMaker which handles the given MIME type.
mime
- the requested output format
- the requested RendererMaker or null if none is available
listSupportedMimeTypes
public String[] listSupportedMimeTypes()
- an array of all supported MIME types
Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.