public abstract class AbstractPicker
extends javax.swing.JComboBox
implements java.awt.event.ActionListener
| Modifier and Type | Class and Description |
|---|---|
static interface |
AbstractPicker.PickerResultValidator
The interface defining Validators for AbstractPicker browse actions.
|
static interface |
AbstractPicker.PickerValueEncoder
The interface defining Encoders for AbstractPicker values.
|
javax.swing.JComboBox.AccessibleJComboBox, javax.swing.JComboBox.KeySelectionManagerjavax.swing.JComponent.AccessibleJComponent| Modifier and Type | Field and Description |
|---|---|
protected AbstractPicker.PickerValueEncoder |
encoder |
protected AbstractPicker.PickerResultValidator |
validator |
actionCommand, dataModel, editor, isEditable, keySelectionManager, lightWeightPopupEnabled, maximumRowCount, renderer, selectedItemReminderlistenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Constructor and Description |
|---|
AbstractPicker() |
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent ae) |
protected void |
addValue(java.lang.Object value)
Adds the value to the model.
|
protected abstract void |
doBrowse() |
java.lang.Object |
getCurrentValue() |
AbstractPicker.PickerValueEncoder |
getEncoder()
Retrieve the Encoder used by this AbstractPicker.
|
protected java.lang.String |
getInvalidValueErrorHelpID()
Retrieves the HelpID string to use in the error dialog shown when the
entered value is invalid.
|
protected java.lang.String |
getInvalidValueErrorTitle()
Retrieves the title string to use in the error dialog when the entered
value is invalid.
|
java.lang.Object |
getSelectedItem() |
AbstractPicker.PickerResultValidator |
getValidator()
Retrieve the
PickerResultValidator used by this AbstractPicker
to validate the results of Browse actions. |
void |
requestFocus() |
void |
setBrowseResult(java.lang.Object result)
Set the value resulting from a Browse.
|
void |
setCurrentValue(java.lang.Object newCurrentValue) |
void |
setEncoder(AbstractPicker.PickerValueEncoder newEncoder)
Set the Encoder used by this AbstractPicker.
|
void |
setSelectedItem(java.lang.Object newValue) |
void |
setValidator(AbstractPicker.PickerResultValidator newValidator)
Set the Validator used by this AbstractPicker.
|
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, getSelectedObjects, getUI, getUIClassID, hidePopup, insertItemAt, installAncestorListener, intervalAdded, intervalRemoved, isEditable, isLightWeightPopupEnabled, isPopupVisible, paramString, processKeyBinding, processKeyEvent, removeActionListener, removeAllItems, removeItem, removeItemAt, removeItemListener, removePopupMenuListener, selectedItemChanged, selectWithKeyChar, setAction, setActionCommand, setEditable, setEditor, setEnabled, setKeySelectionManager, setLightWeightPopupEnabled, setMaximumRowCount, setModel, setPopupVisible, setPrototypeDisplayValue, setRenderer, setSelectedIndex, setUI, showPopup, updateUIaddAncestorListener, 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, 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, updateadd, 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, validateTreeaction, 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, getBackground, 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, transferFocusUpCycleprotected AbstractPicker.PickerResultValidator validator
protected AbstractPicker.PickerValueEncoder encoder
public AbstractPicker.PickerResultValidator getValidator()
PickerResultValidator used by this AbstractPicker
to validate the results of Browse actions.PickerResultValidator which the AbstractPicker
will use to validate results.public void setValidator(AbstractPicker.PickerResultValidator newValidator)
newValidator - the PickerResultValidator which this AbstractPicker
should use to validate results.public AbstractPicker.PickerValueEncoder getEncoder()
PickerValueEncoder which this AbstractPicker will
use to encode values.public void setEncoder(AbstractPicker.PickerValueEncoder newEncoder)
newEncoder - the PickerValueEncoder which this AbstractPicker
should use to encode results.public java.lang.Object getCurrentValue()
public java.lang.Object getSelectedItem()
getSelectedItem in class javax.swing.JComboBoxpublic void setCurrentValue(java.lang.Object newCurrentValue)
public void setSelectedItem(java.lang.Object newValue)
setSelectedItem in class javax.swing.JComboBoxprotected java.lang.String getInvalidValueErrorTitle()
protected java.lang.String getInvalidValueErrorHelpID()
null means that no
Help button should be displayed.public final void setBrowseResult(java.lang.Object result)
getInvalidValueMsg method
will be called to provide an error message. If the value is valid, the
Encoder (if assigned) will be used to encode the value. This encoded value
is then added to the model and selected.result - the result of the Browse operation. If result is null,
nothing is done. A non-null result is passed to the optional
PickerResultValidator, the optional PickerValueEncoder,
and then added to the model.protected void addValue(java.lang.Object value)
value - the new value (optionally encoded) to be added.public void requestFocus()
requestFocus in class javax.swing.JComponentpublic void actionPerformed(java.awt.event.ActionEvent ae)
actionPerformed in interface java.awt.event.ActionListeneractionPerformed in class javax.swing.JComboBoxprotected abstract void doBrowse()