public class ExportUtils extends Object
Constructor and Description |
---|
ExportUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isJFreeSVGAvailable()
Returns
true if JFreeSVG is on the classpath, and
false otherwise. |
static boolean |
isOrsonPDFAvailable()
Returns
true if OrsonPDF is on the classpath, and
false otherwise. |
static void |
writeAsJPEG(org.jfree.ui.Drawable drawable,
int w,
int h,
File file)
Writes the current content to the specified file in JPEG format.
|
static void |
writeAsPDF(org.jfree.ui.Drawable drawable,
int w,
int h,
File file)
Writes a
Drawable to the specified file in PDF format. |
static void |
writeAsPNG(org.jfree.ui.Drawable drawable,
int w,
int h,
File file)
Writes the current content to the specified file in PNG format.
|
static void |
writeAsSVG(org.jfree.ui.Drawable drawable,
int w,
int h,
File file)
Writes the current content to the specified file in SVG format.
|
public static boolean isJFreeSVGAvailable()
true
if JFreeSVG is on the classpath, and
false
otherwise. The JFreeSVG library can be found at
http://www.jfree.org/jfreesvg/public static boolean isOrsonPDFAvailable()
true
if OrsonPDF is on the classpath, and
false
otherwise. The OrsonPDF library can be found at
http://www.object-refinery.com/pdf/public static void writeAsSVG(org.jfree.ui.Drawable drawable, int w, int h, File file)
drawable
- the drawable (null
not permitted).w
- the chart width.h
- the chart height.file
- the output file (null
not permitted).public static final void writeAsPDF(org.jfree.ui.Drawable drawable, int w, int h, File file)
Drawable
to the specified file in PDF format. This
will only work when the OrsonPDF library is found on the classpath.
Reflection is used to ensure there is no compile-time dependency on
OrsonPDF.drawable
- the drawable (null
not permitted).w
- the chart width.h
- the chart height.file
- the output file (null
not permitted).public static void writeAsPNG(org.jfree.ui.Drawable drawable, int w, int h, File file) throws FileNotFoundException, IOException
drawable
- the drawable (null
not permitted).w
- the chart width.h
- the chart height.file
- the output file (null
not permitted).FileNotFoundException
- if the file is not found.IOException
- if there is an I/O problem.public static void writeAsJPEG(org.jfree.ui.Drawable drawable, int w, int h, File file) throws FileNotFoundException, IOException
drawable
- the drawable (null
not permitted).w
- the chart width.h
- the chart height.file
- the output file (null
not permitted).FileNotFoundException
- if the file is not found.IOException
- if there is an I/O problem.Jas4pp 1.5 © Java Analysis Studio for Particle Physics