public final class PDCheckBox extends PDButton
FLAG_PUSHBUTTON, FLAG_RADIO, FLAG_RADIOS_IN_UNISON
Constructor and Description |
---|
PDCheckBox(PDAcroForm acroForm) |
PDCheckBox(PDAcroForm acroForm,
COSDictionary field,
PDNonTerminalField parent)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
check()
Checks the check box.
|
java.lang.String |
getOnValue()
Get the value which sets the check box to the On state.
|
boolean |
isChecked()
This will tell if this radio button is currently checked or not.
|
void |
unCheck()
Unchecks the check box.
|
checkValue, constructAppearances, getDefaultValue, getExportValues, getOnValues, getValue, getValueAsString, isPushButton, isRadioButton, setDefaultValue, setExportValues, setPushButton, setRadioButton, setValue
applyChange, exportFDF, getFieldFlags, getFieldType, getWidget, getWidgets, importFDF, setActions, setWidgets
findKid, fromDictionary, getAcroForm, getActions, getAlternateFieldName, getCOSObject, getFullyQualifiedName, getInheritableAttribute, getMappingName, getParent, getPartialName, isNoExport, isReadOnly, isRequired, setAlternateFieldName, setFieldFlags, setMappingName, setNoExport, setPartialName, setReadOnly, setRequired, toString
public PDCheckBox(PDAcroForm acroForm)
acroForm
- The acroform.PDField.PDField(PDAcroForm)
PDCheckBox(PDAcroForm acroForm, COSDictionary field, PDNonTerminalField parent)
acroForm
- The form that this field is part of.field
- the PDF object to represent as a field.parent
- the parent node of the nodepublic boolean isChecked()
PDButton.getValue()
.public void check() throws java.io.IOException
java.io.IOException
- if the appearance couldn't be generated.public void unCheck() throws java.io.IOException
java.io.IOException
- if the appearance couldn't be generated.public java.lang.String getOnValue()
The On value should be 'Yes' but other values are possible so we need to look for that. On the other hand the Off value shall always be 'Off'. If not set or not part of the normal appearance keys 'Off' is the default