org.foray.graphic.output
Class GraphicOutputFactory

java.lang.Object
  extended by org.foray.graphic.output.GraphicOutputFactory
Direct Known Subclasses:
GraphicJava2dFactory, GraphicPdfFactory, GraphicPsFactory

public abstract class GraphicOutputFactory
extends Object

Abstract superclass for the FOray GraphicOutputFactory implementations.


Constructor Summary
GraphicOutputFactory()
          Constructor.
 
Method Summary
abstract  org.axsl.graphic.output.GraphicOutput createGraphicOutput(org.axsl.graphic.Graphic graphic)
          Create a GraphicOutput implementation.
 Graphic4a getGraphic4a(org.axsl.graphic.Graphic graphic)
          Returns the Graphic instance, cast as a Graphic4a.
abstract  String getMimeType()
          Returns the mime-type for this factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphicOutputFactory

public GraphicOutputFactory()
Constructor.

Method Detail

getMimeType

public abstract String getMimeType()
Returns the mime-type for this factory.

Returns:
The mime type for which this factory generates GraphicOutput instances. For example, a factory returning GraphicOutput instances for use with PDF (Portable Document Format) should return "application/pdf".
See Also:
Internet Assigned Numbers Authority MIME Media Types

createGraphicOutput

public abstract org.axsl.graphic.output.GraphicOutput createGraphicOutput(org.axsl.graphic.Graphic graphic)
                                                                   throws org.axsl.graphic.GraphicException
Create a GraphicOutput implementation. This method is not intended for use by client applications. It is to be used only by Graphic implementations if they do not already have a GraphicOutput for the desired mime type. Client applications that need a GraphicOutput instance should instead use Graphic.getGraphicOutput(String).

Parameters:
graphic - The Graphic instance for which the GraphicOutput instance should be created.
Returns:
A GraphicOutput implementation suitable for this factory's mime type.
Throws:
org.axsl.graphic.GraphicException - For errors during creation of the GraphicOutput instance.
See Also:
FontUse.getFontOutput(String)

getGraphic4a

public Graphic4a getGraphic4a(org.axsl.graphic.Graphic graphic)
                       throws org.axsl.graphic.GraphicException
Returns the Graphic instance, cast as a Graphic4a.

Parameters:
graphic - The Graphic instance to be recast.
Returns:
The graphic recast.
Throws:
org.axsl.graphic.GraphicException - If graphic is not an instanceof Graphic4a.


Copyright © 2017. All rights reserved.