Class CPDFPushbuttonWidget
java.lang.Object
com.compdfkit.core.annotation.CPDFAnnotation
com.compdfkit.core.annotation.form.CPDFWidget
com.compdfkit.core.annotation.form.CPDFPushbuttonWidget
A simple push button that responds immediately to user input without retaining any state.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.compdfkit.core.annotation.form.CPDFWidget
CPDFWidget.BorderStyle, CPDFWidget.CheckStyle, CPDFWidget.WidgetTypeNested classes/interfaces inherited from class com.compdfkit.core.annotation.CPDFAnnotation
CPDFAnnotation.AppearanceType, CPDFAnnotation.PSOAnnotationState, CPDFAnnotation.Type -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()When the object is no longer in use, call this method to release resources.Gets response action of PushButtonget.Gets PushButton label.intGets font color of PushButton.Gets font name of PushButton.floatGets font size of PushButton.booleanResets the state of PushButton.booleansetButtonAction(CPDFAction action) Sets response action of PushButtonget.booleansetButtonTitle(String title) Sets PushButton label.booleansetFontColor(int color) Sets font color of PushButton.booleansetFontName(String fontName) Sets PushButton font.booleansetFontSize(float fontsize) Sets font size of PushButton.Methods inherited from class com.compdfkit.core.annotation.form.CPDFWidget
clearBorderColor, clearFillColor, getBorderColor, getBorderStyles, getBorderWidth, getCheckStyle, getFieldFlag, getFieldName, getFieldType, getFillAlpha, getFillColor, getRect, getWidgetType, isReadOnly, setBorderColor, setBorderStyles, setBorderWidth, setCheckStyle, setFieldFlag, setFieldName, setFieldType, setFillAlpha, setFillColor, setReadOnly, setRect, updateAp, updateApMethods inherited from class com.compdfkit.core.annotation.CPDFAnnotation
addToPage, createReplyAnnotation, createReplyStateAnnotation, getContent, getCreationDate, getFlags, getMainAnnotNM, getName, getRecentlyModifyDate, getReplies, getState, getTitle, getType, hasAp, isAllowCorrectAnnotationAp, isExitMainAnnot, isHidden, isLocked, isMarkedStateAnnot, isReplyAnnot, isReviewStateAnnot, isValid, removeFromPage, removeFromPageIncludeReplyAnnot, setAllowCorrectAnnotationAp, setContent, setCreationDate, setFlags, setHidden, setLocked, setMarkedAnnotState, setName, setRecentlyModifyDate, setReviewAnnotState, setState, setTitle
-
Method Details
-
getButtonAction
Gets response action of PushButtonget. There are multiple subtypes of the response action, and different response actions are determined according toCPDFAction.ActionType. The action type can be obtained throughCPDFAction.getActionType(), more:CPDFAction- Returns:
- Returns response action of PushButton, more:
CPDFAction
-
setButtonAction
Sets response action of PushButtonget. There are multiple subtypes of the response action, and different response actions are determined according toCPDFAction.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
Sets PushButton label.- Parameters:
title- PushButton label.- Returns:
- Returns whether to successfully set PushButton label.
-
getButtonTitle
Gets PushButton label.- Returns:
- Returns PushButton label.
-
setFontName
Sets PushButton font.- Parameters:
fontName- Font name of PushButton.- Returns:
- Returns whether to successfully set PushButton font.
-
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:
resetFormin classCPDFWidget- 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:
closein classCPDFAnnotation
-