Class ElectronicSignatureOptions.Builder
-
- All Implemented Interfaces:
public final class ElectronicSignatureOptions.Builder
A helper class used for building the ElectronicSignatureOptions.
-
-
Constructor Summary
Constructors Constructor Description ElectronicSignatureOptions.Builder()
Default constructor to get the default options. ElectronicSignatureOptions.Builder(ElectronicSignatureOptions copyFrom)
Initialize ElectronicSignatureOptions with a copy of an existing object.
-
Method Summary
Modifier and Type Method Description ElectronicSignatureOptions.Builder
signatureSavingStrategy(@NonNull() SignatureSavingStrategy savingStrategy)
Defines if a signature should be saved after creation. ElectronicSignatureOptions.Builder
signatureColorOptions(@NonNull() SignatureColorOptions signatureColorOptions)
Defines the 3 signature color options available when using the Electronic Signatures "Draw" or "Type" signing UI. ElectronicSignatureOptions.Builder
enableStylusOnDetection(boolean enableStylusOnDetection)
Indicates whether we should automatically detect the stylus. ElectronicSignatureOptions.Builder
signatureCreationModes(@NonNull() @Size(min = 1, max = 3) List<SignatureCreationMode> signatureCreationModes)
The ways in which the user can choose to add their signature. ElectronicSignatureOptions
build()
Build the ElectronicSignatureOptions object from the provided properties. -
-
Constructor Detail
-
ElectronicSignatureOptions.Builder
ElectronicSignatureOptions.Builder()
Default constructor to get the default options.
-
ElectronicSignatureOptions.Builder
ElectronicSignatureOptions.Builder(ElectronicSignatureOptions copyFrom)
Initialize ElectronicSignatureOptions with a copy of an existing object.- Parameters:
copyFrom
- Original object to make a copy from.
-
-
Method Detail
-
signatureSavingStrategy
@NonNull() ElectronicSignatureOptions.Builder signatureSavingStrategy(@NonNull() SignatureSavingStrategy savingStrategy)
Defines if a signature should be saved after creation. Defaults to SAVE_IF_SELECTED.
- Parameters:
savingStrategy
- Signature strategy to apply to saving signatures.
-
signatureColorOptions
@NonNull() ElectronicSignatureOptions.Builder signatureColorOptions(@NonNull() SignatureColorOptions signatureColorOptions)
Defines the 3 signature color options available when using the Electronic Signatures "Draw" or "Type" signing UI. Defaults to black, purple, and blue.
- Parameters:
signatureColorOptions
- Can be created from @ColorRes or @ColorInt with fromColorRes and fromColorInt respectively.
-
enableStylusOnDetection
ElectronicSignatureOptions.Builder enableStylusOnDetection(boolean enableStylusOnDetection)
Indicates whether we should automatically detect the stylus. Enabling this will automatically disable all other inputs once we detect stylus use. Enabling this will also allow for swiping between pages with the finger during annotating and automatically turn on the "Use stylus for annotating" switch, if it is off. Disabling this setting allows for drawing with both the stylus and the finger but prevents swiping with the finger during annotating unless the "Use stylus for annotating" setting switch in the document has been manually turned on. This value is obtained through enableStylusOnDetection Defaults to
true
-
signatureCreationModes
@NonNull() ElectronicSignatureOptions.Builder signatureCreationModes(@NonNull() @Size(min = 1, max = 3) List<SignatureCreationMode> signatureCreationModes)
The ways in which the user can choose to add their signature. These are shown in the order specified as tabs across the top of the signatures UI. The first entry will be selected initially. If this array contains a single entry then the tabs will be hidden. This array must not be empty and must not contain duplicates.
- Parameters:
signatureCreationModes
- An array of SignatureCreationMode.
-
build
@NonNull() ElectronicSignatureOptions build()
Build the ElectronicSignatureOptions object from the provided properties.
- Returns:
ElectronicSignatureOptions object with values set in the builder.
-
-
-
-