|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.xinapse.util.ReportGenerator
public abstract class ReportGenerator
Abstract Class to generate reports. Reports can be either in simple text format, or in PDF format.
| Nested Class Summary | |
|---|---|
static class |
ReportGenerator.ReportType
An enumration of the types of report that can be generated. |
| Field Summary | |
|---|---|
static java.lang.String |
PREFERENCES_NODE_NAME
The node name for all Preferences to do with ReportGenerator. |
| Constructor Summary | |
|---|---|
ReportGenerator()
|
|
| Method Summary | |
|---|---|
abstract void |
addGraph(com.xinapse.graph.GraphPanel graphPanel,
java.lang.String title,
java.lang.String dataKey,
java.lang.String pointsKey)
Adds a graph to the report. |
abstract void |
addImage(MultiSliceImage image,
ColourMapping cm,
double displayMin,
double displayMax,
ComplexMode complexMode,
java.lang.String title)
Adds an image to the report. |
abstract void |
addParagraph(com.lowagie.text.Chunk c)
Adds a paragraph to the report. |
abstract void |
addParagraph(java.lang.String s)
Adds a paragraph to the report. |
abstract void |
addTable(java.lang.String title,
java.lang.String[] columnHeaders,
double[][] data,
java.text.NumberFormat formatter)
Adds a table to the report. |
abstract void |
generateReport()
Cause this ReoprtGenerator to generate a report. |
static ReportGenerator |
getInstance(java.awt.Component component,
java.util.List<java.lang.String> info,
java.lang.String title,
java.lang.String basename)
Creates a new ReportGenerator after prompting the user to ask if she wants a report to be created. |
static ReportGenerator |
getInstance(ReportGenerator.ReportType type,
java.lang.String title,
java.io.File file)
Creates a new ReportGenerator. |
abstract ReportGenerator.ReportType |
getReportType()
Returns the ReportType generated. |
static java.text.DateFormat |
getScanDateFormat()
Returns a DateFormat suitable for formatting scan dates. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String PREFERENCES_NODE_NAME
| Constructor Detail |
|---|
public ReportGenerator()
| Method Detail |
|---|
public static java.text.DateFormat getScanDateFormat()
public static ReportGenerator getInstance(ReportGenerator.ReportType type,
java.lang.String title,
java.io.File file)
throws java.io.IOException,
com.lowagie.text.DocumentException
type - the type of report.title - the report title.file - the file name for the report.
java.io.IOException - if an I/O error occurs.
com.lowagie.text.DocumentException - if the report cannot be generated because the document could not
be created.
public static ReportGenerator getInstance(java.awt.Component component,
java.util.List<java.lang.String> info,
java.lang.String title,
java.lang.String basename)
throws java.io.IOException,
com.lowagie.text.DocumentException
component - parent of any pop-up dialog.info - a List of information to be put into the pop-up dialog where the user is asked.title - the report title.basename - the suggested file basename for the report.
java.io.IOException - if an I/O error occurs.
com.lowagie.text.DocumentException - if the report cannot be generated because the document could not
be created.public abstract ReportGenerator.ReportType getReportType()
public abstract void addParagraph(java.lang.String s)
throws com.lowagie.text.DocumentException
s - some text to be added as a paragraph to the report.
com.lowagie.text.DocumentException - if the paragraph cannot be added.
public abstract void addParagraph(com.lowagie.text.Chunk c)
throws com.lowagie.text.DocumentException
c - a Chunk to be added as a paragraph to the report.
com.lowagie.text.DocumentException - if the paragraph cannot be added.
public abstract void addGraph(com.xinapse.graph.GraphPanel graphPanel,
java.lang.String title,
java.lang.String dataKey,
java.lang.String pointsKey)
throws com.lowagie.text.DocumentException,
java.io.IOException
graphPanel - the graph to be added.title - the graph title.dataKey - the key to the line data.pointsKey - the key to the points data.
com.lowagie.text.DocumentException - if the graph cannot be added.
java.io.IOException
public abstract void addImage(MultiSliceImage image,
ColourMapping cm,
double displayMin,
double displayMax,
ComplexMode complexMode,
java.lang.String title)
throws com.lowagie.text.DocumentException,
java.io.IOException
image - the image to be added.cm - the ColourMapping for the image.displayMin - the value in the image that maps to the first entry of the colour mapping.displayMax - the value in the image that maps to the last entry of the colour mapping.complexMode - used to create the image if it is comples.title - the image title.
com.lowagie.text.DocumentException - if the image cannot be added.
java.io.IOException - if reading the image results in an IOException.
public abstract void addTable(java.lang.String title,
java.lang.String[] columnHeaders,
double[][] data,
java.text.NumberFormat formatter)
throws com.lowagie.text.DocumentException,
java.io.IOException
title - the table title.columnHeaders - the table column headers.data - the table data.formatter - the format used to format the data values in the report.
com.lowagie.text.DocumentException - if the table cannot be added.
java.io.IOException - if an IOException occurs.
public abstract void generateReport()
throws com.lowagie.text.DocumentException,
java.io.IOException
com.lowagie.text.DocumentException - if the report cannot be generated.
java.io.IOException - if an IOException occurs.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||