public class DifferencesPrintPresenter extends ExportPresenter
This presenter will create a PrinterJob
for each Pair of compared PDFs using the PrintService
and
attributes
passed in at construction.
In the case you need to change the printer settings for each compared pair, you can override
onComparisonDone()
and change the AttributeSet before calling super.onComparisonDone();
.
BasePresenter.ERROR_SOURCE
PAINT_BOTH, PAINT_LEFT, PAINT_RIGHT
LOGGER, MAX_FILENAME_LENGTH
Constructor and Description |
---|
DifferencesPrintPresenter(javax.print.PrintService service,
javax.print.attribute.PrintRequestAttributeSet attributes)
Create a new Presenter which exports the complete comparison result to a printer.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getExtensionName()
Returns the UNIQUE name of the extension.
|
void |
onComparisonDone()
Called to indicate that a comparison has finished.
|
BasePresenter |
spawn(boolean spawnWithParent)
Creates another presenter of the the same type as the current one.
|
createAndSetupPrintPainter, setAddHeaderFooter, setBackgroundColor, setColorprovider, setOverlapAlpha, setPaintOverlap, setPaintSides, setScaleToFitPageHeight
canInformUserOnErrors, configure, createExportFilename, detachFromModel, executeImmediately, getDefaultExportName, getLastPresenterException, getModel, getParent, getPresenterExceptions, onClear, onDataUpdate, onError, onFilterChange, onFinish, onInit, onProgressUpdate, setModel, setParent
public DifferencesPrintPresenter(@Nonnull javax.print.PrintService service, javax.print.attribute.PrintRequestAttributeSet attributes)
service
- The PrinterService to use for the printing process. NOT NULL.attributes
- A set of attributes which holds printing information such as paper size, orientation or which
pages to print. See ApiDoc for Java Printing for more details. NOT NULL.public java.lang.String getExtensionName()
public void onComparisonDone() throws java.lang.Exception
onComparisonDone
in class BasePresenter
java.lang.Exception
- thrown in case the processing of the finish step failspublic BasePresenter spawn(boolean spawnWithParent)
spawn
in class BasePresenter
spawnWithParent
- if true, the presenter is allowed to keep a reference to it's parent to create a summary on onFinish()Copyright © 2010-2022 by i-net software GmbH