|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfree.chart.ChartUtilities
Utility methods for JFreeChart. Includes methods for converting charts to image formats (PNG and JPEG) plus creating simple HTML image maps.
Method Summary | |
static byte[] |
encodeAsPNG(java.awt.image.BufferedImage image)
Encodes the BufferedImage to PNG format. |
static byte[] |
encodeAsPNG(java.awt.image.BufferedImage image,
boolean encodeAlpha,
int compression)
Encodes the BufferedImage to PNG format. |
static java.lang.String |
getImageMap(java.lang.String name,
ChartRenderingInfo info)
Creates an image map and returns the String version of it. |
static java.lang.String |
getImageMap(java.lang.String name,
ChartRenderingInfo info,
ToolTipTagFragmentGenerator toolTipTagFragmentGenerator,
URLTagFragmentGenerator urlTagFragmentGenerator)
Creates an image map and returns the String version of it. |
static void |
saveChartAsJPEG(java.io.File file,
float quality,
JFreeChart chart,
int width,
int height)
Saves the chart as a JPEG format image file. |
static void |
saveChartAsJPEG(java.io.File file,
float quality,
JFreeChart chart,
int width,
int height,
ChartRenderingInfo info)
Saves the chart as a JPEG format image file. |
static void |
saveChartAsJPEG(java.io.File file,
JFreeChart chart,
int width,
int height)
Saves the chart as a JPEG format image file. |
static void |
saveChartAsJPEG(java.io.File file,
JFreeChart chart,
int width,
int height,
ChartRenderingInfo info)
Saves the chart as a JPEG format image file. |
static void |
saveChartAsPNG(java.io.File file,
JFreeChart chart,
int width,
int height)
Saves the chart as a PNG format image file. |
static void |
saveChartAsPNG(java.io.File file,
JFreeChart chart,
int width,
int height,
ChartRenderingInfo info)
Saves the chart as a PNG format image file. |
static void |
saveChartAsPNG(java.io.File file,
JFreeChart chart,
int width,
int height,
ChartRenderingInfo info,
boolean encodeAlpha,
int compression)
Saves the chart as a PNG format image file. |
static void |
writeBufferedImageAsJPEG(java.io.OutputStream out,
java.awt.image.BufferedImage image)
Writes the BufferedImage to the output stream in JPEG format. |
static void |
writeBufferedImageAsJPEG(java.io.OutputStream out,
float quality,
java.awt.image.BufferedImage image)
Writes the BufferedImage to the output stream in JPEG format. |
static void |
writeBufferedImageAsPNG(java.io.OutputStream out,
java.awt.image.BufferedImage image)
Writes the BufferedImage to the output stream in PNG format. |
static void |
writeBufferedImageAsPNG(java.io.OutputStream out,
java.awt.image.BufferedImage image,
boolean encodeAlpha,
int compression)
Writes the BufferedImage to the output stream in PNG format. |
static void |
writeChartAsJPEG(java.io.OutputStream out,
float quality,
JFreeChart chart,
int width,
int height)
Writes the chart to the output stream in JPEG format. |
static void |
writeChartAsJPEG(java.io.OutputStream out,
float quality,
JFreeChart chart,
int width,
int height,
ChartRenderingInfo info)
Writes the chart to the output stream in JPEG format. |
static void |
writeChartAsJPEG(java.io.OutputStream out,
JFreeChart chart,
int width,
int height)
Writes the chart to the output stream in JPEG format. |
static void |
writeChartAsJPEG(java.io.OutputStream out,
JFreeChart chart,
int width,
int height,
ChartRenderingInfo info)
Writes the chart to the output stream in JPEG format. |
static void |
writeChartAsPNG(java.io.OutputStream out,
JFreeChart chart,
int width,
int height)
Writes the chart to the output stream in PNG format. |
static void |
writeChartAsPNG(java.io.OutputStream out,
JFreeChart chart,
int width,
int height,
boolean encodeAlpha,
int compression)
Writes the chart to the output stream in PNG format. |
static void |
writeChartAsPNG(java.io.OutputStream out,
JFreeChart chart,
int width,
int height,
ChartRenderingInfo info)
Writes the chart to the output stream in PNG format. |
static void |
writeChartAsPNG(java.io.OutputStream out,
JFreeChart chart,
int width,
int height,
ChartRenderingInfo info,
boolean encodeAlpha,
int compression)
Writes the chart to the output stream in PNG format. |
static void |
writeImageMap(java.io.PrintWriter writer,
java.lang.String name,
ChartRenderingInfo info)
Writes an image map to the output stream. |
static void |
writeImageMap(java.io.PrintWriter writer,
java.lang.String name,
ChartRenderingInfo info,
boolean useOverLibForToolTips)
Writes an image map to the output stream. |
static void |
writeImageMap(java.io.PrintWriter writer,
java.lang.String name,
ChartRenderingInfo info,
ToolTipTagFragmentGenerator toolTipTagFragmentGenerator,
URLTagFragmentGenerator urlTagFragmentGenerator)
Writes an image map to the output stream. |
static void |
writeScaledChartAsPNG(java.io.OutputStream out,
JFreeChart chart,
int width,
int height,
int widthScaleFactor,
int heightScaleFactor)
Writes a scaled version of a chart to an output stream in PNG format. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static void writeChartAsPNG(java.io.OutputStream out, JFreeChart chart, int width, int height) throws java.io.IOException
out
- the output stream.chart
- the chart.width
- the image width.height
- the image height.
java.io.IOException
- if there are any I/O errors.public static void writeChartAsPNG(java.io.OutputStream out, JFreeChart chart, int width, int height, boolean encodeAlpha, int compression) throws java.io.IOException
out
- the output stream.chart
- the chart.width
- the image width.height
- the image height.encodeAlpha
- encode alpha?compression
- the compression level.
java.io.IOException
- if there are any I/O errors.public static void writeChartAsPNG(java.io.OutputStream out, JFreeChart chart, int width, int height, ChartRenderingInfo info) throws java.io.IOException
This method allows you to pass in a ChartRenderingInfo object, to collect information about the chart dimensions/entities. You will need this info if you want to create an HTML image map.
out
- the output stream.chart
- the chart.width
- the image width.height
- the image height.info
- the chart rendering info.
java.io.IOException
- if there are any I/O errors.public static void writeChartAsPNG(java.io.OutputStream out, JFreeChart chart, int width, int height, ChartRenderingInfo info, boolean encodeAlpha, int compression) throws java.io.IOException
This method allows you to pass in a ChartRenderingInfo object, to collect information about the chart dimensions/entities. You will need this info if you want to create an HTML image map.
out
- the output stream.chart
- the chart.width
- the image width.height
- the image height.info
- the chart rendering info.encodeAlpha
- encode alpha?compression
- the PNG compression level.
java.io.IOException
- if there are any I/O errors.public static void writeScaledChartAsPNG(java.io.OutputStream out, JFreeChart chart, int width, int height, int widthScaleFactor, int heightScaleFactor) throws java.io.IOException
out
- the output stream.chart
- the chart.width
- the unscaled chart width.height
- the unscaled chart height.widthScaleFactor
- the horizontal scale factor.heightScaleFactor
- the vertical scale factor.
java.io.IOException
- if there are any I/O problems.public static void saveChartAsPNG(java.io.File file, JFreeChart chart, int width, int height) throws java.io.IOException
file
- the file name.chart
- the chart.width
- the image width.height
- the image height.
java.io.IOException
- if there are any I/O errors.public static void saveChartAsPNG(java.io.File file, JFreeChart chart, int width, int height, ChartRenderingInfo info) throws java.io.IOException
This method allows you to pass in a ChartRenderingInfo object, to collect information about the chart dimensions/entities. You will need this info if you want to create an HTML image map.
file
- the file.chart
- the chart.width
- the image width.height
- the image height.info
- the chart rendering info.
java.io.IOException
- if there are any I/O errors.public static void saveChartAsPNG(java.io.File file, JFreeChart chart, int width, int height, ChartRenderingInfo info, boolean encodeAlpha, int compression) throws java.io.IOException
This method allows you to pass in a ChartRenderingInfo object, to collect information about the chart dimensions/entities. You will need this info if you want to create an HTML image map.
file
- the file.chart
- the chart.width
- the image width.height
- the image height.info
- the chart rendering info.encodeAlpha
- encode alpha?compression
- the PNG compression level.
java.io.IOException
- if there are any I/O errors.public static void writeChartAsJPEG(java.io.OutputStream out, JFreeChart chart, int width, int height) throws java.io.IOException
out
- the output stream.chart
- the chart.width
- the image width.height
- the image height.
java.io.IOException
- if there are any I/O errors.public static void writeChartAsJPEG(java.io.OutputStream out, float quality, JFreeChart chart, int width, int height) throws java.io.IOException
out
- the output stream.quality
- the quality setting.chart
- the chart.width
- the image width.height
- the image height.
java.io.IOException
- if there are any I/O errors.public static void writeChartAsJPEG(java.io.OutputStream out, JFreeChart chart, int width, int height, ChartRenderingInfo info) throws java.io.IOException
This method allows you to pass in a ChartRenderingInfo object, to collect information about the chart dimensions/entities. You will need this info if you want to create an HTML image map.
out
- the output stream.chart
- the chart.width
- the image width.height
- the image height.info
- the chart rendering info.
java.io.IOException
- if there are any I/O errors.public static void writeChartAsJPEG(java.io.OutputStream out, float quality, JFreeChart chart, int width, int height, ChartRenderingInfo info) throws java.io.IOException
This method allows you to pass in a ChartRenderingInfo object, to collect information about the chart dimensions/entities. You will need this info if you want to create an HTML image map.
out
- the output stream.quality
- the output quality (0.0f to 1.0f).chart
- the chart.width
- the image width.height
- the image height.info
- the chart rendering info.
java.io.IOException
- if there are any I/O errors.public static void saveChartAsJPEG(java.io.File file, JFreeChart chart, int width, int height) throws java.io.IOException
file
- the file.chart
- the chart.width
- the image width.height
- the image height.
java.io.IOException
- if there are any I/O errors.public static void saveChartAsJPEG(java.io.File file, float quality, JFreeChart chart, int width, int height) throws java.io.IOException
file
- the file.quality
- the JPEG quality setting.chart
- the chart.width
- the image width.height
- the image height.
java.io.IOException
- if there are any I/O errors.public static void saveChartAsJPEG(java.io.File file, JFreeChart chart, int width, int height, ChartRenderingInfo info) throws java.io.IOException
This method allows you to pass in a ChartRenderingInfo object, to collect information about the chart dimensions/entities. You will need this info if you want to create an HTML image map.
file
- the file name.chart
- the chart.width
- the image width.height
- the image height.info
- the chart rendering info.
java.io.IOException
- if there are any I/O errors.public static void saveChartAsJPEG(java.io.File file, float quality, JFreeChart chart, int width, int height, ChartRenderingInfo info) throws java.io.IOException
This method allows you to pass in a ChartRenderingInfo object, to collect information about the chart dimensions/entities. You will need this info if you want to create an HTML image map.
file
- the file name.quality
- the quality setting.chart
- the chart.width
- the image width.height
- the image height.info
- the chart rendering info.
java.io.IOException
- if there are any I/O errors.public static void writeBufferedImageAsJPEG(java.io.OutputStream out, java.awt.image.BufferedImage image) throws java.io.IOException
out
- the output stream.image
- the buffered image to be written to the OutputStream
java.io.IOException
- if there are any I/O errors.public static void writeBufferedImageAsJPEG(java.io.OutputStream out, float quality, java.awt.image.BufferedImage image) throws java.io.IOException
out
- the output stream.quality
- the image quality (0.0f to 1.0f).image
- the buffered image to be written to the OutputStream
java.io.IOException
- if there are any I/O errors.public static void writeBufferedImageAsPNG(java.io.OutputStream out, java.awt.image.BufferedImage image) throws java.io.IOException
out
- the output stream.image
- the buffered image to be written to the OutputStream
java.io.IOException
- if there are any I/O errors.public static void writeBufferedImageAsPNG(java.io.OutputStream out, java.awt.image.BufferedImage image, boolean encodeAlpha, int compression) throws java.io.IOException
out
- the output stream.image
- the buffered image to be written to the OutputStream.encodeAlpha
- encode alpha?compression
- the compression level.
java.io.IOException
- if there are any I/O errors.public static byte[] encodeAsPNG(java.awt.image.BufferedImage image)
image
- The BufferedImage.
public static byte[] encodeAsPNG(java.awt.image.BufferedImage image, boolean encodeAlpha, int compression)
image
- The BufferedImage.encodeAlpha
- encode alpha?compression
- the PNG compression level.
public static void writeImageMap(java.io.PrintWriter writer, java.lang.String name, ChartRenderingInfo info) throws java.io.IOException
writer
- the writer.name
- the map name.info
- the chart rendering info.
java.io.IOException
- if there are any I/O errors.public static void writeImageMap(java.io.PrintWriter writer, java.lang.String name, ChartRenderingInfo info, boolean useOverLibForToolTips) throws java.io.IOException
writer
- the writer.name
- the map name.info
- the chart rendering info.useOverLibForToolTips
- whether to use OverLIB for tooltips
(http://www.bosrup.com/web/overlib/).
java.io.IOException
- if there are any I/O errors.public static void writeImageMap(java.io.PrintWriter writer, java.lang.String name, ChartRenderingInfo info, ToolTipTagFragmentGenerator toolTipTagFragmentGenerator, URLTagFragmentGenerator urlTagFragmentGenerator) throws java.io.IOException
writer
- the writer.name
- the map name.info
- the chart rendering info.toolTipTagFragmentGenerator
- the tool tip generator.urlTagFragmentGenerator
- the url generator.
java.io.IOException
- if there are any I/O errors.public static java.lang.String getImageMap(java.lang.String name, ChartRenderingInfo info)
name
- the map name.info
- the chart rendering info.
public static java.lang.String getImageMap(java.lang.String name, ChartRenderingInfo info, ToolTipTagFragmentGenerator toolTipTagFragmentGenerator, URLTagFragmentGenerator urlTagFragmentGenerator)
name
- the map name.info
- the chart rendering info.toolTipTagFragmentGenerator
- the tool tip generator.urlTagFragmentGenerator
- the url generator.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |