public class

ComboBoxFormElement

extends ChoiceFormElement
java.lang.Object
   ↳ com.pspdfkit.forms.FormElement
     ↳ com.pspdfkit.forms.ChoiceFormElement
       ↳ com.pspdfkit.forms.ComboBoxFormElement

Class Overview

A form control which displays drop-down list. When isEditable() flag is set, it can be accompanied by an editable text box for editing custom value.

Summary

Public Methods
String getCustomText()
Returns custom value set in editable combo box.
ComboBoxFormField getFormField()
Retrieve parent form field.
FormType getType()
Gets form type for ComboBoxFormElement.
boolean isCustomTextSet()
Check whether custom value is set.
boolean isEditable()
Check whether the combo box has a text field attached and a custom value is allowed.
boolean isSpellCheckEnabled()
Returns whether text entered in the combo box shall be spell-checked.
boolean setCustomText(String customValue)
Sets a custom value.
[Expand]
Inherited Methods
From class com.pspdfkit.forms.ChoiceFormElement
From class com.pspdfkit.forms.FormElement
From class java.lang.Object

Public Methods

public String getCustomText ()

Returns custom value set in editable combo box.

Returns
  • Custom value or null if not set.

public ComboBoxFormField getFormField ()

Retrieve parent form field.

Returns
  • Attached parent form field.

public FormType getType ()

Gets form type for ComboBoxFormElement. See FormType.

Returns
  • Form type for ComboBoxFormElement.

public boolean isCustomTextSet ()

Check whether custom value is set.

Returns
  • true if custom value has been set.

public boolean isEditable ()

Check whether the combo box has a text field attached and a custom value is allowed.

Returns
  • true when custom values are allowed.

public boolean isSpellCheckEnabled ()

Returns whether text entered in the combo box shall be spell-checked. Valid only when isEditable() flag is set.

Returns
  • true when text content can be spell checked.

public boolean setCustomText (String customValue)

Sets a custom value.

Returns
  • true when value has been set, false when type does not support a custom value or value did not change.