com.qoppa.pdf.form
Interface ChoiceField

All Superinterfaces:
FormField
All Known Subinterfaces:
ComboField, ListField

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.

Author:
Qoppa Software

Field Summary
 
Fields inherited from interface com.qoppa.pdf.form.FormField
TYPE_BUTTON, TYPE_CHECKBOX, TYPE_COMBOBOX, TYPE_LISTBOX, TYPE_RADIOBUTTON, TYPE_SIGNATURE, TYPE_TEXT
 
Method Summary
 String getDefaultValue()
          Returns the default value for this field.
 Vector 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 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 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 exportOptions, Vector 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 values)
          Sets the list of currently selected values for this choice field.
 
Methods inherited from interface com.qoppa.pdf.form.FormField
addFieldListener, addKeyListener, addMouseListener, flattenField, getAltFieldName, 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
 

Method Detail

getDefaultValue

String getDefaultValue()
Returns the default value for this field.

Returns:
The default value

getDisplayOptions

Vector getDisplayOptions()
Returns the list of display options (or items) for this field.

Returns:
The list of display options as a vector

getDisplayValue

String getDisplayValue(String exportValue)
Returns the display value (or item) corresponding to a given export value.

Returns:
The display value

getExportOptions

Vector getExportOptions()
Returns the list of export options for this field.

Returns:
The list of export options as a vector

getExportValue

String getExportValue(String displayValue)
Returns the export value corresponding to a given display value (or item).

Returns:
The export value

getValues

Vector getValues()
Returns the current list of selected export values.

Returns:
The list of selected export values as a vector

getValue

String getValue()
Returns the current selected value. If this field allows multiple selection and there are more than one value selected, this method will return the first value selected.

Returns:
The selected export value

isCombo

boolean isCombo()
Returns true if the choice field is a combo box field, false if it's a list field.

Returns:
true or false

isEditable

boolean isEditable()
Returns true if user is allowed to enter custom text, false if not. This flag only applies to combo box fields, it doesn't apply to list fields.

Returns:
true or false

isMultiSelect

boolean isMultiSelect()
Returns true if selection of multiple items is allowed, false if not.

Returns:
true or false

isSpellCheck

boolean isSpellCheck()
Returns true if spelling should be checked on the custom values entered by user (@see isEditable()), false if not.

Returns:
true or false

setDefaultValue

void setDefaultValue(String defaultValue)
Sets the default selected export value for this choice field.

Parameters:
defaultValue -

setOptions

void setOptions(Vector exportOptions,
                Vector displayOptions)
Set the list of options for this choice field. If the list of export optionsis left null, it will be defaulted to the list of display options. Similarly, if the list of display options if left null, it will be defaulted to the list of export options.

Parameters:
exportOptions - the list of export options
displayOptions - the list of items or display options.

setValue

void setValue(String value)
              throws PDFException
Sets the selected export value for this choice field.

Parameters:
value -
Throws:
PDFException

setValues

void setValues(Vector values)
               throws PDFException
Sets the list of currently selected values for this choice field.

Parameters:
values - List of selected export values as a vector
Throws:
PDFException