Class FormBlankSignatureWidgetFactory
- java.lang.Object
-
- org.faceless.pdf2.viewer2.ViewerFeature
-
- org.faceless.pdf2.viewer2.AnnotationComponentFactory
-
- org.faceless.pdf2.viewer2.feature.FormBlankSignatureWidgetFactory
-
public class FormBlankSignatureWidgetFactory extends AnnotationComponentFactory
Create annotations to handleWidgetAnnotation
objects belonging to unsignedFormSignature
fields. When an annotation created by this class is selected, aSignatureProvider
will be chosen and itsshowSignDialog()
method called. The name of this feature is FormBlankSignatureWidgetFactoryThis 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.8, with much of the functionality moved to
SignatureProvider
in 2.11
-
-
Field Summary
-
Fields inherited from class org.faceless.pdf2.viewer2.AnnotationComponentFactory
FOCUSBORDER
-
-
Constructor Summary
Constructors Constructor Description FormBlankSignatureWidgetFactory()
Create a new FormBlankSignatureWidgetFactory
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JComponent
createComponent(PagePanel pagepanel, PDFAnnotation annot)
Return a JComponent that will visually represent the specified PDFAnnotation.boolean
matches(PDFAnnotation annot)
Return true if this AnnotationComponentFactory could create aJComponent
for the specifiedPDFAnnotation
.void
sign(FormSignature field, DocumentPanel docpanel, SignatureProvider provider)
Sign the field, by calling theshowSignDialog()
method on the specified SignatureServiceProvider.-
Methods inherited from class org.faceless.pdf2.viewer2.AnnotationComponentFactory
addStockDetailsToEditComponent, bindComponentLocation, bindComponentLocation, bindComponentLocation, bindComponentLocation, copyAnnotationState, createDeleteAction, createEditAction, createEditComponent, createFlattenAction, createNewAnnotation, createNewAnnotation, getAnnotationType, getPreferences, getViewer, initialize, isFactoryReadOnly, makeComponentInteractive, paintComponent, paintComponentAnnotations, popupPropertyMenu, postEdit, toString
-
Methods inherited from class org.faceless.pdf2.viewer2.ViewerFeature
getAllEnabledFeatures, getAllFeatures, getCustomJavaScript, getFeatureProperty, getFeatureURLProperty, getName, isEnabledByDefault, setFeatureName, teardown
-
-
-
-
Method Detail
-
matches
public boolean matches(PDFAnnotation annot)
Description copied from class:AnnotationComponentFactory
Return true if this AnnotationComponentFactory could create aJComponent
for the specifiedPDFAnnotation
.- Specified by:
matches
in classAnnotationComponentFactory
-
createComponent
public JComponent createComponent(PagePanel pagepanel, PDFAnnotation annot)
Description copied from class:AnnotationComponentFactory
Return a JComponent that will visually represent the specified PDFAnnotation. The default implementation returns a JPanel that will display the annotation appearance - it's usually best to call super.createComponent() then add any required listeners in the subclasses.
By default this method returns a JCompoment whose
paintComponent()
method is overridden to callpaintComponent(this, this.ui, g)
followed bypaintComponentAnnotations(this, g)
- typically, the main reason to override this method is when a different type of object is required (eg. aJTextField
)- Overrides:
createComponent
in classAnnotationComponentFactory
- Parameters:
pagepanel
- the panel the JComponent will be added toannot
- the annotation- See Also:
paintComponentAnnotations()
,paintComponent()
-
sign
public void sign(FormSignature field, DocumentPanel docpanel, SignatureProvider provider) throws IOException, GeneralSecurityException
Sign the field, by calling theshowSignDialog()
method on the specified SignatureServiceProvider.- Parameters:
field
- the blank Signature Field to signdocpanel
- the DocumentPanelprovider
- the SignatureServiceProvider to use to sign the field.- Throws:
IOException
GeneralSecurityException
-
-