Class ListBoxField
- All Implemented Interfaces:
IFormField, IAbstractElement, IBlockElement, IElement, IPropertyContainer, IAccessibleElement
A field that represents a control for selecting one or several of the provided options.
-
Field Summary
Fields inherited from class AbstractSelectField
optionsFields inherited from class FormField
tagPropertiesFields inherited from class AbstractElement
childElements, nextRenderer, stylesFields inherited from class ElementPropertyContainer
properties -
Constructor Summary
ConstructorsConstructorDescriptionListBoxField(String id, int size, boolean allowMultipleSelection) Create a new list box field. -
Method Summary
Modifier and TypeMethodDescriptionAdd an option forListBoxField.Add an option forListBoxField.Gets theaccessibility properties.<T1> T1getDefaultProperty(int property) Gets the default property from this entity.Get a list of selected options.protected IRendererCreates a new renderer instance.setTopIndex(int topIndex) Sets the index of the first visible option in a scrollable list.Methods inherited from class AbstractSelectField
addOption, addOption, getOption, getOptions, hasExportAndDisplayValues, hasOptions, optionsCountMethods inherited from class FormField
getId, setAlternativeDescription, setHeight, setInteractive, setSize, setValue, setWidthMethods inherited from class AbstractElement
addStyle, createRendererSubTree, getChildren, getProperty, getRenderer, hasProperty, isEmpty, setAction, setNextRenderer, setPageNumberMethods inherited from class ElementPropertyContainer
deleteOwnProperty, getOwnProperty, getSplitCharacters, getStrokeColor, getStrokeWidth, getTextRenderingMode, getTransparentStrokeColor, hasOwnProperty, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundImage, setBackgroundImage, setBaseDirection, setBorder, setBorderBottom, setBorderBottomLeftRadius, setBorderBottomRightRadius, setBorderLeft, setBorderRadius, setBorderRight, setBorderTop, setBorderTopLeftRadius, setBorderTopRightRadius, setCharacterSpacing, setDashPattern, setDestination, setFixedPosition, setFixedPosition, setFixedPosition, setFixedPosition, setFont, setFontColor, setFontColor, setFontColor, setFontFamily, setFontFamily, setFontKerning, setFontScript, setFontSize, setHorizontalAlignment, setHyphenation, setLineThrough, setOpacity, setProperty, setRelativePosition, setSplitCharacters, setStrokeColor, setStrokeColor, setStrokeColor, setStrokeWidth, setTextAlignment, setTextRenderingMode, setUnderline, setUnderline, setUnderline, setUnderline, setUnderline, setWordSpacing, simulateBold, simulateItalicMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IAbstractElement
getChildrenMethods inherited from interface IElement
createRendererSubTree, getRenderer, setNextRendererMethods inherited from interface IPropertyContainer
deleteOwnProperty, getOwnProperty, getProperty, hasOwnProperty, hasProperty, setProperty
-
Constructor Details
-
ListBoxField
Create a new list box field.- Parameters:
id- the idsize- the size of the list box, which will define the height of visible properties, shall be greater than zeroallowMultipleSelection- a boolean flag that defines whether multiple options are allowed to be selected at once
-
-
Method Details
-
getDefaultProperty
public <T1> T1 getDefaultProperty(int property) Description copied from class:FormFieldGets the default property from this entity.- Specified by:
getDefaultPropertyin interfaceIPropertyContainer- Overrides:
getDefaultPropertyin classFormField<AbstractSelectField>- Type Parameters:
T1- the return type associated with the property- Parameters:
property- the property to be retrieved- Returns:
- the default property value. If the default property is not defined,
nullwill be returned
-
addOption
Add an option forListBoxField. The option is not selected.- Parameters:
option- string representation of the option.- Returns:
- this
ListBoxField.
-
addOption
Add an option forListBoxField.- Parameters:
option- string representation of the option.selected-trueis the option if selected,falseotherwise.- Returns:
- this
ListBoxField.
-
getSelectedStrings
-
setTopIndex
Sets the index of the first visible option in a scrollable list.- Parameters:
topIndex- the index of the first option- Returns:
- this
ListBoxFieldinstance
-
getAccessibilityProperties
Gets theaccessibility properties. See alsoIAccessibleElement.- Returns:
- an interface that allows to specify properties of a tagged element in Tagged PDF.
-
makeNewRenderer
Description copied from class:AbstractElementCreates a new renderer instance.- Specified by:
makeNewRendererin classAbstractElement<AbstractSelectField>- Returns:
- new
IRenderer
-