public abstract class Exporter.ExporterTask extends LongRunningTask
LongRunningTask
that can be run to save a PDF to
an OutputStream. Subclasses need to implement the savePDF()
method,
which should save the PDF to the OutputStream supplied in the Exporter.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.
Constructor and Description |
---|
ExporterTask() |
Modifier and Type | Method and 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
|
addPropertyChangeListener, cancel, getProgress, isCancellable, isCancelled, isModal, isRunning, removePropertyChangeListener, setCancellable, setModal, start, start
public void run() throws IOException
LongRunningTask
LongRunningTask.start(javax.swing.JComponent, java.lang.String)
, this method
should typically not be called directly.run
in class LongRunningTask
IOException
public abstract void savePDF() throws IOException
IOException
public void completed()
Exporter.completed()
method in
the Exporter
will be called on completion, but
it may be easier for subclasses to override the other method.Copyright © 2001-2017 Big Faceless Organization