public abstract class

ChoiceFormElement

extends FormElement
java.lang.Object
   ↳ com.pspdfkit.forms.FormElement
     ↳ com.pspdfkit.forms.ChoiceFormElement
Known Direct Subclasses

Class Overview

Represents a choice form control in a PDF form.

Summary

Public Methods
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.
boolean isCommitOnSelectionChangeEnabled()
When set, don't wait for the focus to exit the control, but immediately commit actions.
boolean isMultiSelectEnabled()
Check whether more than one of the element's options may be selected simultaneously.
void setOptions(List<FormOption> options)
Sets the options for the given choice form element.
void setSelectedIndexes(List<Integer> selectedIndexes)
Sets selected options indexes.
Protected Methods
EnumSet<NativeFormChoiceFlags> getChoiceFlags()
[Expand]
Inherited Methods
From class com.pspdfkit.forms.FormElement
From class java.lang.Object

Public Methods

public ChoiceFormField getFormField ()

Retrieve parent form field.

Returns
  • Attached parent form field.

public List<FormOption> getOptions ()

Retrieve the list of options that should be presented to the user.

Returns
  • List of form options.

public List<Integer> getSelectedIndexes ()

Returns list of indexes of the selected options.

Returns
  • List of selected options indexes.

public 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.

public 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.

public void setOptions (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.

public void setSelectedIndexes (List<Integer> selectedIndexes)

Sets selected options indexes.

Parameters
selectedIndexes List of selected options indexes.

Protected Methods

protected EnumSet<NativeFormChoiceFlags> getChoiceFlags ()