Class ChoiceFormFieldBuilder
java.lang.Object
com.itextpdf.forms.fields.FormFieldBuilder<ChoiceFormFieldBuilder>
com.itextpdf.forms.fields.TerminalFormFieldBuilder<ChoiceFormFieldBuilder>
com.itextpdf.forms.fields.ChoiceFormFieldBuilder
Builder for choice form field.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionChoiceFormFieldBuilder(PdfDocument document, String formFieldName) Creates builder forPdfChoiceFormFieldcreation. -
Method Summary
Modifier and TypeMethodDescriptionprivate PdfChoiceFormFieldcreateChoice(int flags) Creates combobox form field base on provided parameters.Creates list form field based on provided parameters.Gets options for choice form field.protected ChoiceFormFieldBuildergetThis()Returns this builder object.private static PdfArrayprocessOptions(String[] options) private static PdfArrayprocessOptions(String[][] options) 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.private static voidverifyOptions(PdfArray options) Methods inherited from class TerminalFormFieldBuilder
getFont, getPage, getWidgetRectangle, setFont, setPage, setPage, setPageToField, setPageToField, setWidgetRectangleMethods inherited from class FormFieldBuilder
getConformance, getDocument, getFormFieldName, setConformance
-
Field Details
-
options
-
-
Constructor Details
-
ChoiceFormFieldBuilder
Creates builder forPdfChoiceFormFieldcreation.- Parameters:
document- document to be used for form field creationformFieldName- name of the form field
-
-
Method Details
-
getOptions
-
setOptions
Sets options for choice form field.- Parameters:
options-PdfArrayof choice form field options- Returns:
- this builder
-
setOptions
Sets options for choice form field.- Parameters:
options- array ofStringoptions- Returns:
- this builder
-
setOptions
Sets options for choice form field.- Parameters:
options- two-dimensional array ofStringoptions. Every inner array shall have two elements.- Returns:
- this builder
-
createList
Creates list form field based on provided parameters.- Returns:
- new
PdfChoiceFormFieldinstance
-
createComboBox
Creates combobox form field base on provided parameters.- Returns:
- new
PdfChoiceFormFieldinstance
-
getThis
Returns this builder object. Required for superclass methods.- Specified by:
getThisin classFormFieldBuilder<ChoiceFormFieldBuilder>- Returns:
- this builder
-
createChoice
-
processOptions
-
verifyOptions
-
processOptions
-