com.xmlmind.fo.graphic
Class GraphicEnvImpl

java.lang.Object
  extended by com.xmlmind.fo.graphic.GraphicEnvImpl
All Implemented Interfaces:
GraphicEnv

public class GraphicEnvImpl
extends Object
implements GraphicEnv

An implementation of GraphicEnv.

Important:This class should not be useful to third-party developers.


Field Summary
protected  Hashtable convertedGraphics
           
protected  Vector tempFiles
           
 
Constructor Summary
GraphicEnvImpl()
           
 
Method Summary
 File createTempFile(String suffix)
          Creates a temporary file having specified suffix.
 void dispose()
          Delete all temporary files created using createTempFile(java.lang.String).
 ConvertedGraphic getConvertedGraphic(Graphic graphic, String[] formats, double xScale, double yScale, Object clientData)
          If the converted graphic is found in the cache, returns this cached converted graphic; otherwise invokes GraphicFactories.convertGraphic(Graphic, String[], double, double, Object, GraphicEnv), caches and returns the converted graphic.
 void reportWarning(String message)
          Reports specified warning message. Simply prints message on System.err.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tempFiles

protected Vector tempFiles

convertedGraphics

protected Hashtable convertedGraphics
Constructor Detail

GraphicEnvImpl

public GraphicEnvImpl()
Method Detail

createTempFile

public File createTempFile(String suffix)
                    throws Exception
Description copied from interface: GraphicEnv
Creates a temporary file having specified suffix. This temporary file is automatically deleted at the end of the conversion.

Specified by:
createTempFile in interface GraphicEnv
Parameters:
suffix - suffix of the temporary file. Example: ".tmp".
Returns:
newly created temporary file
Throws:
Exception - if, for any reason, this method fails

reportWarning

public void reportWarning(String message)
Reports specified warning message. Simply prints message on System.err.

Specified by:
reportWarning in interface GraphicEnv

getConvertedGraphic

public ConvertedGraphic getConvertedGraphic(Graphic graphic,
                                            String[] formats,
                                            double xScale,
                                            double yScale,
                                            Object clientData)
                                     throws Exception
Description copied from interface: GraphicEnv
If the converted graphic is found in the cache, returns this cached converted graphic; otherwise invokes GraphicFactories.convertGraphic(Graphic, String[], double, double, Object, GraphicEnv), caches and returns the converted graphic.

Important:This method should not be useful to third-party developers.

Specified by:
getConvertedGraphic in interface GraphicEnv
Throws:
Exception

dispose

public void dispose()
Delete all temporary files created using createTempFile(java.lang.String).