|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.uka.ipd.sdq.ByCounter.reporting.ChartResultWriter
public class ChartResultWriter
Utility for exporting JFreeChart objects as .pdf files. Uses itext.
Field Summary | |
---|---|
static int |
FILETYPE_JPG
Filetypes for chart files: jpg |
static int |
FILETYPE_PDF
Filetypes for chart files: pdf |
static int |
FILETYPE_PNG
Filetypes for chart files: png |
Constructor Summary | |
---|---|
ChartResultWriter(java.lang.String chartDir,
java.lang.String chartName)
|
Method Summary | |
---|---|
org.jfree.chart.JFreeChart |
createAndSaveChart(long datasetTimestampForSavingChart,
org.jfree.data.category.DefaultCategoryDataset dataset,
boolean savePNGchart,
boolean savePDFchart,
int chartXsize,
int chartYsize,
java.lang.String qualifyingMethodName,
java.lang.String pathForChartSaving)
TODO |
java.lang.String |
getChartDir()
|
java.lang.String |
getChartName()
|
static void |
saveChartAsPDF(java.io.File file,
org.jfree.chart.JFreeChart chart,
int width,
int height,
com.lowagie.text.pdf.FontMapper mapper)
Save a JFreeChart to a File as a .pdf. |
void |
setChartDir(java.lang.String chartDir)
|
void |
setChartName(java.lang.String chartName)
|
static void |
writeChartAsPDF(java.io.OutputStream out,
org.jfree.chart.JFreeChart chart,
int width,
int height,
com.lowagie.text.pdf.FontMapper mapper)
Writes a JFreeChart object to a OutputStream . |
long |
writeResultToFile(CountingResult cr,
boolean usePrevTimestamp,
long prevTimestampToUse)
(non-Javadoc) |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int FILETYPE_JPG
public static final int FILETYPE_PDF
public static final int FILETYPE_PNG
Constructor Detail |
---|
public ChartResultWriter(java.lang.String chartDir, java.lang.String chartName)
chartDir
- The directory in which charts are saved.chartName
- The filename for the chart.Method Detail |
---|
public static void saveChartAsPDF(java.io.File file, org.jfree.chart.JFreeChart chart, int width, int height, com.lowagie.text.pdf.FontMapper mapper) throws java.io.IOException
file
- File to write to.chart
- JFreeChart object to draw.width
- Width of the object.height
- Height of the object.mapper
- Fontmapper to interface with itext. (Try DefaultFontMapper).
java.io.IOException
- Thrown when errors happen while writing.public static void writeChartAsPDF(java.io.OutputStream out, org.jfree.chart.JFreeChart chart, int width, int height, com.lowagie.text.pdf.FontMapper mapper) throws java.io.IOException
OutputStream
.
From JFreeChart Developer guide.
out
- Output stream.chart
- Chart to write.width
- Width of the graphic.height
- Height of the graphic.mapper
- Fontmapper to interface with itext.
java.io.IOException
- Is thrown by the OutputStream.public org.jfree.chart.JFreeChart createAndSaveChart(long datasetTimestampForSavingChart, org.jfree.data.category.DefaultCategoryDataset dataset, boolean savePNGchart, boolean savePDFchart, int chartXsize, int chartYsize, java.lang.String qualifyingMethodName, java.lang.String pathForChartSaving)
datasetTimestampForSavingChart
- dataset
- savePNGchart
- savePDFchart
- chartXsize
- chartYsize
- qualifyingMethodName
- pathForChartSaving
-
JFreeChart
created using the specified parameters.public java.lang.String getChartDir()
public java.lang.String getChartName()
public void setChartDir(java.lang.String chartDir)
chartDir
- the chartDir to setpublic void setChartName(java.lang.String chartName)
chartName
- the chartName to setpublic long writeResultToFile(CountingResult cr, boolean usePrevTimestamp, long prevTimestampToUse)
writeResultToFile
in interface ICountingResultWriter
cr
- CountingResult to writeusePrevTimestamp
- TODO explain
ICountingResultWriter.writeResultToFile(de.uka.ipd.sdq.ByCounter.execution.CountingResult, boolean, long)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |