Class CPDFCheckboxWidget
java.lang.Object
com.compdfkit.core.annotation.CPDFAnnotation
com.compdfkit.core.annotation.form.CPDFWidget
com.compdfkit.core.annotation.form.CPDFCheckboxWidget
A single checkbox form control which can be toggled to on or off.
-
Nested Class Summary
Nested ClassesNested 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 TypeMethodDescriptionGets the border style of CheckBox.intgetColor()Gets check color of Checkbox.booleanGets the state of CheckBox, true means selected, false otherwise.booleanResets forms.booleansetCheckBoxStyle(CPDFCheckboxWidget.CheckboxStyle checkboxStyle) Sets the border style of CheckBox.booleansetChecked(boolean isChecked) Sets the state of CheckBox, true means selected, false otherwise.booleansetColor(int color) Sets check color of Checkbox.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, close, 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
-
setChecked
public boolean setChecked(boolean isChecked) Sets the state of CheckBox, true means selected, false otherwise.- Parameters:
isChecked- State of CheckBox.- Returns:
- Returns whether to successfully set the state of CheckBox.
-
isChecked
public boolean isChecked()Gets the state of CheckBox, true means selected, false otherwise.- Returns:
- Selected State of CheckBox.
-
setCheckBoxStyle
Sets the border style of CheckBox.- Parameters:
checkboxStyle- Border style of CheckBox.- Returns:
- Returns whether to successfully set border style of CheckBox.
-
getCheckBoxStyle
Gets the border style of CheckBox.- Returns:
- Returns the border style of CheckBox.
-
resetForm
public boolean resetForm()Resets forms.- Overrides:
resetFormin classCPDFWidget- Returns:
- Returns whether to successfully reset forms.
-
setColor
public boolean setColor(int color) Sets check color of Checkbox.- Parameters:
color- check color value of Checkbox.- Returns:
- Returns whether to successfully set check color of Checkbox.
-
getColor
public int getColor()Gets check color of Checkbox.- Returns:
- Returns check color of Checkbox.
-