Class ComboBoxFormElement
-
- All Implemented Interfaces:
public class ComboBoxFormElement extends ChoiceFormElement
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.
-
-
Method Summary
Modifier and Type Method Description FormType
getType()
Gets form type for ComboBoxFormElement
.ComboBoxFormField
getFormField()
Retrieve parent form field. boolean
isCustomTextSet()
Check whether custom value is set. String
getCustomText()
Returns custom value set in editable combo box. boolean
setCustomText(@Nullable() String customValue)
Sets a custom value. 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. -
-
Method Detail
-
getType
@NonNull() FormType getType()
Gets form type for
ComboBoxFormElement
. See FormType.- Returns:
Form type for
ComboBoxFormElement
.
-
getFormField
@NonNull() ComboBoxFormField getFormField()
Retrieve parent form field.
- Returns:
Attached parent form field.
-
isCustomTextSet
boolean isCustomTextSet()
Check whether custom value is set.
- Returns:
true
if custom value has been set.
-
getCustomText
@Nullable() String getCustomText()
Returns custom value set in editable combo box.
- Returns:
Custom value or
null
if not set.
-
setCustomText
boolean setCustomText(@Nullable() 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.
-
isEditable
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.
-
isSpellCheckEnabled
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.
-
-
-
-