java.lang.Object
org.sejda.sambox.pdmodel.common.PDDictionaryWrapper
org.sejda.sambox.pdmodel.interactive.form.PDField
org.sejda.sambox.pdmodel.interactive.form.PDTerminalField
org.sejda.sambox.pdmodel.interactive.form.PDButton
org.sejda.sambox.pdmodel.interactive.form.PDCheckBox
- All Implemented Interfaces:
COSObjectable
A check box toggles between two states, on and off.
- Author:
- Ben Litchfield, sug
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.sejda.sambox.pdmodel.interactive.form.PDButton
getDefaultValue, getExportValues, getNormalAppearanceValues, getOnValueForWidget, getOnValues, getValue, getValueAsString, isIgnoreExportOptions, isPushButton, isRadioButton, setDefaultValue, setExportValues, setIgnoreExportOptions, setPushButton, setRadioButton, setValue, setValueMethods inherited from class org.sejda.sambox.pdmodel.interactive.form.PDTerminalField
addWidgetIfMissing, applyChange, getFieldFlags, getFieldType, getWidgets, isTerminal, removeWidget, setActions, setWidgetsMethods inherited from class org.sejda.sambox.pdmodel.interactive.form.PDField
getAcroForm, getActions, getAlternateFieldName, getFullyQualifiedName, getInheritableAttribute, getMappingName, getParent, getPartialName, isNoExport, isReadonly, isRequired, setAlternateFieldName, setFieldFlags, setMappingName, setNoExport, setPartialName, setReadonly, setRequired, toStringMethods inherited from class org.sejda.sambox.pdmodel.common.PDDictionaryWrapper
equals, getCOSObject, hashCode
-
Constructor Details
-
PDCheckBox
- Parameters:
acroForm- The acroform.- See Also:
-
PDField(PDAcroForm)
-
-
Method Details
-
isChecked
public boolean isChecked()This will tell if this radio button is currently checked or not. This is equivalent to callingPDButton.getValue().- Returns:
- true If this field is checked.
-
check
Checks the check box.- Throws:
IOException- if the appearance couldn't be generated.
-
unCheck
Unchecks the check box.- Throws:
IOException- if the appearance couldn't be generated.
-
getOnValue
Get the value which sets the check box to the On state.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
- Returns:
- the value setting the check box to the On state definition.
-