public class PdfButtonFormField extends PdfFormField
| Modifier and Type | Field and Description |
|---|---|
static int |
FF_NO_TOGGLE_TO_OFF
Button field flags
|
static int |
FF_PUSH_BUTTON |
static int |
FF_RADIO |
static int |
FF_RADIOS_IN_UNISON |
ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, backgroundColor, borderColor, borderWidth, checkType, color, DA_COLOR, DA_FONT, DA_SIZE, DEFAULT_FONT_SIZE, FF_MULTILINE, FF_NO_EXPORT, FF_PASSWORD, FF_READ_ONLY, FF_REQUIRED, font, fontSize, form, HIDDEN, HIDDEN_BUT_PRINTABLE, img, MIN_FONT_SIZE, pdfAConformanceLevel, rotation, text, TYPE_CHECK, TYPE_CIRCLE, TYPE_CROSS, TYPE_DIAMOND, TYPE_SQUARE, TYPE_STAR, typeChars, VISIBLE, VISIBLE_BUT_DOES_NOT_PRINT, X_OFFSET| Modifier | Constructor and Description |
|---|---|
protected |
PdfButtonFormField(com.itextpdf.kernel.pdf.PdfDictionary pdfObject) |
protected |
PdfButtonFormField(com.itextpdf.kernel.pdf.PdfDocument pdfDocument) |
protected |
PdfButtonFormField(com.itextpdf.kernel.pdf.annot.PdfWidgetAnnotation widget,
com.itextpdf.kernel.pdf.PdfDocument pdfDocument) |
| Modifier and Type | Method and Description |
|---|---|
com.itextpdf.kernel.pdf.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) |
PdfButtonFormField |
setImageAsForm(com.itextpdf.kernel.pdf.xobject.PdfFormXObject form) |
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, createButton, createButton, createButton, createButton, createCheckBox, createCheckBox, createCheckBox, createChoice, createChoice, createChoice, createChoice, createChoice, createChoice, createChoice, createComboBox, createComboBox, createComboBox, createComboBox, createEmptyField, createEmptyField, createList, createList, createList, createList, createMultilineText, createMultilineText, createPushButton, createPushButton, createPushButton, createRadioButton, createRadioButton, createRadioGroup, createRadioGroup, createSignature, createSignature, createSignature, createSignature, createText, createText, createText, createText, createText, createText, createText, createText, drawBorder, drawButton, drawCheckAppearance, drawCheckBox, drawMultiLineTextAppearance, drawPdfA1CheckAppearance, drawPdfA1RadioAppearance, drawPdfA2CheckAppearance, drawPdfACheckBox, drawPushButtonAppearance, drawRadioAppearance, drawRadioBorder, drawRadioField, drawTextAppearance, generateDefaultAppearanceString, getAdditionalAction, getAlternativeName, getAppearanceStates, getBorderWidth, getDefaultAppearance, getDefaultStyle, getDefaultValue, getDocument, getFieldFlag, getFieldFlags, getFieldName, getFont, getFontAndSize, getJustification, getKids, getMappingName, getOptions, getParent, getRect, getRichText, getValue, getValueAsString, getWidgets, isMultiline, isNoExport, isPassword, isReadOnly, isRequired, isWrappedObjectMustBeIndirect, makeFieldFlag, makeFormField, processOptions, processOptions, put, regenerateField, release, setAction, setAdditionalAction, setAlternativeName, setAppearance, setBackgroundColor, setBorderColor, setBorderStyle, setBorderWidth, setCheckType, setColor, setDefaultAppearance, setDefaultStyle, setDefaultValue, setFieldFlag, setFieldFlag, setFieldFlags, setFieldName, setFont, setFontAndSize, setFontSize, setFontSize, setFontSizeAutoScale, setJustification, setMappingName, setNoExport, setOptions, setPage, setParent, setReadOnly, setRequired, setRichText, setRotation, setValue, setValue, setValue, setValue, setVisibility, splitDAelementspublic static final int FF_NO_TOGGLE_TO_OFF
public static final int FF_RADIO
public static final int FF_PUSH_BUTTON
public static final int FF_RADIOS_IN_UNISON
protected PdfButtonFormField(com.itextpdf.kernel.pdf.PdfDocument pdfDocument)
protected PdfButtonFormField(com.itextpdf.kernel.pdf.annot.PdfWidgetAnnotation widget,
com.itextpdf.kernel.pdf.PdfDocument pdfDocument)
protected PdfButtonFormField(com.itextpdf.kernel.pdf.PdfDictionary pdfObject)
public com.itextpdf.kernel.pdf.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
IOExceptionpublic PdfButtonFormField setImageAsForm(com.itextpdf.kernel.pdf.xobject.PdfFormXObject form)
Copyright © 1998–2018 iText Group NV. All rights reserved.