public class PdfChoiceFormField extends PdfFormField
| Modifier and Type | Field and Description |
|---|---|
static int |
FF_COMBO
Choice field flags
|
static int |
FF_COMMIT_ON_SEL_CHANGE |
static int |
FF_DO_NOT_SPELL_CHECK |
static int |
FF_EDIT |
static int |
FF_MULTI_SELECT |
static int |
FF_SORT |
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 |
PdfChoiceFormField(PdfDictionary pdfObject) |
protected |
PdfChoiceFormField(PdfDocument pdfDocument) |
protected |
PdfChoiceFormField(PdfWidgetAnnotation widget, PdfDocument pdfDocument) |
| Modifier and Type | Method and Description |
|---|---|
PdfName |
getFormType()
Returns Ch, the form type for choice form fields.
|
PdfArray |
getIndices()
Gets the currently selected items in the field
|
PdfNumber |
getTopIndex()
Gets the current index of the first option in a scrollable list.
|
boolean |
isCombo()
If true, the field is a combo box; if false, the field is a list box.
|
boolean |
isCommitOnSelChange()
If true, the new value shall be committed as soon as a selection is made (commonly with the pointing device).
|
boolean |
isEdit()
If true, the combo box shall include an editable text box as well as a drop-down list; if false, it shall include only a drop-down list.
|
boolean |
isMultiSelect()
If true, more than one of the field???s option items may be selected simultaneously; if false, at most one item shall be selected.
|
boolean |
isSort()
If true, the field???s option items shall be sorted alphabetically.
|
boolean |
isSpellCheck()
If true, text entered in the field shall be spell-checked..
|
PdfChoiceFormField |
setCombo(boolean combo)
If true, the field is a combo box; if false, the field is a list box.
|
PdfChoiceFormField |
setCommitOnSelChange(boolean commitOnSelChange)
If true, the new value shall be committed as soon as a selection is made (commonly with the pointing device).
|
PdfChoiceFormField |
setEdit(boolean edit)
If true, the combo box shall include an editable text box as well as a drop-down list; if false, it shall include only a drop-down list.
|
PdfChoiceFormField |
setIndices(PdfArray indices)
Sets the selected items in the field.
|
PdfChoiceFormField |
setListSelected(int[] optionNumbers)
Highlights the options.
|
PdfChoiceFormField |
setListSelected(String[] optionValues)
Highlights the options.
|
PdfChoiceFormField |
setMultiSelect(boolean multiSelect)
If true, more than one of the field???s option items may be selected simultaneously; if false, at most one item shall be selected.
|
PdfChoiceFormField |
setSort(boolean sort)
If true, the field???s option items shall be sorted alphabetically.
|
PdfChoiceFormField |
setSpellCheck(boolean spellCheck)
If true, text entered in the field shall be spell-checked..
|
PdfChoiceFormField |
setTopIndex(int index)
Sets the index of the first visible option in a scrollable list.
|
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, splitDAelementsensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, flush, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidReleasepublic static final int FF_COMBO
public static final int FF_EDIT
public static final int FF_SORT
public static final int FF_MULTI_SELECT
public static final int FF_DO_NOT_SPELL_CHECK
public static final int FF_COMMIT_ON_SEL_CHANGE
protected PdfChoiceFormField(PdfDocument pdfDocument)
protected PdfChoiceFormField(PdfWidgetAnnotation widget, PdfDocument pdfDocument)
protected PdfChoiceFormField(PdfDictionary pdfObject)
public PdfName getFormType()
Ch, the form type for choice form fields.
getFormType in class PdfFormField
PdfName
public PdfChoiceFormField setTopIndex(int index)
index - the index of the first option
PdfChoiceFormField
public PdfNumber getTopIndex()
PdfNumber
public PdfChoiceFormField setIndices(PdfArray indices)
indices - a sorted array of indices representing selected items in the field
PdfChoiceFormField
public PdfChoiceFormField setListSelected(String[] optionValues)
optionValues - Array of options to be highlighted
PdfChoiceFormField
public PdfChoiceFormField setListSelected(int[] optionNumbers)
optionNumbers -
PdfChoiceFormField
public PdfArray getIndices()
public PdfChoiceFormField setCombo(boolean combo)
combo - whether or not the field should be a combo box
PdfChoiceFormField
public boolean isCombo()
public PdfChoiceFormField setEdit(boolean edit)
edit - whether or not to add an editable text box
PdfChoiceFormField
public boolean isEdit()
public PdfChoiceFormField setSort(boolean sort)
sort - whether or not to sort the items
PdfChoiceFormField
public boolean isSort()
public PdfChoiceFormField setMultiSelect(boolean multiSelect)
multiSelect - whether or not to allow multiple selection
PdfChoiceFormField
public boolean isMultiSelect()
public PdfChoiceFormField setSpellCheck(boolean spellCheck)
spellCheck - whether or not to require the PDF viewer to perform a spell check
PdfChoiceFormField
public boolean isSpellCheck()
public PdfChoiceFormField setCommitOnSelChange(boolean commitOnSelChange)
commitOnSelChange - whether or not to save changes immediately
PdfChoiceFormField
public boolean isCommitOnSelChange()
Copyright © 1998–2017 iText Group NV. All rights reserved.