public class DataVariableChoice extends VariableChoice implements Storable, java.awt.event.ItemListener
index, items, value
context, editable, enabled, lastEditability, lastVisibility, name, nonstandardPanel, nonstandardPosition, sessionData, toolTipText, visible
Constructor and Description |
---|
DataVariableChoice(SessionData sessionData,
KeyValuePair[] content,
DataObject dO,
java.lang.String columnName)
Constructs a new DataVariableChoice.
|
DataVariableChoice(SessionData sessionData,
java.lang.String[][] content,
DataObject dO,
java.lang.String columnName)
Constructs a new DataVariableChoice.
|
DataVariableChoice(SessionData sessionData,
java.lang.String[][] content,
DataObject dO,
java.lang.String columnName,
boolean noChoicePossible)
Constructs a new DataVariableChoice.
|
DataVariableChoice(SessionData sessionData,
java.lang.String[][] content,
DataObject dO,
java.lang.String columnName,
boolean noChoicePossible,
boolean suppressKey)
Constructs a new DataVariableChoice.
|
Modifier and Type | Method and Description |
---|---|
void |
addComponentModificationListener(ComponentModificationListener l)
Adds a component modification listener to this component.
|
void |
free()
Releases external resources.
|
DataObject |
getAssignedDataObject()
Returns the assigned data object.
|
boolean |
isContentValid()
Indicates whether the component's value is valid.
|
boolean |
isFilled()
Indicates whether the component has a value.
|
boolean |
isModified()
Indicates whether the component's value differs from its initial value.
|
boolean |
isRequirementUnfulfilled()
Indicates whether the component's value is mandatory but not filled.
|
boolean |
isToSave() |
boolean |
isValid()
Returns true if the component's value is valid.
|
void |
itemStateChanged(java.awt.event.ItemEvent e)
Invoked when an item state has been released.
|
void |
loadValue()
Loads the component's database stored value.
|
void |
removeComponentModificationListener(ComponentModificationListener l)
Removes a component modification listener to this component.
|
void |
saveValue()
Stores the component's value.
|
void |
selectAll()
Selects all input of the component, if it is supported - e.g. in JTextField.
|
void |
setDefaultValue(java.lang.String newDefaultValue) |
void |
setEditable(boolean editable)
Sets the flag that determines whether or not this component is editable.
|
void |
setEditBeginValue(java.lang.String specialeditBeginValue)
Sets the default value (if no date could be loaded from database).
|
void |
setRequired(boolean required)
Determines whether input is required (mandatory).
|
void |
setSelectedIndexAsEditBeginValue(int anIndex)
Selects the item by index as edit begin value which causes isModified to
return false as long as user select another item.
|
void |
setSelectedItemKeyAsEditBeginValue(java.lang.String key)
Selects the item by key as edit begin value which causes isModified to
return false as long as user select another item.
|
getSelectedIndex, getSelectedItemKey, getTranslation, isSpecialChoice, setNoSpecialChoice, setSelectedItemKey, setSelectedItemKeyAsBeginValue
addItem, addItemListener, buildRemoteView, destroy, fetchValuesFromRequest, getItemAt, getItemCount, getSelectedItem, perform, removeAllItems, requestFocusInWindow, resetEditBeginValue, setSelectedIndex, setSelectedItem, setValues, updateRemoteView
beginAction, endAction, getContext, getName, isEnabled, isVisible, register, resetLastStatus, setEnabled, setToolTipText, setVisible
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
requestFocusInWindow, setValues
destroy, fetchValuesFromRequest, setToolTipText
buildRemoteView
public DataVariableChoice(SessionData sessionData, java.lang.String[][] content, DataObject dO, java.lang.String columnName)
content
- the content to assign todO
- the data object to assign tocolumnName
- the name of the column the text field is to assign topublic DataVariableChoice(SessionData sessionData, java.lang.String[][] content, DataObject dO, java.lang.String columnName, boolean noChoicePossible)
content
- the content to assign todO
- the data object to assign tocolumnName
- the name of the column the text field is to assign tonoChoicePossible
- if true, an item is offered which represents the "no choice"public DataVariableChoice(SessionData sessionData, java.lang.String[][] content, DataObject dO, java.lang.String columnName, boolean noChoicePossible, boolean suppressKey)
content
- the content to assign todO
- the data object to assign tocolumnName
- the name of the column the text field is to assign tonoChoicePossible
- if true, an item is offered which represents the "no choice"suppressKey
- whether or not keys should be suppressed in ComboBoxpublic DataVariableChoice(SessionData sessionData, KeyValuePair[] content, DataObject dO, java.lang.String columnName)
content
- the content to assign todO
- the data object to assign tocolumnName
- the name of the column the text field is to assign topublic DataObject getAssignedDataObject()
getAssignedDataObject
in interface Storable
public void setDefaultValue(java.lang.String newDefaultValue)
newDefaultValue
- sets the default value.public void setEditable(boolean editable)
setEditable
in class RemoteElement
editable
- a flag indicating whether this component should be user editableVariableChoice#setEditableForUserTyping(boolean)
public void setRequired(boolean required)
setRequired
in interface Storable
required
- if true, input is mandatory; otherwise, input is not mandatorypublic boolean isContentValid()
public boolean isRequirementUnfulfilled()
isRequirementUnfulfilled
in interface Storable
public void selectAll()
selectAll
in interface RemoteContent
selectAll
in class MustComboBox
public void setSelectedIndexAsEditBeginValue(int anIndex)
setSelectedIndexAsEditBeginValue
in class MustComboBox
anIndex
- the index of the item to selectpublic void setSelectedItemKeyAsEditBeginValue(java.lang.String key)
key
- the key of the item to selectpublic void loadValue()
public boolean isFilled()
public void setEditBeginValue(java.lang.String specialeditBeginValue)
specialEditBeginValue
- the new initial value of the date fieldpublic boolean isValid()
Storable
public boolean isModified()
isModified
in interface Storable
isModified
in class MustComboBox
public boolean isToSave()
public void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged
in interface java.awt.event.ItemListener
e
- the key eventpublic void addComponentModificationListener(ComponentModificationListener l)
l
- component modification listener to addpublic void removeComponentModificationListener(ComponentModificationListener l)
l
- component modification listener to addDataList
public void saveValue()
public void free()
free
in interface Exemptible
free
in interface ExemptibleManager
free
in class RemoteElement
Copyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de