public abstract class ChoiceField extends Field
Represents base class for choice fields.
_FileSelect, _Password
_disableUpdateAppearance
Constructor and Description |
---|
ChoiceField(IDocument doc)
Creates choice field (for Generator)
|
ChoiceField(IDocument doc,
Rectangle rect)
Constructor for ChoiceField.
|
ChoiceField(Page page,
Rectangle rect)
Constructor for ChoiceField.
|
Modifier and Type | Method and Description |
---|---|
void |
addOption(String optionName)
Adds new option with specified name.
|
void |
addOption(String export,
String name)
Adds new option with specified export value and name.
|
void |
deleteOption(String optionName)
Deletes option by its name.
|
boolean |
getCommitImmediately()
Gets commit on selection change flag.
|
boolean |
getMultiSelect()
Gets multiselection flag.
|
OptionCollection |
getOptions()
Gets collection of choice options.
|
int |
getSelected()
Gets index of selected option.
|
int[] |
getSelectedItems()
Sets array of selected items.
|
String |
getValue()
Gets value of the field.
|
void |
setCommitImmediately(boolean value)
Sets commit on selection change flag.
|
void |
setMultiSelect(boolean value)
Sets multiselection flag.
|
void |
setSelected(int value)
Sets index of selected option.
|
void |
setSelectedItems(int[] value)
Sets array of selected items.
|
void |
setValue(String value)
Sets value of the field.
|
add, clear, contains, copyTo, copyTo, flatten, get_Item, get_Item, getAlternateName, getAnnotationIndex, getMappingName, getMaxFontSize, getPageIndex, getPartialName, getRect, getSyncRoot, getTabOrder, isFitIntoRectangle, isGroup, isReadOnly, isSharedField, isSynchronized, iterator, recalculate, remove, setAlternateName, setAnnotationIndex, setFitIntoRectangle, setMappingName, setMaxFontSize, setPartialName, setPosition, setRect, setSharedField, setTabOrder, size, updateAppearances
accept, getAnnotationActions, getAnnotationType, getDefaultAppearance, getExportable, getHighlighting, getOnActivated, getParent, getReadOnly, getRequired, setDefaultAppearance, setExportable, setHighlighting, setOnActivated, setReadOnly, setRequired
createAnnotation, getActiveState, getAlignment, getAppearance, getBorder, getCharacteristics, getColor, getContents, getEngineDict, getEngineObj, getFlags, getFullName, getHeight, getHorizontalAlignment_Annotation_New, getModified, getModifiedInternal, getName, getNormalAppearance, getPage, getPageIndex, getPdfActions, getRectangle, getStates, getTextHorizontalAlignment, getWidth, initialize, isUpdateAppearanceOnConvert, isUseFontSubset, setActiveState, setAlignment, setBorder, setColor, setContents, setFlags, setHeight, setHorizontalAlignment_Annotation_New, setModified, setModifiedInternal, setName, setStructParent, setTextHorizontalAlignment, setUpdateAppearanceOnConvert, setUseFontSubset, setWidth
deepClone, getHorizontalAlignment, getHyperlink, getMargin, getVerticalAlignment, getZIndex, isFirstParagraphInColumn, isInLineParagraph, isInNewPage, isKeptWithNext, setFirstParagraphInColumn, setHorizontalAlignment, setHyperlink, setInLineParagraph, setInNewPage, setKeptWithNext, setMargin, setVerticalAlignment, setZIndex
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public ChoiceField(Page page, Rectangle rect)
Constructor for ChoiceField.
page
- Page where field is situated.rect
- Rectangle of the field.public ChoiceField(IDocument doc)
Creates choice field (for Generator)
doc
- Document where choice field will be created.public boolean getCommitImmediately()
Gets commit on selection change flag.
public void setCommitImmediately(boolean value)
Sets commit on selection change flag.
value
- boolean valuepublic boolean getMultiSelect()
Gets multiselection flag.
public void setMultiSelect(boolean value)
Sets multiselection flag.
value
- boolean valuepublic int getSelected()
Gets index of selected option. This property allows to change selection.
public void setSelected(int value)
Sets index of selected option. This property allows to change selection.
value
- int valuepublic int[] getSelectedItems()
Sets array of selected items. For multiselect list array contains more then one item. For single selection list it contains single item.
public void setSelectedItems(int[] value)
Sets array of selected items. For multiselect list array contains more then one item. For single selection list it contains single item.
value
- array of int valuespublic OptionCollection getOptions()
Gets collection of choice options.
public void addOption(String optionName)
Adds new option with specified name.
optionName
- Name of the new option.public void addOption(String export, String name)
Adds new option with specified export value and name.
export
- Export value.name
- Name of the new option.public void deleteOption(String optionName)
Deletes option by its name.
optionName
- Name of the option which must be deleted.public String getValue()
Gets value of the field.