Package com.itextpdf.forms.fields
Class ChoiceFormFieldBuilder
java.lang.Object
com.itextpdf.forms.fields.FormFieldBuilder
com.itextpdf.forms.fields.TerminalFormFieldBuilder<ChoiceFormFieldBuilder>
com.itextpdf.forms.fields.ChoiceFormFieldBuilder
Builder for choice form field.
-
Constructor Summary
ConstructorDescriptionChoiceFormFieldBuilder
(PdfDocument document, String formFieldName) Creates builder forPdfChoiceFormField
creation. -
Method Summary
Modifier and TypeMethodDescriptionCreates combobox form field base on provided parameters.Creates list form field based on provided parameters.Gets options for choice form field.protected ChoiceFormFieldBuilder
getThis()
Returns this builder object.setOptions
(PdfArray options) Sets options for choice form field.setOptions
(String[] options) Sets options for choice form field.setOptions
(String[][] options) Sets options for choice form field.Methods inherited from class com.itextpdf.forms.fields.TerminalFormFieldBuilder
getPage, getWidgetRectangle, setPage, setPage, setWidgetRectangle
Methods inherited from class com.itextpdf.forms.fields.FormFieldBuilder
getConformanceLevel, getDocument, getFormFieldName, setConformanceLevel
-
Constructor Details
-
ChoiceFormFieldBuilder
Creates builder forPdfChoiceFormField
creation.- Parameters:
-
document
- document to be used for form field creation -
formFieldName
- name of the form field
-
-
Method Details
-
getOptions
Gets options for choice form field.- Returns:
-
PdfArray
of choice form field options
-
setOptions
Sets options for choice form field.- Parameters:
-
options
-PdfArray
of choice form field options - Returns:
- this builder
-
setOptions
Sets options for choice form field.- Parameters:
-
options
- array ofString
options - Returns:
- this builder
-
setOptions
Sets options for choice form field.- Parameters:
-
options
- two-dimensional array ofString
options. Every inner array shall have two elements. - Returns:
- this builder
-
createList
Creates list form field based on provided parameters.- Returns:
-
new
PdfChoiceFormField
instance
-
createComboBox
Creates combobox form field base on provided parameters.- Returns:
-
new
PdfChoiceFormField
instance
-
getThis
Returns this builder object. Required for superclass methods.- Specified by:
-
getThis
in classFormFieldBuilder<ChoiceFormFieldBuilder>
- Returns:
- this builder
-