org.ujac.chart
Class ImageIOChartWriter

java.lang.Object
  extended by org.ujac.chart.ChartWriter
      extended by org.ujac.chart.ImageIOChartWriter

public class ImageIOChartWriter
extends ChartWriter

Name: ImageIOChartWriter
Description: A chart writer using the javax.imageio API, introduced with JDK 1.4.

Author:
lauerc

Constructor Summary
ImageIOChartWriter(float quality)
          Constructs a ImageIOChartWriter instance for jpg format with specific attributes.
ImageIOChartWriter(String formatName)
          Constructs a ImageIOChartWriter instance with specific attributes.
ImageIOChartWriter(String formatName, float quality)
          Constructs a ImageIOChartWriter instance with specific attributes.
 
Method Summary
 String getFormatName()
          Getter method for the the property formatName.
 float getQuality()
          Getter method for the the property quality.
 void output(Chart chart, OutputStream os, int width, int height)
          Renders the chart to the given output stream.
 void setFormatName(String formatName)
          Setter method for the the property formatName.
 void setQuality(float quality)
          Setter method for the the property quality.
 
Methods inherited from class org.ujac.chart.ChartWriter
output
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageIOChartWriter

public ImageIOChartWriter(float quality)
Constructs a ImageIOChartWriter instance for jpg format with specific attributes.

Parameters:
quality - The quality level (0.0 to 1.0).

ImageIOChartWriter

public ImageIOChartWriter(String formatName)
Constructs a ImageIOChartWriter instance with specific attributes.

Parameters:
formatName - The image format name.

ImageIOChartWriter

public ImageIOChartWriter(String formatName,
                          float quality)
Constructs a ImageIOChartWriter instance with specific attributes.

Parameters:
formatName - The image format name.
quality - The quality level (0.0 to 1.0).
Method Detail

getQuality

public float getQuality()
Getter method for the the property quality.

Returns:
The current value of property quality.

setQuality

public void setQuality(float quality)
Setter method for the the property quality.

Parameters:
quality - The value to set for the property quality.

getFormatName

public String getFormatName()
Getter method for the the property formatName.

Returns:
The current value of property formatName.

setFormatName

public void setFormatName(String formatName)
Setter method for the the property formatName.

Parameters:
formatName - The value to set for the property formatName.

output

public void output(Chart chart,
                   OutputStream os,
                   int width,
                   int height)
            throws ChartException,
                   IOException
Description copied from class: ChartWriter
Renders the chart to the given output stream.

Specified by:
output in class ChartWriter
Parameters:
chart - The chart to render.
os - The output stream to render to.
width - The width of the output area.
height - The height of the output area.
Throws:
ChartException - In case the chart processing failed.
IOException - In case an I/O problem occurred.
See Also:
ChartWriter.output(org.ujac.chart.Chart, java.io.OutputStream, int, int)


Copyright © 2003-2004 UJAC.org. All Rights Reserved.