Class PDListBox
java.lang.Object
org.apache.pdfbox.pdmodel.interactive.form.PDField
org.apache.pdfbox.pdmodel.interactive.form.PDTerminalField
org.apache.pdfbox.pdmodel.interactive.form.PDVariableText
org.apache.pdfbox.pdmodel.interactive.form.PDChoice
org.apache.pdfbox.pdmodel.interactive.form.PDListBox
- All Implemented Interfaces:
COSObjectable
A scrollable list box. Contains several text items, one or more of which shall be selected as the
field value.
-
Field Summary
Fields inherited from class org.apache.pdfbox.pdmodel.interactive.form.PDChoice
FLAG_COMBO
Fields inherited from class org.apache.pdfbox.pdmodel.interactive.form.PDVariableText
QUADDING_CENTERED, QUADDING_LEFT, QUADDING_RIGHT
-
Constructor Summary
ConstructorsConstructorDescriptionPDListBox
(PDAcroForm acroForm) PDListBox
(PDAcroForm acroForm, COSDictionary field, PDNonTerminalField parent) Constructor. -
Method Summary
Modifier and TypeMethodDescription(package private) void
Constructs appearance streams and appearance dictionaries for all widget annotations.int
This will get the top index "TI" value.void
setTopIndex
(Integer topIndex) This will set top index "TI" value.Methods inherited from class org.apache.pdfbox.pdmodel.interactive.form.PDChoice
getDefaultValue, getOptions, getOptionsDisplayValues, getOptionsExportValues, getSelectedOptionsIndex, getValue, getValueAsString, isCombo, isCommitOnSelChange, isDoNotSpellCheck, isMultiSelect, isSort, setCombo, setCommitOnSelChange, setDefaultValue, setDoNotSpellCheck, setMultiSelect, setOptions, setOptions, setSelectedOptionsIndex, setSort, setValue, setValue
Methods inherited from class org.apache.pdfbox.pdmodel.interactive.form.PDVariableText
getDefaultAppearance, getDefaultAppearanceString, getDefaultStyleString, getQ, getRichTextValue, getStringOrStream, setDefaultAppearance, setDefaultStyleString, setQ, setRichTextValue
Methods inherited from class org.apache.pdfbox.pdmodel.interactive.form.PDTerminalField
applyChange, exportFDF, getFieldFlags, getFieldType, getWidget, getWidgets, importFDF, setActions, setWidgets
Methods inherited from class org.apache.pdfbox.pdmodel.interactive.form.PDField
findKid, fromDictionary, getAcroForm, getActions, getAlternateFieldName, getCOSObject, getFullyQualifiedName, getInheritableAttribute, getMappingName, getParent, getPartialName, isNoExport, isReadOnly, isRequired, setAlternateFieldName, setFieldFlags, setMappingName, setNoExport, setPartialName, setReadOnly, setRequired, toString
-
Constructor Details
-
PDListBox
- Parameters:
acroForm
- The acroform.- See Also:
-
PDListBox
PDListBox(PDAcroForm acroForm, COSDictionary field, PDNonTerminalField parent) Constructor.- Parameters:
acroForm
- The form that this field is part of.field
- the PDF object to represent as a field.parent
- the parent node of the node
-
-
Method Details
-
getTopIndex
public int getTopIndex()This will get the top index "TI" value.- Returns:
- the top index, default value 0.
-
setTopIndex
This will set top index "TI" value.- Parameters:
topIndex
- the value for the top index, null will remove the value.
-
constructAppearances
Description copied from class:PDTerminalField
Constructs appearance streams and appearance dictionaries for all widget annotations. Subclasses should not call this method directly but viaPDTerminalField.applyChange()
.- Specified by:
constructAppearances
in classPDChoice
- Throws:
IOException
- if the appearance couldn't be generated
-