Class PDButton
- java.lang.Object
-
- com.tom_roush.pdfbox.pdmodel.interactive.form.PDField
-
- com.tom_roush.pdfbox.pdmodel.interactive.form.PDTerminalField
-
- com.tom_roush.pdfbox.pdmodel.interactive.form.PDButton
-
- All Implemented Interfaces:
COSObjectable
- Direct Known Subclasses:
PDCheckbox,PDPushButton,PDRadioButton
public abstract class PDButton extends PDTerminalField
A button field represents an interactive control on the screen that the user can manipulate with the mouse.
-
-
Field Summary
-
Fields inherited from class com.tom_roush.pdfbox.pdmodel.interactive.form.PDField
acroForm, dictionary, parent
-
-
Constructor Summary
Constructors Constructor Description PDButton(PDAcroForm acroForm)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>getExportValues()This will get the export values.booleanisPushButton()Determines if push button bit is set.booleanisRadioButton()Determines if radio button bit is set.voidsetExportValues(List<String> values)This will set the export values.voidsetPushButton(boolean pushbutton)Set the push button bit.voidsetRadioButton(boolean radiobutton)Set the radio button bit.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from class com.tom_roush.pdfbox.pdmodel.interactive.form.PDField
getAcroForm, getActions, getAlternateFieldName, getCOSObject, getFullyQualifiedName, getInheritableAttribute, getMappingName, getParent, getPartialName, getValueAsString, isNoExport, isReadOnly, isRequired, setAlternateFieldName, setFieldFlags, setMappingName, setNoExport, setPartialName, setReadOnly, setRequired, toString
-
Methods inherited from class com.tom_roush.pdfbox.pdmodel.interactive.form.PDTerminalField
applyChange, getFieldFlags, getFieldType, getWidget, getWidgets, importFDF, setActions, setWidgets
-
-
-
-
Constructor Detail
-
PDButton
public PDButton(PDAcroForm acroForm)
- Parameters:
acroForm- The acroform.- See Also:
(PDAcroForm)
-
-
Method Detail
-
isPushButton
public boolean isPushButton()
Determines if push button bit is set.- Returns:
- true if type of button field is a push button.
-
setPushButton
public void setPushButton(boolean pushbutton)
Set the push button bit.- Parameters:
pushbutton- if true the button field is treated as a push button field.
-
isRadioButton
public boolean isRadioButton()
Determines if radio button bit is set.- Returns:
- true if type of button field is a push button.
-
setRadioButton
public void setRadioButton(boolean radiobutton)
Set the radio button bit.- Parameters:
radiobutton- if true the button field is treated as a radio button field.
-
getExportValues
public List<String> getExportValues()
This will get the export values.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
- hold values in non-Latin writing systems as name objects, which represent the field value, are limited to PDFDocEncoding
- allow radio buttons having the same export value to be handled independently
- Returns:
- List containing all possible export values. If there is no Opt entry an empty list will be returned.
-
setExportValues
public void setExportValues(List<String> values)
This will set the export values.- Parameters:
values- List containing all possible export values. Supplying null or an empty list will remove the Opt entry.- See Also:
getExportValues()
-
-