| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| public | |
| pack-priv | PDChoice(PDAcroForm
The form that this field is part of. acroForm, COSDictionary the PDF object to represent as a field. field, PDNonTerminalField the parent node of the node parent)Constructor. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv abstract void | constructAppearances()
Implements abstract org. Constructs appearance streams and appearance dictionaries for all widget annotations. |
| public List | |
| public List | |
| public List | Returns: List containing all the display values.This will get the display values from the options. |
| public List | Returns: List containing all export values.This will get the export values from the options. |
| public List | Returns: List containing the indices of all selected options.This will get the indices of the selected options - the 'I' key. |
| public List | |
| public String | getValueAsString()
Implements abstract org. Returns a string representation of the "V" entry, or an empty string. |
| private List | |
| public boolean | |
| public boolean | Returns: true if value shall be committed as soon as a selection is made.Determines if CommitOnSelChange is set. |
| public boolean | |
| public boolean | |
| public boolean | |
| public void | |
| public void | setCommitOnSelChange(boolean
The value for CommitOnSelChange. commitOnSelChange)Set the CommitOnSelChange bit. |
| public void | |
| public void | setDoNotSpellCheck(boolean
The value for DoNotSpellCheck. doNotSpellCheck)Set the DoNotSpellCheck bit. |
| public void | |
| public void | setOptions(List<String>
List containing all possible options. displayValues)This will set the display values - the 'Opt' key. |
| public void | setOptions(List<String>
List containing all possible export values. exportValues, List<String> List containing all possible display values. displayValues)This will set the display and export values - the 'Opt' key. |
| public void | setSelectedOptionsIndex(List<Integer>
List containing the indices of all selected options. values)This will set the indices of the selected options - the 'I' key. |
| public void | |
| public void | setValue(String
The name of the selected item. value)Implements abstract org. Set the selected value of this field, and try to update the visual appearance. |
| public void | |
| private void | updateSelectedOptionsIndex(List<String> values, List<String> options)
Update the 'I' key based on values set. |
| FLAG_COMBO | back to summary |
|---|---|
| pack-priv static final int FLAG_COMBO | |
| FLAG_COMMIT_ON_SEL_CHANGE | back to summary |
|---|---|
| private static final int FLAG_COMMIT_ON_SEL_CHANGE | |
| FLAG_DO_NOT_SPELL_CHECK | back to summary |
|---|---|
| private static final int FLAG_DO_NOT_SPELL_CHECK | |
| FLAG_MULTI_SELECT | back to summary |
|---|---|
| private static final int FLAG_MULTI_SELECT | |
| FLAG_SORT | back to summary |
|---|---|
| private static final int FLAG_SORT | |
| PDChoice | back to summary |
|---|---|
public PDChoice(PDAcroForm acroForm)
| |
| PDChoice | back to summary |
|---|---|
| pack-priv PDChoice(PDAcroForm acroForm, COSDictionary field, PDNonTerminalField parent) Constructor.
| |
| constructAppearances | back to summary |
|---|---|
| pack-priv abstract void constructAppearances() throws IOException Implements abstract org. Doc from org. Constructs appearance streams and appearance dictionaries for all widget annotations.
Subclasses should not call this method directly but via
| |
| getDefaultValue | back to summary |
|---|---|
| public List Returns the default values, or an empty List. This list always contains a single item
unless | |
| getOptions | back to summary |
|---|---|
| public List This will get the option values "Opt".
For a choice field the options array can either be an array
of text strings or an array of a two-element arrays.
Use | |
| getOptionsDisplayValues | back to summary |
|---|---|
| public List This will get the display values from the options.
For options with an array of text strings the display value and export value
are the same. | |
| getOptionsExportValues | back to summary |
|---|---|
| public List This will get the export values from the options.
For options with an array of text strings the display value and export value
are the same. | |
| getSelectedOptionsIndex | back to summary |
|---|---|
| public List This will get the indices of the selected options - the 'I' key. This is only needed if a choice field allows multiple selections and two different items have the same export value or more than one values is selected. The indices are zero-based | |
| getValue | back to summary |
|---|---|
| public List Returns the selected values, or an empty List. This list always contains a single item
unless | |
| getValueAsString | back to summary |
|---|---|
| public String getValueAsString() Implements abstract org. Doc from org. Returns a string representation of the "V" entry, or an empty string. | |
| getValueFor | back to summary |
|---|---|
| private List Returns the selected values, or an empty List, for the given key. | |
| isCombo | back to summary |
|---|---|
| public boolean isCombo() Determines if Combo is set.
| |
| isCommitOnSelChange | back to summary |
|---|---|
| public boolean isCommitOnSelChange() Determines if CommitOnSelChange is set.
| |
| isDoNotSpellCheck | back to summary |
|---|---|
| public boolean isDoNotSpellCheck() Determines if DoNotSpellCheck is set.
| |
| isMultiSelect | back to summary |
|---|---|
| public boolean isMultiSelect() Determines if MultiSelect is set.
| |
| isSort | back to summary |
|---|---|
| public boolean isSort() Determines if Sort is set. If set, the field’s option items shall be sorted alphabetically. The sorting has to be done when writing the PDF. PDF Readers are supposed to display the options in the order in which they occur in the Opt array.
| |
| setCombo | back to summary |
|---|---|
| public void setCombo(boolean combo) Set the Combo bit.
| |
| setCommitOnSelChange | back to summary |
|---|---|
| public void setCommitOnSelChange(boolean commitOnSelChange) Set the CommitOnSelChange bit.
| |
| setDefaultValue | back to summary |
|---|---|
| public void setDefaultValue(String value) Sets the default value of this field.
| |
| setDoNotSpellCheck | back to summary |
|---|---|
| public void setDoNotSpellCheck(boolean doNotSpellCheck) Set the DoNotSpellCheck bit.
| |
| setMultiSelect | back to summary |
|---|---|
| public void setMultiSelect(boolean multiSelect) Set the MultiSelect bit.
| |
| setOptions | back to summary |
|---|---|
| public void setOptions(List<String> displayValues) This will set the display values - the 'Opt' key. The Opt array specifies the list of options in the choice field either as an array of text strings representing the display value or as an array of a two-element array where the first element is the export value and the second the display value.
To set both the export and the display value use | |
| setOptions | back to summary |
|---|---|
| public void setOptions(List<String> exportValues, List<String> displayValues) This will set the display and export values - the 'Opt' key. This will set both, the export value and the display value of the choice field. If either one of the parameters is null or an empty list is supplied the options will be removed.
An
| |
| setSelectedOptionsIndex | back to summary |
|---|---|
| public void setSelectedOptionsIndex(List<Integer> values) This will set the indices of the selected options - the 'I' key.
This method is preferred over
Setting the index will set the value too. | |
| setSort | back to summary |
|---|---|
| public void setSort(boolean sort) Set the Sort bit.
| |
| setValue | back to summary |
|---|---|
| public void setValue(String value) throws IOException Implements abstract org. Set the selected value of this field, and try to update the visual appearance.
| |
| setValue | back to summary |
|---|---|
| public void setValue(List<String> values) throws IOException Sets the entry "V" to the given values. Requires
| |
| updateSelectedOptionsIndex | back to summary |
|---|---|
| private void updateSelectedOptionsIndex(List<String> values, List<String> options) Update the 'I' key based on values set. | |