|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.xmlmind.fo.graphic.GraphicFactories
public final class GraphicFactories
The registry of all graphic factories used by
XMLmind XSL-FO Converter.
Initially this registry contains factories for the "image/bmp" (Java 1.5+), "image/gif", "image/png", "image/jpeg", "image/x-wmf" and "image/x-emf" input formats.
Moreover, if jai_imageio.jar is referenced in the CLASSPATH, this adds the TIFF, JPEG 2000 and PNM input formats.
Moreover, if Java 1.5+ is used to run XMLmind XSL-FO Converter and if xfc_ext is in its CLASSPATH, additional factories for "image/svg+xml" and "application/mathml+xml" graphics are also automatically registered.
This class is thread-safe.
| Method Summary | |
|---|---|
static Graphic |
convertGraphic(Graphic graphic,
String[] formats,
double xScale,
double yScale,
Object clientData,
GraphicEnv env)
Convenience method: find a factory allowing to convert specified graphic to any of the specified output formats then invokes GraphicFactory.convertGraphic(com.xmlmind.fo.graphic.Graphic, java.lang.String, double, double, java.lang.Object, com.xmlmind.fo.graphic.GraphicEnv). |
static Graphic |
convertGraphic(Graphic graphic,
String format,
double xScale,
double yScale,
Object clientData,
GraphicEnv env)
Convenience method: find a factory allowing to convert specified graphic to specified output format then invokes GraphicFactory.convertGraphic(com.xmlmind.fo.graphic.Graphic, java.lang.String, double, double, java.lang.Object, com.xmlmind.fo.graphic.GraphicEnv). |
static Graphic |
createGraphic(String location,
String format,
Object clientData,
GraphicEnv env)
Convenience method: find a factory supporting specified input format then invokes GraphicFactory.createGraphic(java.lang.String, java.lang.String, java.lang.Object, com.xmlmind.fo.graphic.GraphicEnv). |
static GraphicFactory |
get(String format)
Returns a factory supporting the specified input format. |
static GraphicFactory |
get(String inFormat,
String outFormat)
Returns a factory allowing to convert specified input format to specified output format. |
static GraphicFactory |
getByName(String name)
Returns a factory having specified name. |
static void |
register(GraphicFactory factory)
Registers specified factory. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void register(GraphicFactory factory)
public static GraphicFactory get(String format)
Each register factory is tested in turn, starting from the last registered ones.
format - input format
null otherwise.
public static GraphicFactory get(String inFormat,
String outFormat)
Each register factory is tested in turn, starting from the last registered ones.
inFormat - input formatoutFormat - output format
null otherwisepublic static GraphicFactory getByName(String name)
Each register factory is tested in turn, starting from the last registered ones.
name - name of the factory, case-insensitive
null otherwise
public static Graphic createGraphic(String location,
String format,
Object clientData,
GraphicEnv env)
throws Exception
GraphicFactory.createGraphic(java.lang.String, java.lang.String, java.lang.Object, com.xmlmind.fo.graphic.GraphicEnv).
a RuntimeException is raised if a suitable factory
is not found.
Exception
public static Graphic convertGraphic(Graphic graphic,
String format,
double xScale,
double yScale,
Object clientData,
GraphicEnv env)
throws Exception
GraphicFactory.convertGraphic(com.xmlmind.fo.graphic.Graphic, java.lang.String, double, double, java.lang.Object, com.xmlmind.fo.graphic.GraphicEnv).
a RuntimeException is raised if a suitable factory
is not found.
When possible (depends on graphic.getFormat(),
on format and on the available factories),
this method will always prefer to save a JPEG image to a JPEG file.
ExceptionconvertGraphic(Graphic, String[], double, double,
Object, GraphicEnv)
public static Graphic convertGraphic(Graphic graphic,
String[] formats,
double xScale,
double yScale,
Object clientData,
GraphicEnv env)
throws Exception
GraphicFactory.convertGraphic(com.xmlmind.fo.graphic.Graphic, java.lang.String, double, double, java.lang.Object, com.xmlmind.fo.graphic.GraphicEnv).
a RuntimeException is raised if a suitable factory
is not found.
When possible (depends on graphic.getFormat(),
on formats and on the available factories),
this method will always prefer to save a JPEG image as a JPEG file.
Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||