Class SVGReportOutput
java.lang.Object
org.faceless.publisher.output.svg.SVGReportOutput
- All Implemented Interfaces:
org.faceless.publisher.output.ReportCanvasContext,ReportOutput,org.faceless.publisher.type.EnvSource
A ReportOutput that writes the output to one or more SVG files.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceAn interface which can be set on anSVGReportOutputto control where the individual pages are written. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfree(org.faceless.publisher.type.AbstractNode node) Inform the output that the specified node has been freedReturn 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).booleanReturn true if the current page is blankvoidmarkPage()Record that this page is not blankvoidSet anSVGReportOutput.OutputHandlerfor this SVGOutputStream.voidwrite(OutputStream out) Write the SVG output to the specified stream.
-
Constructor Details
-
SVGReportOutput
public SVGReportOutput()
-
-
Method Details
-
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.OutputHandlerfor 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, ornullto use the default- See Also:
-
getOutputHandler
Return the OutputHandler set bysetOutputHandler(org.faceless.publisher.output.svg.SVGReportOutput.OutputHandler).- Returns:
- the OutputHandler, or
nullif the default is used. - See Also:
-
getMediaType
Description copied from interface:ReportOutputReturn 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. -
free
public void free(org.faceless.publisher.type.AbstractNode node) Inform the output that the specified node has been freed- Specified by:
freein interfaceReportOutput
-
isPageBlank
public boolean isPageBlank()Return true if the current page is blank- Specified by:
isPageBlankin interfaceReportOutput
-
markPage
public void markPage()Record that this page is not blank- Specified by:
markPagein interfaceorg.faceless.publisher.output.ReportCanvasContext- Specified by:
markPagein interfaceReportOutput
-