Package com.itextpdf.forms.form.element
Class SelectFieldItem
java.lang.Object
com.itextpdf.forms.form.element.SelectFieldItem
A field that represents a control for selecting one of the provided options. It is used in the
ComboBoxField
class.
-
Constructor Summary
ConstructorDescriptionSelectFieldItem
(String value) Create a newSelectFieldItem
.SelectFieldItem
(String value, IBlockElement optionElement) Create a newSelectFieldItem
.SelectFieldItem
(String exportValue, String displayValue) Create a newSelectFieldItem
.SelectFieldItem
(String exportValue, String displayValue, IBlockElement optionElement) Create a newSelectFieldItem
. -
Method Summary
Modifier and TypeMethodDescriptionGet the display value of the item.Get the option element of the item.Get the export value of the item.boolean
Check if the item has a display value.
-
Constructor Details
-
SelectFieldItem
Create a newSelectFieldItem
.- Parameters:
-
exportValue
- the export value of the item. -
displayValue
- the display value of the item.
-
SelectFieldItem
Create a newSelectFieldItem
.- Parameters:
-
value
- the export value of the item.
-
SelectFieldItem
Create a newSelectFieldItem
.- Parameters:
-
value
- the export value of the item. -
optionElement
- the option element of the item.
-
SelectFieldItem
Create a newSelectFieldItem
.- Parameters:
-
exportValue
- the export value of the item. -
displayValue
- the display value of the item. -
optionElement
- the option element of the item.
-
-
Method Details
-
getExportValue
Get the export value of the item.- Returns:
- export value.
-
getDisplayValue
Get the display value of the item. If the display value is not set, the export value will be used as display value.- Returns:
- display value.
-
getElement
Get the option element of the item.This is the element which will be displayed in the dropdown. It allows for customization.
- Returns:
- option element.
-
hasExportAndDisplayValues
public boolean hasExportAndDisplayValues()Check if the item has a display value. and export value.- Returns:
-
true
if the item has both export and display values,false
otherwise.
-