Class SVGReportOutput
java.lang.Object
org.faceless.publisher.output.svg.SVGReportOutput
- All Implemented Interfaces:
org.faceless.publisher.output.ReportCanvasContext
,ReportOutput
A ReportOutput that writes the output to one or more SVG files.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
An interface which can be set on anSVGReportOutput
to control where the individual pages are written. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDataList
(String id, List<String> data) Return the type of object that would be written byReportOutput.write(java.io.OutputStream)
, or if that method doesn't apply, the type of Media generated by this ReportOutput.Return the OutputHandler set bysetOutputHandler(org.faceless.publisher.output.svg.SVGReportOutput.OutputHandler)
.boolean
Return true if the current page is blankvoid
markPage()
Record that this page is not blankvoid
Set anSVGReportOutput.OutputHandler
for this SVGOutputStream.void
write
(OutputStream out) Write the SVG output to the specified stream.
-
Constructor Details
-
SVGReportOutput
public SVGReportOutput()
-
-
Method Details
-
addDataList
-
write
Write the SVG output to the specified stream. If an OutputHandler has been set, that will be used instead and the OutputStream supplied to this method will be ignored.
Otherwise, if the "pagination" method specifies individual pages, they will be written to the supplied OutputStream as as zip file. Other pagination methods will generate a single SVG file written to the supplied OutputStream.
- Parameters:
out
- the OutputStream to write to.- Throws:
IOException
- if generated when writing.
-
setOutputHandler
Set anSVGReportOutput.OutputHandler
for this SVGOutputStream. An OutputHandler may be specified to customize the way the SVG is written, allowing individual pages to be written to individual OutputStreams.- Parameters:
handler
- the OutputHandler to use, ornull
to use the default- See Also:
-
getOutputHandler
Return the OutputHandler set bysetOutputHandler(org.faceless.publisher.output.svg.SVGReportOutput.OutputHandler)
.- Returns:
- the OutputHandler, or
null
if the default is used. - See Also:
-
getMediaType
Description copied from interface:ReportOutput
Return the type of object that would be written byReportOutput.write(java.io.OutputStream)
, or if that method doesn't apply, the type of Media generated by this ReportOutput. -
isPageBlank
public boolean isPageBlank()Description copied from interface:ReportOutput
Return true if the current page is blank- Specified by:
isPageBlank
in interfaceReportOutput
-
markPage
public void markPage()Description copied from interface:ReportOutput
Record that this page is not blank- Specified by:
markPage
in interfaceorg.faceless.publisher.output.ReportCanvasContext
- Specified by:
markPage
in interfaceReportOutput
-