public interface OptionModel extends ComboBoxModel, Iterable<Option>
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Option value)
Test, if the model contains an option with the given value.
|
OptionModel |
getChildModel(boolean strict)
Get a child model, i.e., a reference to the option model that can store a
seperate option as selection.
|
Option |
getOption(String value)
Get the option corresponding to the given value.
|
Option |
getSelectedOption()
Get the selected option.
|
int |
indexOf(Option value)
Get the index of the option matching the given value.
|
void |
setSelectedOption(Option option)
Set the selected option.
|
getSelectedItem, setSelectedItem
addListDataListener, getElementAt, getSize, removeListDataListener
Option getOption(String value)
value
- The value to look up.boolean contains(Option value)
value
- The value to check.true
, if the model contains a matching option.int indexOf(Option value)
value
- The value to find an option for.Option getSelectedOption()
void setSelectedOption(Option option)
option
- The option to set as selected (maybe null).OptionModel getChildModel(boolean strict)
strict
- If true
, only defined options are allowed.Copyright © 2015 e-Spirit AG. All Rights Reserved. Build 5.1.408