Package org.faceless.pdf2.viewer2
Class Exporter.ExporterTask
- java.lang.Object
-
- org.faceless.pdf2.viewer2.util.LongRunningTask
-
- org.faceless.pdf2.viewer2.Exporter.ExporterTask
-
- Enclosing class:
- Exporter
public abstract class Exporter.ExporterTask extends LongRunningTask
This class is aLongRunningTask
that can be run to save a PDF to an OutputStream. Subclasses need to implement thesavePDF()
method, which should save the PDF to the OutputStream supplied in theExporter.getExporter(org.faceless.pdf2.viewer2.DocumentPanel, org.faceless.pdf2.PDF, javax.swing.JComponent, java.io.OutputStream)
method.This code is copyright the Big Faceless Organization. You're welcome to use, modify and distribute it in any form in your own projects, provided those projects continue to make use of the Big Faceless PDF library.
- Since:
- 2.10.2
-
-
Constructor Summary
Constructors Constructor Description ExporterTask()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
completed()
Called when the save has completed - by default, a no-op.void
run()
Run the current task.abstract void
savePDF()
Save the PDF to the OutputStream-
Methods inherited from class org.faceless.pdf2.viewer2.util.LongRunningTask
addPropertyChangeListener, cancel, getProgress, isCancellable, isCancelled, isModal, isRunning, removePropertyChangeListener, setCancellable, setModal, start, start
-
-
-
-
Method Detail
-
run
public void run() throws IOException
Description copied from class:LongRunningTask
Run the current task. Called byLongRunningTask.start(javax.swing.JComponent, java.lang.String)
, this method should typically not be called directly.- Specified by:
run
in classLongRunningTask
- Throws:
IOException
-
savePDF
public abstract void savePDF() throws IOException
Save the PDF to the OutputStream- Throws:
IOException
-
completed
public void completed()
Called when the save has completed - by default, a no-op. Both this and theExporter.completed()
method in theExporter
will be called on completion, but it may be easier for subclasses to override the other method.- Since:
- 2.11.2
-
-