public interface ChoiceField extends FormField
ChoiceField
is the abstract class to hold a choice field. A choice field contains
several text items.
ComboField
and ListField
extend this class.Modifier and Type | Field and Description |
---|---|
static int |
FF_COMBO
The field flag indicating the field is a combo box.
|
static int |
FF_COMMITONSELECTION
The field flag indicating the field's value is committed when a selection is made.
|
static int |
FF_DONOTSPELLCHECK
The field flag indicating the field is not spell checked.
|
static int |
FF_EDIT
The field flag indicating the field is editable if it is also a combo box.
|
static int |
FF_MULTISELECT
The field flag indicating the field may have multiple options selected.
|
static int |
FF_SORT
The field flag indicating the field's options are sorted alphabetically.
|
FF_NOEXPORT, FF_READONLY, FF_REQUIRED, TYPE_BUTTON, TYPE_CHECKBOX, TYPE_COMBOBOX, TYPE_LISTBOX, TYPE_RADIOBUTTON, TYPE_SIGNATURE, TYPE_TEXT
Modifier and Type | Method and Description |
---|---|
String |
getDefaultValue()
Returns the default value for this field.
|
Vector<String> |
getDisplayOptions()
Returns the list of display options (or items) for this field.
|
String |
getDisplayValue(String exportValue)
Returns the display value (or item) corresponding to a given export value.
|
Vector<String> |
getExportOptions()
Returns the list of export options for this field.
|
String |
getExportValue(String displayValue)
Returns the export value corresponding to a given display value (or item).
|
String |
getValue()
Returns the current selected value.
|
Vector<String> |
getValues()
Returns the current list of selected export values.
|
boolean |
isCombo()
Returns true if the choice field is a combo box field, false if it's a list field.
|
boolean |
isEditable()
Returns true if user is allowed to enter custom text, false if not.
|
boolean |
isMultiSelect()
Returns true if selection of multiple items is allowed, false if not.
|
boolean |
isSpellCheck()
Returns true if spelling should be checked on the custom values entered by user (@see isEditable()), false if not.
|
void |
setDefaultValue(String defaultValue)
Sets the default selected export value for this choice field.
|
void |
setOptions(Vector<String> exportOptions,
Vector<String> displayOptions)
Set the list of options for this choice field.
|
void |
setValue(String value)
Sets the selected export value for this choice field.
|
void |
setValues(Vector<String> values)
Sets the list of currently selected values for this choice field.
|
addFieldListener, addKeyListener, addMouseListener, flattenField, getAltFieldName, getFieldFlags, getFieldName, getFieldTypeDesc, getFullFieldName, getKids, getMapFieldName, getTriggerActions, getUserName, getWidgets, isEmpty, isNoExport, isReadOnly, isRequired, removeFieldListener, reset, setAltFieldName, setComponentVisible, setFieldFlags, setFieldName, setHidden, setMapFieldName, setNoExport, setPrintable, setReadOnly, setRequired, setTriggerActions, setUserName
static final int FF_COMBO
static final int FF_EDIT
static final int FF_SORT
static final int FF_MULTISELECT
static final int FF_DONOTSPELLCHECK
static final int FF_COMMITONSELECTION
String getDefaultValue()
Vector<String> getDisplayOptions()
String getDisplayValue(String exportValue)
Vector<String> getExportOptions()
String getExportValue(String displayValue)
Vector<String> getValues()
String getValue()
boolean isCombo()
boolean isEditable()
boolean isMultiSelect()
boolean isSpellCheck()
void setDefaultValue(String defaultValue)
defaultValue
- void setOptions(Vector<String> exportOptions, Vector<String> displayOptions)
exportOptions
- the list of export optionsdisplayOptions
- the list of items or display options.void setValue(String value) throws PDFException
value
- PDFException
void setValues(Vector<String> values) throws PDFException
values
- List of selected export values as a vectorPDFException