Class CPDFRadiobuttonWidget


public class CPDFRadiobuttonWidget extends CPDFWidget
RadioButton widgets in forms, click event trigger to switch selected state of RadioButton.

Multiple RadioButton controls can be a list, when clicking a RadioButton, it is set as selected, others in the list set as unselected.

Method to set multiple RadioButton in the same list: Set the fieldName of multiple RadioButton to the same value, such as:

 radiobutton1.setFieldName("xxx");
 radiobutton2.setFieldName("xxx");
 radiobutton3.setFieldName("xxx");
 

Refer to :CPDFWidget.setFieldName(String)

See Also:
  • Method Details

    • isChecked

      public boolean isChecked()
      Whether Radiobutton is selected, true means selected, false otherwise.
      Returns:
      Returns whether Radiobutton is selected, true means selected, false otherwise.
    • setChecked

      public boolean setChecked(boolean isChecked)
      Sets whether Radiobutton is selected, true means selected, false otherwise.
      Parameters:
      isChecked - Whether it is selected.
      Returns:
      Returns whether Radiobutton is selected.
    • setColor

      public boolean setColor(int color)
      Sets check color of Radiobutton.
      Parameters:
      color - check color value of Radiobutton.
      Returns:
      Returns whether to successfully set fill color of Radiobutton.
    • getColor

      public int getColor()
      Gets check color of Radiobutton.
      Returns:
      Returns check color of Radiobutton.
    • resetForm

      public boolean resetForm()
      Resets Radiobutton.
      Overrides:
      resetForm in class CPDFWidget
      Returns:
      Returns whether to successfully reset Radiobutton.
    • updateAp

      public boolean updateAp()
      Updates annotation appearance. Call this function to update annotation appearance after modifying annotation attribute.
      Overrides:
      updateAp in class CPDFWidget
      Returns:
      Returns whether to successfully update annotation appearance.