public final class PDRadioButton extends PDButton
acroForm, dictionary, parent| Constructor and Description |
|---|
PDRadioButton(PDAcroForm acroForm) |
| Modifier and Type | Method and Description |
|---|---|
String |
getDefaultValue()
Returns the default value, if any.
|
String |
getExportValue()
This will get the export value.
|
String |
getValue()
Returns the selected value.
|
String |
getValueAsString()
Returns a string representation of the "V" entry, or an empty string.
|
boolean |
isRadiosInUnison() |
void |
setDefaultValue(String value)
Sets the default value.
|
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. |
void |
setValue(String value)
Sets the selected radio button, given its name.
|
getExportValues, getOptions, isPushButton, isRadioButton, setExportValues, setOptions, setPushButton, setRadioButtonapplyChange, getFieldFlags, getFieldType, getWidget, getWidgets, importFDF, setActions, setWidgetsgetAcroForm, getActions, getAlternateFieldName, getCOSObject, getFullyQualifiedName, getInheritableAttribute, getMappingName, getParent, getPartialName, getV, isNoExport, isReadonly, isRequired, setAlternateFieldName, setFieldFlags, setMappingName, setNoExport, setPartialName, setReadonly, setRequired, toStringpublic PDRadioButton(PDAcroForm acroForm)
acroForm - The acroform.PDField.PDField(PDAcroForm)public void setRadiosInUnison(boolean radiosInUnison)
radiosInUnison - The new flag for radiosInUnison.public boolean isRadiosInUnison()
public String getExportValue() throws 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.setOptions(List)
which correspond to the individual items within the RadioButton.
The method will either return the value from the options entry or in case there is no such entry the fields value
IOException - in case the fields value can not be retrievedpublic String getValue()
public String getDefaultValue()
public String getValueAsString()
PDFieldgetValueAsString in class PDFieldpublic void setValue(String value) throws IOException
value - Name of radio button to selectIOException - if the value could not be setpublic void setDefaultValue(String value) throws IOException
value - Name of radio button to selectIOException - if the value could not be setCopyright © 2015–2020 The veraPDF Consortium. All rights reserved.