public class ChoiceFieldDictionary extends VariableTextFieldDictionary
| Modifier and Type | Class and Description |
|---|---|
static class |
ChoiceFieldDictionary.ChoiceFieldType |
class |
ChoiceFieldDictionary.ChoiceOption |
VariableTextFieldDictionary.Quadding| Modifier and Type | Field and Description |
|---|---|
static int |
CHOICE_DO_NOT_SPELL_CHECK_BIT_FLAG
(PDF 1.4) If set, text entered in the field shall not be spell-checked.
|
protected ChoiceFieldDictionary.ChoiceFieldType |
choiceFieldType |
static int |
COMBO_BIT_FLAG
If set, the field is a combo box; if clear, the field is a list box.
|
static int |
COMMIT_ON_SEL_CHANGE_BIT_FLAG
(PDF 1.5) If set, the new value shall be committed as soon as a selection
is made (commonly with the pointing device).
|
static int |
EDIT_BIT_FLAG
If set, the combo box shall include an editable text box as well as a
drop-down list; if clear, it shall include only a drop-down list.
|
static Name |
I_KEY
(Sometimes required, otherwise optional; PDF 1.4) For choice fields that
allow multiple selection (MultiSelect flag set), an array of integers,
sorted in ascending order, representing the zero-based indices in the Opt
array of the currently selected option items.
|
protected java.util.ArrayList<java.lang.Integer> |
indexes |
static int |
MULTI_SELECT_BIT_FLAG
(PDF 1.4) If set, more than one of the field’s option items may be selected
simultaneously; if clear, at most one item shall be selected.
|
static Name |
OPT_KEY
(Optional) An array of options that shall be presented to the user.
|
protected java.util.ArrayList<ChoiceFieldDictionary.ChoiceOption> |
options |
static int |
SORT_BIT_FLAG
If set, the field’s option items shall be sorted alphabetically.
|
static Name |
TI_KEY
(Optional) For scrollable list boxes, the top index (the index in the Opt
array of the first option visible in the list).
|
protected int |
topIndex |
color, DA_KEY, DS_KEY, fontName, Q_KEY, quadding, RV_KEY, sizeAA_KEY, additionalActionsDictionary, alternativeFieldName, defaultFieldValue, DV_KEY, exportMappingName, Ff_KEY, fieldType, fieldValue, FT_KEY, kids, KIDS_KEY, NO_EXPORT_BIT_FLAG, PARENT_KEY, parentField, partialFieldName, READ_ONLY_BIT_FLAG, REQUIRED_BIT_FLAG, T_KEY, TM_KEY, TU_KEY, V_KEYentries, FORM_TYPE_KEY, inited, isDeleted, isNew, LENGTH_KEY, library, SUBTYPE_KEY, TYPE_KEY| Constructor and Description |
|---|
ChoiceFieldDictionary(Library library,
java.util.HashMap entries) |
| Modifier and Type | Method and Description |
|---|---|
ChoiceFieldDictionary.ChoiceOption |
buildChoiceOption(java.lang.String label,
java.lang.String value) |
ChoiceFieldDictionary.ChoiceFieldType |
getChoiceFieldType() |
java.util.ArrayList<java.lang.Integer> |
getIndexes() |
java.util.ArrayList<ChoiceFieldDictionary.ChoiceOption> |
getOptions()
An array of options that shall be presented to the user.
|
int |
getTopIndex()
For scrollable list boxes, the top index (the index in the Opt array of the first option visible in the list).
|
boolean |
isCommitOnSetChange()
If set, the new value shall be committed as soon as a selection is made (commonly with the pointing device).
|
boolean |
isMultiSelect()
If set, more than one of the field’s option items may be selected simultaneously; if clear, at most
one item shall be selected.
|
boolean |
isSortFields()
If set, the field’s option items shall be sorted alphabetically.
|
void |
setFieldValue(java.lang.Object fieldValue,
Reference parentReference)
Regular field value writing takes place as well as the update of the I (indexes) entry in the dictionary.
|
void |
setIndexes(java.util.ArrayList<java.lang.Integer> indexes)
For choice fields that allow multiple selection (MultiSelect flag set), an array of integers, sorted in
ascending order, representing the zero-based indices in the Opt array of the currently selected option items.
|
void |
setOptions(java.util.ArrayList<ChoiceFieldDictionary.ChoiceOption> options) |
void |
setTopIndex(int topIndex) |
getColor, getDefaultAppearance, getDefaultRichText, getDefaultStyle, getFontName, getQuadding, getSize, setFontName, setSizegetAdditionalActionsDictionary, getAlternativeFieldName, getDefaultFieldValue, getExportMappingName, getFieldType, getFieldValue, getFlags, getFullyQualifiedFieldName, getKids, getParent, getPartialFieldName, hasDefaultValue, hasFieldValue, isNoExport, isReadOnly, isRequiredgetEntries, getFloat, getInt, getLibrary, getNumber, getObject, getPObjectReference, init, isDeleted, isNew, setDeleted, setNew, setPObjectReference, toStringpublic static final Name OPT_KEY
public static final Name TI_KEY
public static final Name I_KEY
public static final int COMBO_BIT_FLAG
public static final int EDIT_BIT_FLAG
public static final int SORT_BIT_FLAG
public static final int MULTI_SELECT_BIT_FLAG
public static final int CHOICE_DO_NOT_SPELL_CHECK_BIT_FLAG
public static final int COMMIT_ON_SEL_CHANGE_BIT_FLAG
protected ChoiceFieldDictionary.ChoiceFieldType choiceFieldType
protected java.util.ArrayList<ChoiceFieldDictionary.ChoiceOption> options
protected int topIndex
protected java.util.ArrayList<java.lang.Integer> indexes
public ChoiceFieldDictionary(Library library, java.util.HashMap entries)
public void setFieldValue(java.lang.Object fieldValue,
Reference parentReference)
setFieldValue in class FieldDictionaryfieldValue - value to write.parentReference - parent reference.public ChoiceFieldDictionary.ChoiceOption buildChoiceOption(java.lang.String label, java.lang.String value)
public ChoiceFieldDictionary.ChoiceFieldType getChoiceFieldType()
public int getTopIndex()
public void setTopIndex(int topIndex)
public java.util.ArrayList<java.lang.Integer> getIndexes()
public void setIndexes(java.util.ArrayList<java.lang.Integer> indexes)
indexes - list of selected indexes for multiple selection.public java.util.ArrayList<ChoiceFieldDictionary.ChoiceOption> getOptions()
public void setOptions(java.util.ArrayList<ChoiceFieldDictionary.ChoiceOption> options)
public boolean isSortFields()
public boolean isMultiSelect()
public boolean isCommitOnSetChange()