org.apache.fop.render.pdf

Class PDFImageHandlerRegistry


public class PDFImageHandlerRegistry
extends java.lang.Object

This class holds references to various image handlers used by the PDF renderer. It also supports automatic discovery of additional handlers available through the class path.

Constructor Summary

PDFImageHandlerRegistry()
Default constructor.

Method Summary

void
addHandler(String classname)
Add an PDFImageHandler.
void
addHandler(PDFImageHandler handler)
Add an image handler.
protected PDFImageHandler
getHandler(Class imageClass)
Returns an PDFImageHandler which handles an specific image type given the MIME type of the image.
PDFImageHandler
getHandler(Image img)
Returns an PDFImageHandler which handles an specific image type given the MIME type of the image.
ImageFlavor[]
getSupportedFlavors()
Returns the ordered array of supported image flavors.

Constructor Details

PDFImageHandlerRegistry

public PDFImageHandlerRegistry()
Default constructor.

Method Details

addHandler

public void addHandler(String classname)
Add an PDFImageHandler. The handler itself is inspected to find out what it supports.
Parameters:
classname - the fully qualified class name

addHandler

public void addHandler(PDFImageHandler handler)
Add an image handler. The handler itself is inspected to find out what it supports.
Parameters:
handler - the PDFImageHandler instance

getHandler

protected PDFImageHandler getHandler(Class imageClass)
Returns an PDFImageHandler which handles an specific image type given the MIME type of the image.
Parameters:
imageClass - the Image subclass for which to get a handler
Returns:
the PDFImageHandler responsible for handling the image or null if none is available

getHandler

public PDFImageHandler getHandler(Image img)
Returns an PDFImageHandler which handles an specific image type given the MIME type of the image.
Parameters:
img - the Image to be handled
Returns:
the PDFImageHandler responsible for handling the image or null if none is available

getSupportedFlavors

public ImageFlavor[] getSupportedFlavors()
Returns the ordered array of supported image flavors.
Returns:
the array of image flavors

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