fop 1.0

org.apache.fop.render
Class AbstractImageHandlerRegistry

java.lang.Object
  extended by org.apache.fop.render.AbstractImageHandlerRegistry
Direct Known Subclasses:
AFPImageHandlerRegistry, PDFImageHandlerRegistry

public abstract class AbstractImageHandlerRegistry
extends java.lang.Object

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


Constructor Summary
AbstractImageHandlerRegistry()
          Default constructor.
 
Method Summary
 void addHandler(ImageHandlerBase handler)
          Add an image handler.
 void addHandler(java.lang.String classname)
          Add an ImageHandler.
 ImageHandlerBase getHandler(java.lang.Class imageClass)
          Returns an ImageHandler which handles an specific image type given the MIME type of the image.
 ImageHandlerBase getHandler(org.apache.xmlgraphics.image.loader.Image img)
          Returns an ImageHandler which handles an specific image type given the MIME type of the image.
abstract  java.lang.Class getHandlerClass()
          Returns the ImageHandler implementing class
 java.util.Comparator getHandlerComparator()
          Returns the ImageHandler comparator
 org.apache.xmlgraphics.image.loader.ImageFlavor[] getSupportedFlavors()
          Returns the ordered array of supported image flavors.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractImageHandlerRegistry

public AbstractImageHandlerRegistry()
Default constructor.

Method Detail

addHandler

public void addHandler(java.lang.String classname)
Add an ImageHandler. The handler itself is inspected to find out what it supports.

Parameters:
classname - the fully qualified class name

addHandler

public void addHandler(ImageHandlerBase handler)
Add an image handler. The handler itself is inspected to find out what it supports.

Parameters:
handler - the ImageHandler instance

getHandler

public ImageHandlerBase getHandler(org.apache.xmlgraphics.image.loader.Image img)
Returns an ImageHandler which handles an specific image type given the MIME type of the image.

Parameters:
img - the Image to be handled
Returns:
the ImageHandler responsible for handling the image or null if none is available

getHandler

public ImageHandlerBase getHandler(java.lang.Class imageClass)
Returns an ImageHandler 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 ImageHandler responsible for handling the image or null if none is available

getSupportedFlavors

public org.apache.xmlgraphics.image.loader.ImageFlavor[] getSupportedFlavors()
Returns the ordered array of supported image flavors.

Returns:
the array of image flavors

getHandlerComparator

public java.util.Comparator getHandlerComparator()
Returns the ImageHandler comparator

Returns:
the ImageHandler comparator

getHandlerClass

public abstract java.lang.Class getHandlerClass()
Returns the ImageHandler implementing class

Returns:
the ImageHandler implementing class

fop 1.0

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