public class DataComboBox extends HalfDataComboBox implements DataComponent, java.awt.event.ItemListener
HalfDataComboBox.Variant
javax.swing.JComboBox.AccessibleJComboBox, javax.swing.JComboBox.KeySelectionManager
javax.swing.JComponent.AccessibleJComponent
containsNoSpecification, contentDataObject, editBeginValue, filterCondition, identifierTable, inactiveColumnName, nameForNoChoice, orderByColumnNames, SPECIAL_NAME_FOR_NO_CHOICE_WHICH_MEANS_NOT_APPLICABLE, specialChoices, visibleColumnNames, weakItems, WIDTH_FITTING_TO_CONTENT
programmaticChange
actionCommand, dataModel, isEditable, keySelectionManager, lightWeightPopupEnabled, maximumRowCount, renderer, selectedItemReminder
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
DataComboBox(DataObject assignedDataObject,
java.lang.String assignedColumnName,
DataObject sourceDataObject)
Constructs a new combo box for unencoded assignment.
|
DataComboBox(DataObject assignedDataObject,
java.lang.String assignedColumnName,
DataObject sourceDataObject,
java.lang.String visibleColumnName)
Constructs a new combo box for encoded assignment.
|
DataComboBox(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(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 |
addComponentModificationListener(ComponentModificationListener l)
Adds a component modification listener to this component.
|
void |
dataChangePerformed(DataChangedEvent e) |
protected void |
finalize() |
void |
free()
Frees external resources.
|
DataObject |
getAssignedDataObject() |
boolean |
isContentValid()
Indicates whether the component's value is valid.
|
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()
Indicates whether the component's value differs from its value at load time.
|
void |
itemStateChanged(java.awt.event.ItemEvent e)
Invoked when an item state has been released.
|
void |
keyReleased(java.awt.event.KeyEvent e)
Invoked when a key 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 |
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).
|
void |
setToSaveEvenIfNotModified(boolean toSaveEvenIfNotModified)
Sets the flag to save component's value (transfer to data object) even user didn't modify its value.
|
addItem, fill, fill, getEditBeginValue, getSelectedIdentifier, getSelectedItemWithoutNameForNoChoice, getTranslation, isFilled, isSpecialChoice, removeItem, setFilterCondition, setFilterCondition, setHelpContext, setInactiveColumnName, setNoSpecialChoice, setSelectedIdentifier, setSelectedIdentifierAsBeginValue, setSpecialChoices
getBackground, getHelpTarget, getHelpTopic, getIndexIfUnique, resetEditBeginValue, setEditable, setEditableForUserTyping, setEditableForUserTyping, setEditableForUserTyping, setHelpContext, setSelectedIndex, setSelectedIndexAsEditBeginValue, setSelectedItem, setSelectedItemAsEditBeginValue
actionPerformed, actionPropertyChanged, addActionListener, addItem, addItemListener, addPopupMenuListener, configureEditor, configurePropertiesFromAction, contentsChanged, createActionPropertyChangeListener, createDefaultKeySelectionManager, fireActionEvent, fireItemStateChanged, firePopupMenuCanceled, firePopupMenuWillBecomeInvisible, firePopupMenuWillBecomeVisible, getAccessibleContext, getAction, getActionCommand, getActionListeners, getEditor, getItemAt, getItemCount, getItemListeners, getKeySelectionManager, getMaximumRowCount, getModel, getPopupMenuListeners, getPrototypeDisplayValue, getRenderer, getSelectedIndex, getSelectedItem, getSelectedObjects, getUI, getUIClassID, hidePopup, insertItemAt, installAncestorListener, intervalAdded, intervalRemoved, isEditable, isLightWeightPopupEnabled, isPopupVisible, paramString, processKeyBinding, processKeyEvent, removeActionListener, removeAllItems, removeItem, removeItemAt, removeItemListener, removePopupMenuListener, selectedItemChanged, selectWithKeyChar, setAction, setActionCommand, setEditor, setEnabled, setKeySelectionManager, setLightWeightPopupEnabled, setMaximumRowCount, setModel, setPopupVisible, setPrototypeDisplayValue, setRenderer, setUI, showPopup, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
isFilled, requestFocusInWindow, setEditable, setToolTipText
public DataComboBox(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(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(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(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 DataComponent
public void setRequired(boolean required)
setRequired
in interface DataComponent
required
- if true, input is mandatory; otherwise, input is not mandatorypublic boolean isContentValid()
isContentValid
in interface DataComponent
public boolean isRequirementUnfulfilled()
isRequirementUnfulfilled
in interface DataComponent
public void selectAll()
selectAll
in interface DataComponent
selectAll
in class HalfDataComboBox
public void loadValue()
loadValue
in interface DataComponent
public void setNoSpecialChoiceAsEditBeginValue()
public void setToSaveEvenIfNotModified(boolean toSaveEvenIfNotModified)
toSaveEvenIfNotModified
- whether or not component's value is to save even even user didn't modify its valuepublic void setEditBeginValue(Identifier specialEditBeginValue)
specialEditBeginValue
- the new initial value of the date fieldpublic boolean isModified()
ModifiedInformer
isModified
in interface ModifiedInformer
isModified
in class HalfDataComboBox
public boolean isToSave()
DataComponent
isToSave
in interface DataComponent
public void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged
in interface java.awt.event.ItemListener
e
- the key eventpublic void keyReleased(java.awt.event.KeyEvent e)
e
- the key eventpublic void addComponentModificationListener(ComponentModificationListener l)
DataComponent
addComponentModificationListener
in interface DataComponent
l
- component modification listener to addpublic void removeComponentModificationListener(ComponentModificationListener l)
DataComponent
removeComponentModificationListener
in interface DataComponent
l
- component modification listener to addDataList
public void saveValue()
DataComponent
saveValue
in interface DataComponent
public void dataChangePerformed(DataChangedEvent e)
dataChangePerformed
in interface DataChangeListener
dataChangePerformed
in class HalfDataComboBox
public void free()
HalfDataComboBox
free
in interface Exemptible
free
in class HalfDataComboBox
protected void finalize() throws java.lang.Throwable
finalize
in class HalfDataComboBox
java.lang.Throwable
Copyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de