public class PdfButtonFormField extends PdfFormField
| Modifier and Type | Field and Description |
|---|---|
static int |
FF_NO_TOGGLE_TO_OFF
If true, clicking the selected button deselects it, leaving no button selected.
|
static int |
FF_PUSH_BUTTON
If true, the field is a push button that does not retain a permanent value.
|
static int |
FF_RADIO
If true, the field is a set of radio buttons.
|
static int |
FF_RADIOS_IN_UNISON
If true, 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.
|
checkType, FF_MULTILINE, FF_NO_EXPORT, FF_PASSWORD, FF_READ_ONLY, FF_REQUIRED, form, img, textcolor, DEFAULT_FONT_SIZE, font, fontSize, MIN_FONT_SIZE, parent, pdfConformance| Modifier | Constructor and Description |
|---|---|
protected |
PdfButtonFormField(PdfDictionary pdfObject)
Creates a button form field as a wrapper object around a
PdfDictionary. |
protected |
PdfButtonFormField(PdfDocument pdfDocument)
Creates a minimal
PdfButtonFormField. |
protected |
PdfButtonFormField(PdfWidgetAnnotation widget,
PdfDocument pdfDocument)
Creates a button form field as a parent of a
PdfWidgetAnnotation. |
| Modifier and Type | Method and Description |
|---|---|
PdfFormField |
addKid(AbstractPdfFormField kid)
Adds a new kid to the
Kids array property from a
AbstractPdfFormField. |
PdfName |
getFormType()
Returns
Btn, the form type for choice form fields. |
boolean |
isPushButton()
If true, the field is a pushbutton that does not retain a permanent value.
|
boolean |
isRadio()
If true, the field is a set of radio buttons; if false, the field is a
check box.
|
boolean |
isRadiosInUnison()
If true, 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.
|
boolean |
isToggleOff()
If true, clicking the selected button deselects it, leaving no button
selected.
|
PdfButtonFormField |
setImage(String image)
Set image to be used as a background content in a push button.
|
PdfButtonFormField |
setImageAsForm(PdfFormXObject form)
Set image to be used as a background content in a push button as
PdfFormXObject. |
PdfButtonFormField |
setPushButton(boolean pushButton)
If true, the field is a pushbutton that does not retain a permanent value.
|
PdfButtonFormField |
setRadio(boolean radio)
If true, the field is a set of radio buttons; if false, the field is a
check box.
|
PdfButtonFormField |
setRadiosInUnison(boolean radiosInUnison)
If true, 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.
|
PdfButtonFormField |
setToggleOff(boolean toggleOff)
If true, clicking the selected button deselects it, leaving no button selected.
|
addKid, addKid, getAdditionalAction, getAllChildFields, getAllChildFormFields, getAlternativeName, getAppearanceStates, getChildField, getChildFields, getChildFormAnnotations, getChildFormFields, getDefaultAppearance, getDefaultStyle, getDefaultValue, getDisplayValue, getFieldFlag, getFieldFlags, getFirstFormAnnotation, getFormFieldKeys, getFormType, getJustification, getKids, getMappingName, getOptions, getPartialFieldName, getRichText, getValue, getValueAsString, getWidgets, isFormField, isInReadingMode, isMultiline, isNoExport, isPassword, isReadOnly, isRequired, makeFieldFlag, makeFormField, makeFormFieldOrAnnotation, regenerateField, release, removeChild, removeChildren, setAdditionalAction, setAlternativeName, setCheckType, setColor, setDefaultStyle, setDefaultValue, setFieldFlag, setFieldFlag, setFieldFlags, setFieldName, setJustification, setMappingName, setNoExport, setOptions, setReadOnly, setRequired, setRichText, setValue, setValue, setValue, setValue, updateDefaultAppearancedisableCurrentFieldRegeneration, disableFieldRegeneration, enableCurrentFieldRegeneration, enableFieldRegeneration, equals, getColor, getDocument, getFieldName, getFont, getFontSize, getParent, getParentField, getPdfConformance, getPdfObject, hashCode, isFieldRegenerationEnabled, isTerminalFormField, isWrappedObjectMustBeIndirect, put, remove, setFont, setFontAndSize, setFontSize, setFontSize, setFontSizeAutoScale, setParentensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, flush, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidReleasepublic static final int FF_NO_TOGGLE_TO_OFF
public static final int FF_RADIO
FF_PUSH_BUTTON flag is set to false.public static final int FF_PUSH_BUTTON
public static final int FF_RADIOS_IN_UNISON
protected PdfButtonFormField(PdfDocument pdfDocument)
PdfButtonFormField.pdfDocument - The PdfDocument instance.protected PdfButtonFormField(PdfWidgetAnnotation widget, PdfDocument pdfDocument)
PdfWidgetAnnotation.widget - The widget which will be a kid of the PdfButtonFormField.pdfDocument - The PdfDocument instance.protected PdfButtonFormField(PdfDictionary pdfObject)
PdfDictionary.
This PdfDictionary must be an indirect object.pdfObject - the dictionary to be wrapped, must have an indirect reference.public PdfName getFormType()
Btn, the form type for choice form fields.getFormType in class PdfFormFieldPdfNamepublic boolean isRadio()
public PdfButtonFormField setRadio(boolean radio)
radio - whether the field should be radio buttons or a checkboxPdfButtonFormFieldpublic boolean isToggleOff()
public PdfButtonFormField setToggleOff(boolean toggleOff)
toggleOff - whether a radio button may allow to choose no optionsPdfButtonFormFieldpublic boolean isPushButton()
public PdfButtonFormField setPushButton(boolean pushButton)
pushButton - whether or not to set the field to a pushbuttonPdfButtonFormFieldpublic boolean isRadiosInUnison()
public PdfButtonFormField setRadiosInUnison(boolean radiosInUnison)
radiosInUnison - whether or not buttons should turn off in unisonPdfButtonFormFieldpublic PdfButtonFormField setImage(String image) throws IOException
image - path to the image to be used.PdfButtonFormFieldIOException - if provided path to the image is not correctpublic PdfButtonFormField setImageAsForm(PdfFormXObject form)
PdfFormXObject.form - PdfFormXObject to be used as an imagePdfButtonFormFieldpublic PdfFormField addKid(AbstractPdfFormField kid)
Kids array property from a
AbstractPdfFormField. Also sets the kid's Parent property to this object.addKid in class PdfFormFieldkid - a new AbstractPdfFormField entry for the field's Kids array property.PdfFormField.Copyright © 1998–2024 Apryse Group NV. All rights reserved.