public class PDPushButton extends PDButton
FLAG_PUSHBUTTON, FLAG_RADIO, FLAG_RADIOS_IN_UNISON
Constructor and Description |
---|
PDPushButton(PDAcroForm acroForm) |
PDPushButton(PDAcroForm acroForm,
COSDictionary field,
PDNonTerminalField parent)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
constructAppearances()
Constructs appearance streams and appearance dictionaries for all widget annotations.
|
java.lang.String |
getDefaultValue()
Returns the default value, if any.
|
java.util.List<java.lang.String> |
getExportValues()
This will get the (optional) export values.
|
java.lang.String |
getValue()
Returns the selected value.
|
java.lang.String |
getValueAsString()
Returns a string representation of the "V" entry, or an empty string.
|
void |
setExportValues(java.util.List<java.lang.String> values)
This will set the export values.
|
checkValue, getOnValues, isPushButton, isRadioButton, setDefaultValue, 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 PDPushButton(PDAcroForm acroForm)
acroForm
- The acroform.PDField.PDField(PDAcroForm)
PDPushButton(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 java.util.List<java.lang.String> getExportValues()
PDButton
The export values are defined in the field dictionaries /Opt key.
The option values are used to define the export values for the field to
getExportValues
in class PDButton
PDButton.getOnValues()
public void setExportValues(java.util.List<java.lang.String> values)
PDButton
setExportValues
in class PDButton
values
- List containing all possible export values. Supplying null or an empty list will remove the Opt entry.PDButton.getExportValues()
public java.lang.String getValue()
PDButton
Off is the default value which will also be returned if the value hasn't been set at all.
public java.lang.String getDefaultValue()
PDButton
getDefaultValue
in class PDButton
public java.lang.String getValueAsString()
PDField
getValueAsString
in class PDButton
void constructAppearances() throws java.io.IOException
PDTerminalField
PDTerminalField.applyChange()
.constructAppearances
in class PDButton
java.io.IOException
- if the appearance couldn't be generated