Class CPDFPushbuttonWidget


public class CPDFPushbuttonWidget extends CPDFWidget
A simple push button that responds immediately to user input without retaining any state.
  • Method Details

    • getButtonAction

      public CPDFAction getButtonAction()
      Gets response action of PushButtonget. There are multiple subtypes of the response action, and different response actions are determined according to CPDFAction.ActionType. The action type can be obtained throughCPDFAction.getActionType(), more: CPDFAction
      Returns:
      Returns response action of PushButton, more: CPDFAction
    • setButtonAction

      public boolean setButtonAction(CPDFAction action)
      Sets response action of PushButtonget. There are multiple subtypes of the response action, and different response actions are determined according to CPDFAction.ActionType. The action type can be obtained throughCPDFAction.getActionType(), more: CPDFAction
      Parameters:
      action - Response action of PushButton.
      Returns:
      Returns whether to successfully set response action of PushButton.
    • setButtonTitle

      public boolean setButtonTitle(String title)
      Sets PushButton label.
      Parameters:
      title - PushButton label.
      Returns:
      Returns whether to successfully set PushButton label.
    • getButtonTitle

      public String getButtonTitle()
      Gets PushButton label.
      Returns:
      Returns PushButton label.
    • setFontName

      public boolean setFontName(String fontName)
      Sets PushButton font.
      Parameters:
      fontName - Font name of PushButton.
      Returns:
      Returns whether to successfully set PushButton font.
    • getFontName

      public String getFontName()
      Gets font name of PushButton.
      Returns:
      Returns font name of PushButton.
    • setFontSize

      public boolean setFontSize(float fontsize)
      Sets font size of PushButton.
      Parameters:
      fontsize - Font size.
      Returns:
      Returns whether to successfully set font size of PushButton.
    • getFontSize

      public float getFontSize()
      Gets font size of PushButton.
      Returns:
      Returns font size of PushButton.
    • setFontColor

      public boolean setFontColor(int color)
      Sets font color of PushButton.
      Parameters:
      color - Font color.
      Returns:
      Returns whether to successfully set font color of PushButton.
    • getFontColor

      public int getFontColor()
      Gets font color of PushButton.
      Returns:
      Returns font color of PushButton.
    • resetForm

      public boolean resetForm()
      Resets the state of PushButton.
      Overrides:
      resetForm in class CPDFWidget
      Returns:
      Returns whether to successfully reset the state of PushButton.
    • close

      public void close()
      When the object is no longer in use, call this method to release resources.
      Overrides:
      close in class CPDFAnnotation