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
public class PDCheckbox extends PDChoiceButton
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 Constructor Description PDCheckbox(PDAcroForm theAcroForm, COSDictionary field)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
check()
Checks the radiobutton.java.lang.String
getOffValue()
This will get the value of the radio button.java.lang.String
getOnValue()
This will get the value of the radio button.java.lang.String
getValue()
getValue gets the fields value to as a string.boolean
isChecked()
This will tell if this radio button is currently checked or not.void
setValue(java.lang.String newValue)
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 Detail
-
PDCheckbox
public PDCheckbox(PDAcroForm theAcroForm, COSDictionary field)
- Parameters:
theAcroForm
- The acroForm for this field.field
- The checkbox field dictionary- See Also:
PDField(PDAcroForm,COSDictionary)
-
-
Method Detail
-
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
public void setValue(java.lang.String newValue)
setValue sets the fields value to a given string.
-
getOffValue
public java.lang.String getOffValue()
This will get the value of the radio button.- Returns:
- The value of the radio button.
-
getOnValue
public java.lang.String getOnValue()
This will get the value of the radio button.- Returns:
- The value of the radio button.
-
-