| com.pspdfkit.forms.FormProvider |
Handles all form related operations on the owning document.
Retrieve it with getFormProvider().
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| abstract <T extends FormElementConfiguration> FormField |
addFormElementToPage(String fullyQualifiedName, T formElementConfiguration)
Allows to programmatically create and insert a form field into the document.
| ||||||||||
| abstract <T extends FormElementConfiguration> Single<FormField> |
addFormElementToPageAsync(String fullyQualifiedName, T formElementConfiguration)
Allows to programmatically create and insert a form field into the document, asynchronously.
| ||||||||||
| abstract <T extends FormElementConfiguration> FormField |
addFormElementsToPage(String fullyQualifiedName, List<T> formElementConfigurations)
Allows to programmatically create and insert a form field into the document.
| ||||||||||
| abstract <T extends FormElementConfiguration> Single<FormField> |
addFormElementsToPageAsync(String fullyQualifiedName, List<T> formElementConfigurations)
Allows to programmatically create and insert a form field into the document, asynchronously.
| ||||||||||
| abstract void |
addOnButtonFormFieldUpdatedListener(FormListeners.OnButtonFormFieldUpdatedListener listener)
Adds
FormListeners.OnButtonFormFieldUpdatedListener to get notified when button fields get updated. | ||||||||||
| abstract void |
addOnChoiceFormFieldUpdatedListener(FormListeners.OnChoiceFormFieldUpdatedListener listener)
Adds
FormListeners.OnChoiceFormFieldUpdatedListener to get notified when choice fields get updated. | ||||||||||
| abstract void |
addOnFormFieldUpdatedListener(FormListeners.OnFormFieldUpdatedListener listener)
Adds
FormListeners.OnFormFieldUpdatedListener to get notified when any form field gets updated. | ||||||||||
| abstract void |
addOnFormTabOrderUpdatedListener(FormListeners.OnFormTabOrderUpdatedListener listener)
Adds
FormListeners.OnFormTabOrderUpdatedListener to get notified when form tab order has been recalculated. | ||||||||||
| abstract void |
addOnTextFormFieldUpdatedListener(FormListeners.OnTextFormFieldUpdatedListener listener)
Adds
FormListeners.OnTextFormFieldUpdatedListener to get notified when text fields get updated. | ||||||||||
| abstract FormElement |
getFormElementForAnnotation(WidgetAnnotation annotation)
Finds a form element for widget annotation.
| ||||||||||
| abstract Maybe<FormElement> |
getFormElementForAnnotationAsync(WidgetAnnotation annotation)
Finds a form element for widget annotation, asynchronously.
| ||||||||||
| abstract FormElement |
getFormElementWithName(String fieldName)
Searches for a form element by name.
| ||||||||||
| abstract Maybe<FormElement> |
getFormElementWithNameAsync(String fieldName)
Searches for a form element with a given name, asynchronously.
| ||||||||||
| abstract List<FormElement> |
getFormElements()
Returns a list of all form elements in the document.
| ||||||||||
| abstract Single<List<FormElement>> |
getFormElementsAsync()
Returns a list of all form elements in the document, asynchronously.
| ||||||||||
| abstract FormField |
getFormFieldWithFullyQualifiedName(String fullyQualifiedName)
Searches for a form field with fully qualified field name.
| ||||||||||
| abstract Maybe<FormField> |
getFormFieldWithFullyQualifiedNameAsync(String fullyQualifiedName)
Searches for a form field with fully qualified field name, asynchronously.
| ||||||||||
| abstract List<FormField> |
getFormFields()
Returns a list of all form fields in the document.
| ||||||||||
| abstract Single<List<FormField>> |
getFormFieldsAsync()
Returns the list of all form fields in the document, asynchronously.
| ||||||||||
| abstract List<FormElement> |
getTabOrder()
Returns order of | ||||||||||
| abstract Single<List<FormElement>> |
getTabOrderAsync()
Returns order of
FormElement for document, asynchronously. | ||||||||||
| abstract boolean |
hasUnsavedChanges()
Returns whether form fields in this document were modified or not.
| ||||||||||
| abstract void |
removeOnButtonFormFieldUpdatedListener(FormListeners.OnButtonFormFieldUpdatedListener listener)
Removes previously registered
FormListeners.OnButtonFormFieldUpdatedListener. | ||||||||||
| abstract void |
removeOnChoiceFormFieldUpdatedListener(FormListeners.OnChoiceFormFieldUpdatedListener listener)
Removes previously registered
FormListeners.OnChoiceFormFieldUpdatedListener. | ||||||||||
| abstract void |
removeOnFormFieldUpdatedListener(FormListeners.OnFormFieldUpdatedListener listener)
Removes previously registered
FormListeners.OnFormFieldUpdatedListener. | ||||||||||
| abstract void |
removeOnFormTabOrderUpdatedListener(FormListeners.OnFormTabOrderUpdatedListener listener)
Removes previously registered
FormListeners.OnFormTabOrderUpdatedListener. | ||||||||||
| abstract void |
removeOnTextFormFieldUpdatedListener(FormListeners.OnTextFormFieldUpdatedListener listener)
Removes previously registered
FormListeners.OnTextFormFieldUpdatedListener. | ||||||||||
Allows to programmatically create and insert a form field into the document.
| fullyQualifiedName | The fully qualified name of the new form field. |
|---|---|
| formElementConfiguration | Form element configuration class. |
Allows to programmatically create and insert a form field into the document, asynchronously.
| fullyQualifiedName | The fully qualified name of the new form field. |
|---|---|
| formElementConfiguration | Form element configuration class. |
Allows to programmatically create and insert a form field into the document. The newly created form field will be automatically attached to the document once created.
| fullyQualifiedName | The fully qualified name of the new form field. |
|---|---|
| formElementConfigurations | List of form element configuration classes (Only CheckBoxFormConfiguration and
RadioButtonFormConfiguration support multiple elements). |
Allows to programmatically create and insert a form field into the document, asynchronously. The newly created form field will be automatically attached to the document once created.
| fullyQualifiedName | The fully qualified name of the new form field. |
|---|---|
| formElementConfigurations | List of form element configuration classes (Only CheckBoxFormConfiguration and
RadioButtonFormConfiguration support multiple elements). |
Adds FormListeners.OnButtonFormFieldUpdatedListener to get notified when button fields get updated. If the listener has already been added previously, this
method will be a no-op. Adding null is not allowed, and will result in an exception.
| listener | FormListeners.OnButtonFormFieldUpdatedListener that should be notified. Must be non-null. |
|---|
Adds FormListeners.OnChoiceFormFieldUpdatedListener to get notified when choice fields get updated. If the listener has already been added previously, this
method will be a no-op. Adding null is not allowed, and will result in an exception.
| listener | FormListeners.OnChoiceFormFieldUpdatedListener that should be notified. Must be non-null. |
|---|
Adds FormListeners.OnFormFieldUpdatedListener to get notified when any form field gets updated. If the listener has already been added previously, this method
will be a no-op. Adding null is not allowed, and will result in an exception.
| listener | FormListeners.OnFormFieldUpdatedListener that should be notified. Must be non-null. |
|---|
Adds FormListeners.OnFormTabOrderUpdatedListener to get notified when form tab order has been recalculated. If the listener has already been added previously,
this method will be a no-op. Adding null is not allowed, and will result in an exception.
| listener | FormListeners.OnFormTabOrderUpdatedListener that should be notified. Must be non-null. |
|---|
Adds FormListeners.OnTextFormFieldUpdatedListener to get notified when text fields get updated. If the listener has already been added previously, this method
will be a no-op. Adding null is not allowed, and will result in an exception.
| listener | FormListeners.OnTextFormFieldUpdatedListener that should be notified. Must be non-null. |
|---|
Finds a form element for widget annotation.
Note: this call may block for a while and should not be invoked on the main thread.
| annotation | Widget annotation to search for. |
|---|
Finds a form element for widget annotation, asynchronously.
| annotation | Widget annotation to search for. |
|---|
Searches for a form element by name. Returns the first element with given name.
Note: this call may block for a while and should not be invoked on the main thread.
| fieldName | The form element name. |
|---|
Searches for a form element with a given name, asynchronously.
| fieldName | The form element name. |
|---|
Returns a list of all form elements in the document.
Note: this call may block for a while and should not be invoked on the main thread.
Returns a list of all form elements in the document, asynchronously.
Searches for a form field with fully qualified field name. Returns the first field with given fullyQualifiedName.
Note: this call may block for a while and should not be invoked on the main thread.
| fullyQualifiedName | The fully qualified field name. |
|---|
Searches for a form field with fully qualified field name, asynchronously.
| fullyQualifiedName | The fully qualified field name. |
|---|
Returns a list of all form fields in the document.
Note: this call may block for a while and should not be invoked on the main thread.
Returns the list of all form fields in the document, asynchronously.
Returns order of FormElement for document. We calculate the tab order with two different methods:
onFormTabOrderUpdated() will be called.FormElement in tab order.Returns order of FormElement for document, asynchronously.
FormElement in tab order.
Returns whether form fields in this document were modified or not.
true if form fields in this document were modified and the document should be saved, or false if no forms were
modified.
Removes previously registered FormListeners.OnButtonFormFieldUpdatedListener. Upon calling this method the listener will no longer be notified of
any changes. If the listener has not been added, this method will be a no-op. Passing null is not allowed, and will result in an exception.
| listener | FormListeners.OnButtonFormFieldUpdatedListener that should be removed. Must be non-null. |
|---|
Removes previously registered FormListeners.OnChoiceFormFieldUpdatedListener. Upon calling this method the listener will no longer be notified of
any changes. If the listener has not been added, this method will be a no-op. Passing null is not allowed, and will result in an exception.
| listener | FormListeners.OnChoiceFormFieldUpdatedListener that should be removed. Must be non-null. |
|---|
Removes previously registered FormListeners.OnFormFieldUpdatedListener. Upon calling this method the listener will no longer be notified of any
changes. If the listener has not been added, this method will be a no-op. Passing null is not allowed, and will result in an exception.
| listener | FormListeners.OnFormFieldUpdatedListener that should be removed. Must be non-null. |
|---|
Removes previously registered FormListeners.OnFormTabOrderUpdatedListener. Upon calling this method the listener will no longer be notified of any
changes. If the listener has not been added, this method will be a no-op. Passingnull is not allowed, and will result in an exception.
| listener | FormListeners.OnFormTabOrderUpdatedListener that should be removed. Must be non-null. |
|---|
Removes previously registered FormListeners.OnTextFormFieldUpdatedListener. Upon calling this method the listener will no longer be notified of
any changes. If the listener has not been added, this method will be a no-op. Passing null is not allowed, and will result in an exception.
| listener | FormListeners.OnTextFormFieldUpdatedListener that should be removed. Must be non-null. |
|---|