Interface ListBox
- All Superinterfaces:
FormField
List Box Form Field
列表框表单字段
Features | 主要功能:
- Option list access - 选项列表访问
- Single and multi-select support - 单选和多选支持
- Selected options management - 选中选项管理
Usage Examples | 使用示例:
ListBox list = (ListBox) form.getField("items");
List<String> options = list.getOptions();
list.setSelectedOptions(List.of("Option1", "Option3"));
Security | 安全性:
- Thread-safe: Depends on implementation - 线程安全: 取决于实现
- Null-safe: Depends on implementation - 空值安全: 取决于实现
- Since:
- JDK 25, opencode-base-pdf V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface FormField
FormField.FieldType -
Method Summary
Modifier and TypeMethodDescriptionGets available options 获取可用选项Gets selected options 获取选中的选项default FormField.FieldTypegetType()Gets field type 获取字段类型booleanChecks if multiple selection is allowed 检查是否允许多选voidsetSelectedOptions(List<String> options) Sets selected options 设置选中的选项Methods inherited from interface FormField
getName, getRectangle, getTooltip, getValue, isReadOnly, isRequired, setValue
-
Method Details
-
getType
Description copied from interface:FormFieldGets field type 获取字段类型 -
getOptions
-
getSelectedOptions
-
isMultiSelect
boolean isMultiSelect()Checks if multiple selection is allowed 检查是否允许多选- Returns:
- true if multi-select | 如果允许多选返回 true
-
setSelectedOptions
-