Class PDComboBox
- 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.PDComboBox
-
- All Implemented Interfaces:
COSObjectable
public final class PDComboBox extends PDChoice
A combo box consisting of a drop-down list. May be accompanied by an editable text box in which non-predefined values may be entered.
-
-
Field Summary
Fields Modifier and Type Field Description private static int
FLAG_EDIT
-
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
Constructors Constructor Description PDComboBox(PDAcroForm acroForm)
PDComboBox(PDAcroForm acroForm, COSDictionary field, PDNonTerminalField parent)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
constructAppearances()
Constructs appearance streams and appearance dictionaries for all widget annotations.boolean
isEdit()
Determines if Edit is set.void
setEdit(boolean edit)
Set the Edit bit.-
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
-
-
-
-
Field Detail
-
FLAG_EDIT
private static final int FLAG_EDIT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PDComboBox
public PDComboBox(PDAcroForm acroForm)
- Parameters:
acroForm
- The acroform.- See Also:
PDField(PDAcroForm)
-
PDComboBox
PDComboBox(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 Detail
-
isEdit
public boolean isEdit()
Determines if Edit is set.- Returns:
- true if the combo box shall include an editable text box as well as a drop-down list.
-
setEdit
public void setEdit(boolean edit)
Set the Edit bit.- Parameters:
edit
- The value for Edit.
-
constructAppearances
void constructAppearances() throws java.io.IOException
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:
java.io.IOException
- if the appearance couldn't be generated
-
-