public class ComboboxStringOption
extends java.lang.Object
This class represents String options of a combobox.
Each option is a combination of:
So far this class is used only for comboboxes containing configuration options.
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
identifier |
private java.lang.String |
text |
| Constructor and Description |
|---|
ComboboxStringOption(java.lang.String identifier,
java.lang.String text)
Creates a new combobox option.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getIdentifier()
Returns the identifier of the combobox.
|
static ComboboxStringOption |
getOptionById(java.lang.String identifier,
java.util.ArrayList<ComboboxStringOption> options)
Finds and returns the element of the given options with the given identifier.
|
void |
setText(java.lang.String text)
Sets the displayed, language-dependent text.
|
java.lang.String |
toString()
Returns the displayed text.
|
public ComboboxStringOption(java.lang.String identifier,
java.lang.String text)
Creates a new combobox option.
identifier - The value that is actually chosen by selecting this combobox option.text - The displayed language-dependent text.public java.lang.String getIdentifier()
Returns the identifier of the combobox.
public void setText(java.lang.String text)
Sets the displayed, language-dependent text.
text - Displayed text.public java.lang.String toString()
Returns the displayed text.
toString in class java.lang.Objectpublic static ComboboxStringOption getOptionById(java.lang.String identifier, java.util.ArrayList<ComboboxStringOption> options)
Finds and returns the element of the given options with the given identifier.
identifier - Combobox value.options - List of all available combobox options.