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, check, checkType, circle, color, cross, DA_COLOR, DA_FONT, DA_SIZE, DEFAULT_FONT_SIZE, diamond, 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, square, star, 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(PdfDictionary pdfObject) |
protected |
PdfButtonFormField(PdfDocument pdfDocument) |
protected |
PdfButtonFormField(PdfWidgetAnnotation widget, PdfDocument pdfDocument) |
Modifier and Type | Method and Description |
---|---|
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(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, createCheckBox, createCheckBox, createCheckBox, createChoice, createChoice, createChoice, createChoice, createChoice, createComboBox, createComboBox, createEmptyField, createList, createList, createMultilineText, createMultilineText, createMultilineText, createPushButton, createPushButton, createPushButton, createRadioButton, createRadioButton, createRadioGroup, createSignature, createSignature, createText, createText, createText, createText, createText, createText, createText, createText, drawBorder, drawButton, drawButton, drawCheckAppearance, drawCheckBox, drawCheckBox, drawMultiLineTextAppearance, drawMultiLineTextAppearance, drawPdfA1CheckAppearance, drawPdfA1RadioAppearance, drawPdfA2CheckAppearance, drawPdfACheckBox, drawPushButtonAppearance, drawPushButtonAppearance, drawRadioAppearance, drawRadioBorder, drawRadioField, drawTextAppearance, drawTextAppearance, generateDefaultAppearanceString, 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, setValue, setVisibility, splitDAelements
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, flush, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
public 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(PdfDocument pdfDocument)
protected PdfButtonFormField(PdfWidgetAnnotation widget, PdfDocument pdfDocument)
protected PdfButtonFormField(PdfDictionary pdfObject)
public PdfName getFormType()
Btn
, the form type for choice form fields.
getFormType
in class PdfFormField
PdfName
public boolean isRadio()
public PdfButtonFormField setRadio(boolean radio)
radio
- whether the field should be radio buttons or a checkbox
PdfButtonFormField
public boolean isToggleOff()
public PdfButtonFormField setToggleOff(boolean toggleOff)
toggleOff
- whether a radio button may allow to choose no options
PdfButtonFormField
public boolean isPushButton()
public PdfButtonFormField setPushButton(boolean pushButton)
pushButton
- whether or not to set the field to a pushbutton
PdfButtonFormField
public boolean isRadiosInUnison()
public PdfButtonFormField setRadiosInUnison(boolean radiosInUnison)
radiosInUnison
- whether or not buttons should turn off in unison
PdfButtonFormField
public PdfButtonFormField setImage(String image) throws IOException
IOException
public PdfButtonFormField setImageAsForm(PdfFormXObject form)
Copyright © 1998–2017 iText Group NV. All rights reserved.