Package com.evopdf

Class PdfFormField

java.lang.Object
com.evopdf.PdfFormField
Direct Known Subclasses:
PdfFormButton, PdfFormCheckBox, PdfFormComboBox, PdfFormListBox, PdfFormRadioButtonsGroup, PdfFormTextBox

public class PdfFormField extends Object
This class represents a field in the PDF form of a PDF document
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the PDF form field control box in PDF page with the dimensions expressed in points
    Gets the default value of the field to which the field reverts when a reset form action is executed
    boolean
    Gets the flag indicating if the field is exported by a submit form action
    boolean
    Gets the flag indicating if the form field is flattened
    Gets the PDF form field name
    Gets the field parent form
    boolean
    Gets the flag indicating if the field is read only
    boolean
    Gets the flag indicating if the field should have a value at the time it is exported by a submit form action
    void
    Sets the action to be performed when the field is activated
    void
    Sets the PDF form field control box in PDF page with the dimensions expressed in points
    void
    setDefaultValue(Object defaultValue)
    Sets the default value of the field to which the field reverts when a reset form action is executed
    void
    setExport(boolean export)
    Sets the flag indicating if the field is exported by a submit form action
    void
    setFlatten(boolean flatten)
    Sets flag indicating if the form field is flattened.
    void
    setName(String fieldName)
    Sets the PDF form field name
    void
    setReadOnly(boolean readOnly)
    Sets flag indicating if the field is read only.
    void
    setRequired(boolean required)
    Sets flag indicating if the field should have a value at the time it is exported by a submit form action.
    void
    Sets the PDF form field style
    void
    setToolTip(String toolTip)
    Sets the PDF form field tooltip
    Gets the PDF form field style
    Gets the PDF form field tooltip

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PdfFormField

      public PdfFormField()
  • Method Details

    • parentForm

      public PdfForm parentForm()
      Gets the field parent form
      Returns:
      the field parent form
    • setAction

      public void setAction(PdfAction action) throws Exception
      Sets the action to be performed when the field is activated
      Parameters:
      action - the action to set
      Throws:
      Exception - an exception is thrown if the action cannot be set
    • name

      public String name()
      Gets the PDF form field name
      Returns:
      the PDF form field name
    • setName

      public void setName(String fieldName)
      Sets the PDF form field name
      Parameters:
      fieldName - the PDF form field name to set
    • defaultValue

      public Object defaultValue()
      Gets the default value of the field to which the field reverts when a reset form action is executed
      Returns:
      the default value of the field
    • setDefaultValue

      public void setDefaultValue(Object defaultValue)
      Sets the default value of the field to which the field reverts when a reset form action is executed
      Parameters:
      defaultValue - the default value of the field to set
    • readOnly

      public boolean readOnly()
      Gets the flag indicating if the field is read only
      Returns:
      the flag value
    • setReadOnly

      public void setReadOnly(boolean readOnly)
      Sets flag indicating if the field is read only. The default value of the property is false
      Parameters:
      readOnly - the flag value to set
    • required

      public boolean required()
      Gets the flag indicating if the field should have a value at the time it is exported by a submit form action
      Returns:
      the flag value
    • setRequired

      public void setRequired(boolean required)
      Sets flag indicating if the field should have a value at the time it is exported by a submit form action. The default value of the property is false
      Parameters:
      required - the flag value to set
    • export

      public boolean export()
      Gets the flag indicating if the field is exported by a submit form action
      Returns:
      the flag value
    • setExport

      public void setExport(boolean export)
      Sets the flag indicating if the field is exported by a submit form action
      Parameters:
      export - the flag value to set
    • toolTip

      public String toolTip()
      Gets the PDF form field tooltip
      Returns:
      the PDF form field tooltip
    • setToolTip

      public void setToolTip(String toolTip)
      Sets the PDF form field tooltip
      Parameters:
      toolTip - the PDF form field tooltip
    • style

      public PdfFormFieldStyle style()
      Gets the PDF form field style
      Returns:
      the PDF form field style
    • setStyle

      public void setStyle(PdfFormFieldStyle style)
      Sets the PDF form field style
      Parameters:
      style - the PDF form field style to set
    • boundingRectangle

      public RectangleFloat boundingRectangle()
      Gets the PDF form field control box in PDF page with the dimensions expressed in points
      Returns:
      the PDF form field control box in PDF page
    • setBoundingRectangle

      public void setBoundingRectangle(RectangleFloat bounds)
      Sets the PDF form field control box in PDF page with the dimensions expressed in points
      Parameters:
      bounds - the PDF form field control box to set in PDF page with the dimensions expressed in points
    • flatten

      public boolean flatten()
      Gets the flag indicating if the form field is flattened
      Returns:
      the flag value
    • setFlatten

      public void setFlatten(boolean flatten)
      Sets flag indicating if the form field is flattened. The default value of the property is false
      Parameters:
      flatten - the flag value to set