Class PDChoiceField

  • All Implemented Interfaces:
    COSObjectable

    public class PDChoiceField
    extends PDVariableText
    A class for handling the PDF field as a choicefield.
    Version:
    $Revision: 1.7 $
    Author:
    sug
    • Method Detail

      • setValue

        public void setValue​(java.lang.String optionValue)
                      throws java.io.IOException
        Description copied from class: PDField
        setValue sets the fields value to a given string.
        Overrides:
        setValue in class PDVariableText
        Parameters:
        optionValue - The new value for this text field.
        Throws:
        java.io.IOException - If there is an error calculating the appearance stream or the value in not one of the existing options.
        See Also:
        PDField.setValue(java.lang.String)
      • getSelectedOptions

        public COSArray getSelectedOptions()
        This will get the indices of the selected options "I".
        Returns:
        COSArray containing the indices of all selected options.
      • getTopIndex

        public int getTopIndex()
        This will get the top index "TI" value. The value returned will be the first item to display in the listbox.
        Returns:
        the top index, default value 0.
      • getOptions

        public COSArray getOptions()
        This will get the option values "Opt".
        Returns:
        COSArray containing all options.