Package com.pdftools.toolbox.pdf.forms
Class ChoiceField
- java.lang.Object
-
- com.pdftools.toolbox.internal.NativeBase
-
- com.pdftools.toolbox.internal.NativeObject
-
- com.pdftools.toolbox.pdf.forms.FieldNode
-
- com.pdftools.toolbox.pdf.forms.Field
-
- com.pdftools.toolbox.pdf.forms.ChoiceField
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChoiceItem
addNewItem(java.lang.String displayName)
Creates a new choice item.ChoiceItemList
getItems()
The list of choice items (Getter)-
Methods inherited from class com.pdftools.toolbox.pdf.forms.Field
addNewWidget, getDoNotExport, getReadOnly, getRequired, getWidgets, setDoNotExport, setReadOnly, setRequired
-
Methods inherited from class com.pdftools.toolbox.pdf.forms.FieldNode
copy, getDisplayName, getExportName, setDisplayName, setExportName
-
Methods inherited from class com.pdftools.toolbox.internal.NativeObject
equals, hashCode
-
-
-
-
Method Detail
-
addNewItem
public ChoiceItem addNewItem(java.lang.String displayName)
Creates a new choice item. The item is automatically added to the choice field'sgetItems()
.- Parameters:
displayName
- this item's display name- Returns:
- the newly created choice item
- Throws:
java.lang.IllegalStateException
- if the object has already been closedjava.lang.IllegalStateException
- if the form field has widgetsjava.lang.UnsupportedOperationException
- the document is read-only
-
getItems
public ChoiceItemList getItems()
The list of choice items (Getter)
Adding or removing items or clearing the list is not supported.- Throws:
java.lang.IllegalStateException
- if the object has already been closed
-
-