Class ComboBoxFormConfiguration.Builder
-
- All Implemented Interfaces:
public class ComboBoxFormConfiguration.Builder extends FormElementConfiguration.BaseBuilder<V, B>
Builder used to construct ComboBoxFormConfiguration instance.
-
-
Constructor Summary
Constructors Constructor Description ComboBoxFormConfiguration.Builder(int pageIndex, RectF boundingBox)
Creates a new ComboBoxFormConfiguration builder.
-
Method Summary
Modifier and Type Method Description ComboBoxFormConfiguration.Builder
setFormOptions(@NonNull() List<FormOption> options)
Sets the list of options for the given choices of the form element. ComboBoxFormConfiguration.Builder
setEditable(boolean isEditable)
Defines whether or not the com.pspdfkit.forms.ComboBoxFormElement instance should be editable. ComboBoxFormConfiguration.Builder
setSpellCheckEnabled(boolean isSpellCheckEnabled)
Sets whether text entered in the combo box shall be spell-checked, defaults to true
.ComboBoxFormConfiguration.Builder
setMultiSelectionEnabled(boolean isMultiSelectEnabled)
Defines whether the multiselection should be enabled or not. ComboBoxFormConfiguration
build()
Creates a ComboBoxFormConfiguration with the arguments supplied to this builder. ComboBoxFormConfiguration.Builder
setSelectedIndex(@Nullable() Integer selectedIndex)
Sets the index with the selected option. ComboBoxFormConfiguration.Builder
setCustomText(@Nullable() String customValue)
Sets custom text string. -
-
Constructor Detail
-
ComboBoxFormConfiguration.Builder
ComboBoxFormConfiguration.Builder(int pageIndex, RectF boundingBox)
Creates a new ComboBoxFormConfiguration builder.- Parameters:
pageIndex
- Page index where the checkbox form element will be attached.boundingBox
- Annotation bounding box of the widget annotation representing the appearance of the checkbox form element.
-
-
Method Detail
-
setFormOptions
ComboBoxFormConfiguration.Builder setFormOptions(@NonNull() List<FormOption> options)
Sets the list of options for the given choices of the form element.
- Parameters:
options
- List of options for the given choices of the form element.
-
setEditable
ComboBoxFormConfiguration.Builder setEditable(boolean isEditable)
Defines whether or not the com.pspdfkit.forms.ComboBoxFormElement instance should be editable. When editable, the form element will accept a custom text among its options. The form element is not editable by default.
- Parameters:
isEditable
-true
if the form element should be editable.
-
setSpellCheckEnabled
ComboBoxFormConfiguration.Builder setSpellCheckEnabled(boolean isSpellCheckEnabled)
Sets whether text entered in the combo box shall be spell-checked, defaults to
true
. Valid only when the combo box is editable (setEditable).- Parameters:
isSpellCheckEnabled
-true
when text content should be spell checked.
-
setMultiSelectionEnabled
ComboBoxFormConfiguration.Builder setMultiSelectionEnabled(boolean isMultiSelectEnabled)
Defines whether the multiselection should be enabled or not. Multi selection is disabled by default.
- Parameters:
isMultiSelectEnabled
-true
if multiselection should be enabled.
-
build
@NonNull() ComboBoxFormConfiguration build()
Creates a ComboBoxFormConfiguration with the arguments supplied to this builder.
- Returns:
Newly created configuration.
-
setSelectedIndex
ComboBoxFormConfiguration.Builder setSelectedIndex(@Nullable() Integer selectedIndex)
Sets the index with the selected option.
- Parameters:
selectedIndex
- Index with the selected option.
-
setCustomText
ComboBoxFormConfiguration.Builder setCustomText(@Nullable() String customValue)
Sets custom text string. May be
null
.- Parameters:
customValue
- Custom text string.
-
-
-
-