Package net.sf.statcvs.charts
Class ChartImage
- java.lang.Object
-
- net.sf.statcvs.charts.ChartImage
-
public class ChartImage extends java.lang.Object
An image file for a chart. TODO: Better integrate all charts with ReportConfig- Version:
- $Id: ChartImage.java,v 1.9 2009/03/14 11:08:35 benoitx Exp $
- Author:
- jentzsch, Richard Cyganiak (richard@cyganiak.de)
-
-
Field Summary
Fields Modifier and Type Field Description static java.awt.Color
BACKGROUND_COLOR
static java.awt.Color
PLOT_COLOR
-
Constructor Summary
Constructors Constructor Description ChartImage(java.lang.String rootDirectory, java.lang.String fileName, java.lang.String title, org.jfree.chart.JFreeChart chart, java.awt.Dimension size)
Creates a new ChartFile.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getFullTitle()
Returns the chart's title.int
getHeight()
Returns the chart's height in pixels.java.lang.String
getURL()
Returns the chart's URL, relative to the report root.int
getWidth()
Returns the chart's width in pixels.void
write()
Writes the chart to disk as a PNG file.
-
-
-
Constructor Detail
-
ChartImage
public ChartImage(java.lang.String rootDirectory, java.lang.String fileName, java.lang.String title, org.jfree.chart.JFreeChart chart, java.awt.Dimension size)
Creates a new ChartFile.- Parameters:
rootDirectory
- The report root directory with trailing slashfileName
- The relative file name for the chart, with .png extensiontitle
- The chart's titlechart
- The JFreeChart object to save as a filesize
- width and height of the chart in pixels
-
-
Method Detail
-
write
public void write()
Writes the chart to disk as a PNG file.
-
getURL
public java.lang.String getURL()
Returns the chart's URL, relative to the report root.
-
getFullTitle
public java.lang.String getFullTitle()
Returns the chart's title.
-
getWidth
public int getWidth()
Returns the chart's width in pixels.
-
getHeight
public int getHeight()
Returns the chart's height in pixels.
-
-