public class VariableChoice extends MustComboBox
editBeginValue, index, items, value
context, editable, enabled, lastEditability, lastVisibility, name, nonstandardPanel, nonstandardPosition, sessionData, toolTipText, visible
Constructor and Description |
---|
VariableChoice(SessionData sessionData,
KeyValuePair[] keyValuePairs)
Constructs an new variable choice with the specified content.
|
VariableChoice(SessionData sessionData,
KeyValuePair[] keyValuePairs,
boolean noChoicePossible)
Constructs an new variable choice with the specified content and offer control.
|
VariableChoice(SessionData sessionData,
KeyValuePairNum[] keyValuePairs) |
VariableChoice(SessionData sessionData,
KeyValuePairNum[] keyValuePairs,
boolean noChoicePossible) |
VariableChoice(SessionData sessionData,
java.lang.String[] content) |
VariableChoice(SessionData sessionData,
java.lang.String[][] content)
Constructs an new variable choice with the specified content.
|
VariableChoice(SessionData sessionData,
java.lang.String[][] content,
boolean noChoicePossible)
Constructs an new variable choice with the specified content and offer control.
|
VariableChoice(SessionData sessionData,
java.lang.String[][] content,
boolean noChoicePossible,
boolean suppressKey)
Constructs an new variable choice with the specified content and offer control.
|
VariableChoice(SessionData sessionData,
java.lang.String[][] content,
boolean noChoicePossible,
java.lang.String nameForNoChoice)
Constructs an new variable choice with the specified content and offer control.
|
VariableChoice(SessionData sessionData,
java.lang.String[][] content,
boolean noChoicePossible,
java.lang.String nameForNoChoice,
boolean suppressKey)
Constructs an new variable choice with the specified content and offer control.
|
VariableChoice(SessionData sessionData,
java.lang.String[] content,
boolean suppressKey) |
Modifier and Type | Method and Description |
---|---|
int |
getSelectedIndex() |
java.lang.String |
getSelectedItemKey()
Returns the key of the selected item.
|
protected java.lang.String |
getTranslation(java.lang.String resourceKey)
Returns a text in the corresponding language according to the locale
specific resource bundle of the package.
|
boolean |
isSpecialChoice()
Returns true if the selected item is not the placeholder for "none" or "any".
|
void |
setNoSpecialChoice()
Selects the item to be used to indicate "no special choice"
|
void |
setSelectedItemKey(java.lang.String key)
Selects the item by its key.
|
void |
setSelectedItemKeyAsBeginValue(java.lang.String key)
Selects an item of the combo box by identifier.
|
addItem, addItemListener, buildRemoteView, destroy, fetchValuesFromRequest, getItemAt, getItemCount, getSelectedItem, isModified, perform, removeAllItems, requestFocusInWindow, resetEditBeginValue, selectAll, setSelectedIndex, setSelectedIndexAsEditBeginValue, setSelectedItem, setValues, updateRemoteView
beginAction, endAction, free, getContext, getName, isEnabled, isVisible, register, resetLastStatus, setEditable, setEnabled, setToolTipText, setVisible
public VariableChoice(SessionData sessionData, java.lang.String[] content)
public VariableChoice(SessionData sessionData, java.lang.String[] content, boolean suppressKey)
public VariableChoice(SessionData sessionData, java.lang.String[][] content)
content
- the statically filled content, each line is a pair of key and value.public VariableChoice(SessionData sessionData, java.lang.String[][] content, boolean noChoicePossible)
content
- the statically filled content, each line is a pair of key and valuenoChoicePossible
- if true, an item is offered which represents the "no choice"public VariableChoice(SessionData sessionData, java.lang.String[][] content, boolean noChoicePossible, boolean suppressKey)
content
- the statically filled content, each line is a pair of key and valuenoChoicePossible
- if true, an item is offered which represents the "no choice"suppressKey
- whether or not keys should be suppressed in ComboBoxpublic VariableChoice(SessionData sessionData, java.lang.String[][] content, boolean noChoicePossible, java.lang.String nameForNoChoice)
content
- the statically filled content, each line is a pair of key and valuenoChoicePossible
- if true, an item is offered which represents the "no choice"nameForNoChoice
- the expression to be used to indicate "no choice"public VariableChoice(SessionData sessionData, java.lang.String[][] content, boolean noChoicePossible, java.lang.String nameForNoChoice, boolean suppressKey)
content
- the statically filled content, each line is a pair of key and valuenoChoicePossible
- if true, an item is offered which represents the "no choice"nameForNoChoice
- the expression to be used to indicate "no choice"suppressKey
- whether or not keys should be suppressed in ComboBoxpublic VariableChoice(SessionData sessionData, KeyValuePair[] keyValuePairs)
keyValuePairs
- the content as an array of key value pairspublic VariableChoice(SessionData sessionData, KeyValuePairNum[] keyValuePairs)
public VariableChoice(SessionData sessionData, KeyValuePair[] keyValuePairs, boolean noChoicePossible)
keyValuePairs
- the content as an array of key value pairsnoChoicePossible
- if true, an item is offered which represents the "no choice"public VariableChoice(SessionData sessionData, KeyValuePairNum[] keyValuePairs, boolean noChoicePossible)
protected java.lang.String getTranslation(java.lang.String resourceKey)
getTranslation
in class RemoteElement
resourceKey
- the key of the resource to retrievepublic int getSelectedIndex()
public void setSelectedItemKeyAsBeginValue(java.lang.String key)
selectIdentifier
- the identifier (primary key) of the item to selectpublic java.lang.String getSelectedItemKey()
public void setSelectedItemKey(java.lang.String key)
key
- the key of the item to selectpublic boolean isSpecialChoice()
public void setNoSpecialChoice()
Copyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de