Class SignatureFormElement
-
- All Implemented Interfaces:
public class SignatureFormElement extends FormElement
Form element representing a signature field. Can be tapped in the user interface to show the signing dialog.
-
-
Method Summary
Modifier and Type Method Description FormType
getType()
Gets form type for SignatureFormElement. SignatureFormField
getFormField()
Returns the parent SignatureFormField. boolean
isSigned()
Returns if this form element is digitally signed. DigitalSignatureInfo
getSignatureInfo()
Returns information of signature attached to this form element. Annotation
getOverlappingSignature()
Searches the document for an ink or stamp signature that overlaps this form element. Maybe<Annotation>
getOverlappingSignatureAsync()
Searches the document for an ink or stamp signature that overlaps this form element, asynchronously. -
-
Method Detail
-
getType
@NonNull() FormType getType()
Gets form type for SignatureFormElement. See FormType.
- Returns:
Form type for SignatureFormElement.
-
getFormField
@NonNull() SignatureFormField getFormField()
Returns the parent SignatureFormField.
- Returns:
The SignatureFormField of this element. This will always be non-
null
.
-
isSigned
boolean isSigned()
Returns if this form element is digitally signed. Note that this DOES NOT check if the signature is actually valid. Signature validity must be checked separately by calling validate on the signature info returned by getSignatureInfo.
Note: If you want to check if there is an ink signature for this use getOverlappingSignature instead since this method only deals with digital signatures.
- Returns:
true
if this signature field is digitally signed, otherwisefalse
.
-
getSignatureInfo
@NonNull() DigitalSignatureInfo getSignatureInfo()
Returns information of signature attached to this form element. If this element has no signature, calling isSigned on the returned will return
false
.- Returns:
DigitalSignatureInfo of this element. This will always be non-
null
.
-
getOverlappingSignature
@Nullable() Annotation getOverlappingSignature()
Searches the document for an ink or stamp signature that overlaps this form element.
Note: this call may block for a while and should not be invoked on the main thread.
- Returns:
Annotation that overlaps this form element or
null
if no such annotation exists. The Annotation can be an InkAnnotation or .
-
getOverlappingSignatureAsync
@NonNull() Maybe<Annotation> getOverlappingSignatureAsync()
Searches the document for an ink or stamp signature that overlaps this form element, asynchronously.
- Scheduler:
- This method operates on background Scheduler.
- Returns:
An instance of Maybe that either emits the overlapping Annotation in `onSuccess()` or terminates with `onCompleted()` or `onError()`. The Annotation can be an InkAnnotation or StampAnnotation.
-
-
-
-