public final class PDRadioButton extends PDButton
Modifier and Type | Field and Description |
---|---|
private static int |
FLAG_NO_TOGGLE_TO_OFF
A Ff flag.
|
FLAG_PUSHBUTTON, FLAG_RADIO, FLAG_RADIOS_IN_UNISON
Constructor and Description |
---|
PDRadioButton(PDAcroForm acroForm) |
PDRadioButton(PDAcroForm acroForm,
COSDictionary field,
PDNonTerminalField parent)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.String> |
getSelectedExportValues()
This will get the selected export values.
|
boolean |
isRadiosInUnison() |
void |
setRadiosInUnison(boolean radiosInUnison)
From the PDF Spec
If set, a group of radio buttons within a radio button field that use the same value for the on state will turn on and off in unison; that is if one is checked, they are all checked. |
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
private static final int FLAG_NO_TOGGLE_TO_OFF
public PDRadioButton(PDAcroForm acroForm)
acroForm
- The acroform.PDField.PDField(PDAcroForm)
PDRadioButton(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 void setRadiosInUnison(boolean radiosInUnison)
radiosInUnison
- The new flag for radiosInUnison.public boolean isRadiosInUnison()
public java.util.List<java.lang.String> getSelectedExportValues() throws java.io.IOException
A RadioButton might have an export value to allow field values
which can not be encoded as PDFDocEncoding or for the same export value
being assigned to multiple RadioButtons in a group.
To define an export value the RadioButton must define options PDButton.setExportValues(List)
which correspond to the individual items within the RadioButton.
The method will either return the corresponding values from the options entry or in case there is no such entry the fields value
java.io.IOException
- in case the fields value can not be retrieved