Class PDCheckbox
java.lang.Object
org.apache.pdfbox.pdmodel.interactive.form.PDField
org.apache.pdfbox.pdmodel.interactive.form.PDChoiceButton
org.apache.pdfbox.pdmodel.interactive.form.PDCheckbox
- All Implemented Interfaces:
COSObjectable
A class for handling the PDF field as a checkbox.
- Version:
- $Revision: 1.11 $
- Author:
- Ben Litchfield, sug
-
Field Summary
Fields inherited from class org.apache.pdfbox.pdmodel.interactive.form.PDField
FLAG_NO_EXPORT, FLAG_READ_ONLY, FLAG_REQUIRED
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
check()
Checks the radiobutton.This will get the value of the radio button.This will get the value of the radio button.getValue()
getValue gets the fields value to as a string.boolean
This will tell if this radio button is currently checked or not.void
setValue sets the fields value to a given string.void
unCheck()
Unchecks the radiobutton.Methods inherited from class org.apache.pdfbox.pdmodel.interactive.form.PDChoiceButton
getOptions, setOptions
Methods inherited from class org.apache.pdfbox.pdmodel.interactive.form.PDField
findFieldType, findKid, getAcroForm, getActions, getAlternateFieldName, getCOSObject, getDictionary, getFieldFlags, getFieldType, getFullyQualifiedName, getKids, getParent, getPartialName, getWidget, getWidgets, importFDF, isNoExport, isReadonly, isRequired, setAcroForm, setActions, setAlternateFieldName, setFieldFlags, setFieldType, setKids, setNoExport, setParent, setPartialName, setReadonly, setRequired, toString
-
Constructor Details
-
PDCheckbox
- Parameters:
theAcroForm
- The acroForm for this field.field
- The checkbox field dictionary- See Also:
-
-
Method Details
-
isChecked
public boolean isChecked()This will tell if this radio button is currently checked or not.- Returns:
- true If the radio button is checked.
-
check
public void check()Checks the radiobutton. -
unCheck
public void unCheck()Unchecks the radiobutton. -
setValue
setValue sets the fields value to a given string. -
getOffValue
This will get the value of the radio button.- Returns:
- The value of the radio button.
-
getOnValue
This will get the value of the radio button.- Returns:
- The value of the radio button.
-
getValue
getValue gets the fields value to as a string.- Specified by:
getValue
in classPDField
- Returns:
- The string value of this field.
- Throws:
IOException
- If there is an error getting the value.
-