com.jrefinery.chart
Class ChartUtilities

java.lang.Object
  extended by com.jrefinery.chart.ChartUtilities

public class ChartUtilities
extends java.lang.Object

Utility methods for JFreeChart.


Constructor Summary
ChartUtilities()
           
 
Method Summary
static void saveChartAsJPEG(java.io.File file, JFreeChart chart, int width, int height)
          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 writeChartAsJPEG(java.io.OutputStream out, JFreeChart chart, int width, int height)
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChartUtilities

public ChartUtilities()
Method Detail

writeChartAsPNG

public static void writeChartAsPNG(java.io.OutputStream out,
                                   JFreeChart chart,
                                   int width,
                                   int height)
                            throws java.io.IOException
Writes the chart to the output stream in PNG format.

Parameters:
out - The output stream.
chart - The chart.
width - The image width.
height - The image height.
Throws:
java.io.IOException

saveChartAsPNG

public static void saveChartAsPNG(java.io.File file,
                                  JFreeChart chart,
                                  int width,
                                  int height)
                           throws java.io.IOException
Saves the chart as a PNG format image file.

Parameters:
chart - The chart.
width - The image width.
height - The image height.
file - The file.
Throws:
java.io.IOException

writeChartAsJPEG

public static void writeChartAsJPEG(java.io.OutputStream out,
                                    JFreeChart chart,
                                    int width,
                                    int height)
                             throws java.io.IOException
Writes the chart to the output stream in JPEG format.

Parameters:
out - The output stream.
chart - The chart.
width - The image width.
height - The image height.
Throws:
java.io.IOException

saveChartAsJPEG

public static void saveChartAsJPEG(java.io.File file,
                                   JFreeChart chart,
                                   int width,
                                   int height)
                            throws java.io.IOException
Saves the chart as a JPEG format image file.

Parameters:
file - The file.
chart - The chart.
width - The image width.
height - The image height.
Throws:
java.io.IOException


Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.