Class PDPushButton

All Implemented Interfaces:
COSObjectable

public class PDPushButton extends PDButton
A pushbutton is a purely interactive control that responds immediately to user input without retaining a permanent value.
Author:
sug
  • Constructor Details

    • PDPushButton

      public PDPushButton(PDAcroForm acroForm)
      Parameters:
      acroForm - The acroform.
      See Also:
      • PDField(PDAcroForm)
  • Method Details

    • getExportValues

      public List<String> getExportValues()
      Description copied from class: PDButton
      This will get the (optional) export values.

      The export values are defined in the field dictionaries /Opt key.

      The option values are used to define the export values for the field to

      • hold values in non-Latin writing systems as name objects, which represent the field value, are limited to PDFDocEncoding
      • allow radio buttons having the same export value to be handled independently
      Overrides:
      getExportValues in class PDButton
      Returns:
      List containing all possible export values. If there is no /Opt entry an empty list will be returned.
      See Also:
    • setExportValues

      public void setExportValues(List<String> values)
      Description copied from class: PDButton
      This will set the export values.
      Overrides:
      setExportValues in class PDButton
      Parameters:
      values - List containing all possible export values. Supplying null or an empty list will remove the Opt entry.
      See Also:
    • getValue

      public String getValue()
      Description copied from class: PDButton
      Returns the selected value.

      Off is the default value which will also be returned if the value hasn't been set at all.

      Overrides:
      getValue in class PDButton
      Returns:
      A non-null string.
    • getDefaultValue

      public String getDefaultValue()
      Description copied from class: PDButton
      Returns the default value, if any.
      Overrides:
      getDefaultValue in class PDButton
      Returns:
      A non-null string.
    • getValueAsString

      public String getValueAsString()
      Description copied from class: PDField
      Returns a string representation of the "V" entry, or an empty string.
      Overrides:
      getValueAsString in class PDButton
      Returns:
      The list of widget annotations.
    • getOnValues

      public Set<String> getOnValues()
      Description copied from class: PDButton
      Get the values to set individual buttons within a group to the on state.

      The On value could be an arbitrary string as long as it is within the limitations of a PDF name object. The Off value shall always be 'Off'. If not set or not part of the normal appearance keys 'Off' is the default

      Overrides:
      getOnValues in class PDButton
      Returns:
      the potential values setting the check box to the On state. If an empty Set is returned there is no appearance definition.