Package com.inet.pdfc.presenter
Class DifferencesPrintPresenter
- java.lang.Object
-
- com.inet.pdfc.presenter.BasePresenter
-
- com.inet.pdfc.presenter.ExportPresenter
-
- com.inet.pdfc.presenter.DifferencesPrintPresenter
-
- All Implemented Interfaces:
NamedExtension
,java.lang.Cloneable
public class DifferencesPrintPresenter extends ExportPresenter
This presenter exports a graphical overview of the complete comparison to a printer. The visual representation is similar to the one of the i-net PDFC GUI.This presenter will create a
PrinterJob
for each Pair of compared PDFs using thePrintService
andattributes
passed in at construction.
In the case you need to change the printer settings for each compared pair, you can overrideonComparisonDone()
and change the AttributeSet before callingsuper.onComparisonDone();
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.inet.pdfc.presenter.BasePresenter
BasePresenter.ERROR_SOURCE
-
-
Field Summary
-
Fields inherited from class com.inet.pdfc.presenter.ExportPresenter
PAINT_BOTH, PAINT_LEFT, PAINT_RIGHT
-
Fields inherited from class com.inet.pdfc.presenter.BasePresenter
LOGGER, MAX_FILENAME_LENGTH
-
-
Constructor Summary
Constructors Constructor Description DifferencesPrintPresenter(javax.print.PrintService service, javax.print.attribute.PrintRequestAttributeSet attributes)
Create a new Presenter which exports the complete comparison result to a printer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.-
Methods inherited from class com.inet.pdfc.presenter.ExportPresenter
createAndSetupPrintPainter, setAddHeaderFooter, setBackgroundColor, setColorprovider, setOverlapAlpha, setPaintOverlap, setPaintSides, setScaleToFitPageHeight
-
Methods inherited from class com.inet.pdfc.presenter.BasePresenter
canInformUserOnErrors, configure, createExportFilename, detachFromModel, executeImmediately, getDefaultExportName, getLastPresenterException, getModel, getParent, getPresenterExceptions, onClear, onDataUpdate, onError, onFilterChange, onFinish, onInit, onProgressUpdate, setModel, setParent
-
-
-
-
Constructor Detail
-
DifferencesPrintPresenter
public DifferencesPrintPresenter(@Nonnull javax.print.PrintService service, javax.print.attribute.PrintRequestAttributeSet attributes)
Create a new Presenter which exports the complete comparison result to a printer.- Parameters:
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.- Since:
- i-net PDFC 3.0
-
-
Method Detail
-
getExtensionName
public java.lang.String getExtensionName()
Returns the UNIQUE name of the extension. With UNIQUE referring to 'unique among all implementations of the same interface'- Returns:
- the UNIQUE name of the extension
-
onComparisonDone
public void onComparisonDone() throws java.lang.Exception
Called to indicate that a comparison has finished. This does not imply that any page data or differences are available.- Specified by:
onComparisonDone
in classBasePresenter
- Throws:
java.lang.Exception
- thrown in case the processing of the finish step fails
-
spawn
public BasePresenter spawn(boolean spawnWithParent)
Creates another presenter of the the same type as the current one. The spawned presenter may either have the same settings as the current one or it may be a child of the current one.- Overrides:
spawn
in classBasePresenter
- Parameters:
spawnWithParent
- if true, the presenter is allowed to keep a reference to it's parent to create a summary on onFinish()- Returns:
- a new presenter for the same batch comparison run as the current one
-
-