public class BackgroundSignatureVerifier extends ViewerFeature implements DocumentPanelListener, PDFBackgroundTask
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 |
---|
BackgroundSignatureVerifier() |
Modifier and Type | Method and Description |
---|---|
void |
documentUpdated(DocumentPanelEvent event)
Called when an
DocumentPanelEvent is raised |
void |
initialize(PDFViewer viewer)
Called when the feature is first added to a viewer
|
boolean |
isEnabledByDefault()
Return true if this feature is enabled by default (the default).
|
boolean |
isPaused()
Return true if the task has been paused with the
PDFBackgroundTask.pause() method |
boolean |
isRunning()
Returns true if the task is still running
|
void |
pause()
Pause the task until the
PDFBackgroundTask.unpause() method is called. |
void |
startVerification(DocumentPanel docpanel,
Collection<? extends FormElement> fields)
Start a background thread that runs the
verify() method |
void |
unpause()
Unpause the task after a call to
PDFBackgroundTask.pause() |
void |
verify(DocumentPanel docpanel,
Collection<? extends FormElement> fields)
Verify the specified collection of fields.
|
getAllEnabledFeatures, getAllFeatures, getCustomJavaScript, getFeatureProperty, getFeatureURLProperty, getName, setFeatureName, teardown, toString
public void initialize(PDFViewer viewer)
ViewerFeature
initialize
in class ViewerFeature
public boolean isEnabledByDefault()
ViewerFeature
ViewerFeature.getAllEnabledFeatures()
and by the PDFViewerApplet
and PDFTool
isEnabledByDefault
in class ViewerFeature
public void documentUpdated(DocumentPanelEvent event)
DocumentPanelListener
DocumentPanelEvent
is raiseddocumentUpdated
in interface DocumentPanelListener
public boolean isPaused()
PDFBackgroundTask
PDFBackgroundTask.pause()
methodisPaused
in interface PDFBackgroundTask
public boolean isRunning()
PDFBackgroundTask
isRunning
in interface PDFBackgroundTask
public void pause()
PDFBackgroundTask
PDFBackgroundTask.unpause()
method is called.
This method waits until the task has actually paused.pause
in interface PDFBackgroundTask
public void unpause()
PDFBackgroundTask
PDFBackgroundTask.pause()
unpause
in interface PDFBackgroundTask
public void startVerification(DocumentPanel docpanel, Collection<? extends FormElement> fields)
verify()
methoddocpanel
- the DocumentPanel containing the signatures being verifiedfields
- a Collection containing the fields to verifypublic void verify(DocumentPanel docpanel, Collection<? extends FormElement> fields)
SignatureProvider
can be found that canVerify()
them.docpanel
- the DocumentPanel containing the signatures being verifiedfields
- a Collection containing the fields to verify. Only signed FormSignature
fields from this Collection will be checked, so it's safe to pass
pdf.getForm().getElements().values()
to check all fieldsCopyright © 2001-2017 Big Faceless Organization