public class DataComboBox extends HalfDataComboBox implements Storable, java.awt.event.ItemListener
HalfDataComboBox.Variant
callbackIfTableChanged, containsNoSpecification, contentDataObject, contentIsToRenew, editBeginValue, filterCondition, identifierTable, inactiveColumnName, nameForNoChoice, orderByColumnNames, SPECIAL_NAME_FOR_NO_CHOICE_WHICH_MEANS_NOT_APPLICABLE, specialChoices, visibleColumnNames, weakItems, WIDTH_FITTING_TO_CONTENT
index, items, value
context, editable, enabled, lastEditability, lastVisibility, name, nonstandardPanel, nonstandardPosition, sessionData, toolTipText, visible
Constructor and Description |
---|
DataComboBox(SessionData sessionData,
DataObject assignedDataObject,
java.lang.String assignedColumnName,
DataObject sourceDataObject)
Constructs a new combo box for unencoded assignment.
|
DataComboBox(SessionData sessionData,
DataObject assignedDataObject,
java.lang.String assignedColumnName,
DataObject sourceDataObject,
java.lang.String visibleColumnName)
Constructs a new combo box for encoded assignment.
|
DataComboBox(SessionData sessionData,
DataObject assignedDataObject,
java.lang.String assignedColumnName,
DataObject sourceDataObject,
java.lang.String visibleColumnName,
java.lang.String orderByColumnName,
java.lang.String nameForNoChoice)
Constructs a new combo box for encoded assignment.
|
DataComboBox(SessionData sessionData,
DataObject assignedDataObject,
java.lang.String assignedColumnName,
DataObject sourceDataObject,
java.lang.String visibleColumnName,
java.lang.String orderByColumnName,
java.lang.String nameForNoChoice,
int width)
Constructs a new combo box for encoded assignment.
|
Modifier and Type | Method and Description |
---|---|
void |
dataChangePerformed(DataChangedEvent e)
Invoked when data have been changed.
|
protected void |
fill()
Fills or refills the content of the data combo box by reading the source
data object.
|
DataObject |
getAssignedDataObject() |
boolean |
isContentValid()
Indicates whether the component's value is valid.
|
boolean |
isFilled()
Returns true if 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 |
saveValue()
Stores the component's value.
|
void |
selectAll()
Selects all input of the component, if it is supported - e.g. in JTextField.
|
void |
setEditBeginValue(Identifier specialEditBeginValue)
Sets the default value (if no date could be loaded from database).
|
void |
setNoSpecialChoiceAsEditBeginValue()
Selects the item to be used to indicate "no special choice" and indicates that this is the begin of editing so that isModified returns false.
|
void |
setRequired(boolean required)
Determines whether input is required (mandatory).
|
addItem, destroy, fill, finalize, free, getSelectedIdentifier, getSelectedItemWithoutNameForNoChoice, getTranslation, isSpecialChoice, reloadContentIfIsToRenew, removeAllItems, setFilterCondition, setFilterCondition, setInactiveColumnName, setNoSpecialChoice, setSelectedIdentifier, setSelectedIdentifierAsBeginValue, setSpecialChoices, setValues
addItem, addItemListener, buildRemoteView, fetchValuesFromRequest, getItemAt, getItemCount, getSelectedItem, perform, requestFocusInWindow, resetEditBeginValue, setSelectedIndex, setSelectedIndexAsEditBeginValue, setSelectedItem, updateRemoteView
beginAction, endAction, getContext, getName, isEnabled, isVisible, register, resetLastStatus, setEditable, setEnabled, setToolTipText, setVisible
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
requestFocusInWindow, setValues
destroy, fetchValuesFromRequest, setToolTipText
buildRemoteView
public DataComboBox(SessionData sessionData, DataObject assignedDataObject, java.lang.String assignedColumnName, DataObject sourceDataObject)
assignedDataObject
- the data object to trigger the selectionassignedColumnName
- the name of the column the text field is to assign tosourceDataObject
- the source data objectpublic DataComboBox(SessionData sessionData, DataObject assignedDataObject, java.lang.String assignedColumnName, DataObject sourceDataObject, java.lang.String visibleColumnName)
assignedDataObject
- the data object to trigger the selectionassignedColumnName
- the name of the column the text field is to assign tosourceDataObject
- the source data objectvisibleColumnName
- the name of the column to be displayedpublic DataComboBox(SessionData sessionData, DataObject assignedDataObject, java.lang.String assignedColumnName, DataObject sourceDataObject, java.lang.String visibleColumnName, java.lang.String orderByColumnName, java.lang.String nameForNoChoice)
assignedDataObject
- the data object to assign toassignedColumnName
- the name of the column the text field is to assign tosourceDataObject
- the source data objectvisibleColumnName
- the name of the column to be displayedorderByColumnName
- the sorting column name of the content data objectnameForNoChoice
- the expression to be used to indicate "no choice"public DataComboBox(SessionData sessionData, DataObject assignedDataObject, java.lang.String assignedColumnName, DataObject sourceDataObject, java.lang.String visibleColumnName, java.lang.String orderByColumnName, java.lang.String nameForNoChoice, int width)
assignedDataObject
- the data object to assign toassignedColumnName
- the name of the column the text field is to assign tosourceDataObject
- the data object to fill the contentvisibleColumnName
- the name of the column to be displayedorderByColumnName
- the sorting column name of the content data objectnameForNoChoice
- the expression to be used to indicate "no choice"width
- the width of the component - if 0 it's automatically sizedpublic DataObject getAssignedDataObject()
getAssignedDataObject
in interface Storable
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 HalfDataComboBox
public void loadValue()
public void setNoSpecialChoiceAsEditBeginValue()
public void setEditBeginValue(Identifier specialEditBeginValue)
specialEditBeginValue
- the new initial value of the date fieldpublic boolean isFilled()
HalfDataComboBox
isFilled
in interface Storable
isFilled
in class HalfDataComboBox
public boolean isValid()
Storable
public boolean isModified()
isModified
in interface Storable
isModified
in class HalfDataComboBox
public boolean isToSave()
public void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged
in interface java.awt.event.ItemListener
e
- the key eventpublic void saveValue()
public void dataChangePerformed(DataChangedEvent e)
dataChangePerformed
in interface DataChangeListener
dataChangePerformed
in class HalfDataComboBox
e
- the key eventprotected void fill()
HalfDataComboBox
fill
in class HalfDataComboBox
Copyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de