Package com.pspdfkit.forms
Class ChoiceFormElement
-
- All Implemented Interfaces:
public abstract class ChoiceFormElement extends FormElement
Represents a choice form control in a PDF form.
-
-
Method Summary
Modifier and Type Method Description ChoiceFormField
getFormField()
Retrieve parent form field. List<FormOption>
getOptions()
Retrieve the list of options that should be presented to the user. List<Integer>
getSelectedIndexes()
Returns list of indexes of the selected options. void
setSelectedIndexes(@NonNull() List<Integer> selectedIndexes)
Sets selected options indexes. void
setOptions(@NonNull() List<FormOption> options)
Sets the options for the given choice form element. boolean
isMultiSelectEnabled()
Check whether more than one of the element's options may be selected simultaneously. boolean
isCommitOnSelectionChangeEnabled()
When set, don't wait for the focus to exit the control, but immediately commit actions. -
-
Method Detail
-
getFormField
@NonNull() ChoiceFormField getFormField()
Retrieve parent form field.
- Returns:
Attached parent form field.
-
getOptions
@NonNull() List<FormOption> getOptions()
Retrieve the list of options that should be presented to the user.
- Returns:
List of form options.
-
getSelectedIndexes
@NonNull() List<Integer> getSelectedIndexes()
Returns list of indexes of the selected options.
- Returns:
List of selected options indexes.
-
setSelectedIndexes
void setSelectedIndexes(@NonNull() List<Integer> selectedIndexes)
Sets selected options indexes.
- Parameters:
selectedIndexes
- List of selected options indexes.
-
setOptions
void setOptions(@NonNull() List<FormOption> options)
Sets the options for the given choice form element. This WILL change the options in the PDF file.
- Parameters:
options
- List of entries for form options.
-
isMultiSelectEnabled
boolean isMultiSelectEnabled()
Check whether more than one of the element's options may be selected simultaneously.
- Returns:
true
when multi selection is enabled for the element.
-
isCommitOnSelectionChangeEnabled
boolean isCommitOnSelectionChangeEnabled()
When set, don't wait for the focus to exit the control, but immediately commit actions.
- Returns:
Whether to commit new value immediately after options has been selected.
-
-
-
-