com.klg.jclass.field
Class JCPopupField
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--javax.swing.JComboBox
|
+--com.klg.jclass.field.JCComboField
|
+--com.klg.jclass.field.JCPopupField
- All Implemented Interfaces:
- Accessible, ActionListener, EventListener, ImageObserver, ItemSelectable, JCFieldComponent, JCPopupListener, JCValueListener, ListDataListener, MenuContainer, Serializable
- Direct Known Subclasses:
- DSdbPopupField, JBdbPopupField, JCPopupFieldCellEditor, JCPopupFieldCellRenderer
- public class JCPopupField
- extends JCComboField
- implements JCPopupListener, JCValueListener
JCPopupField
is subclassed from JCComboField
. It
uses a combo field to display a monthly calendar when the
JCDateTimeValidator
is used. Only this JClass Field validator
implements the popup; however, you can write your own validator to make use
of the popup in other ways.
- See Also:
- Serialized Form
Field Summary |
protected com.klg.jclass.field.validate.PopupFieldEditor |
popupEditor
|
Constructor Summary |
JCPopupField()
Constructs an empty JCPopupField . |
JCPopupField(Class c)
Constructs an empty JCPopupField , which expects an object of the
specified class. |
JCPopupField(Class c,
com.klg.jclass.field.validate.JCValidator v)
Constructs an empty JCPopupField , which expects an object of the
specified class and which uses the specified validator. |
JCPopupField(com.klg.jclass.util.value.JCValueModel m)
Constructs an empty JCPopupField , which uses the specified value
model to contain its value. |
JCPopupField(com.klg.jclass.util.value.JCValueModel m,
com.klg.jclass.field.validate.JCValidator v)
Constructs an empty JCPopupField , which uses the specified value
model to contain its value and which uses the specified validator. |
Method Summary |
void |
commit(com.klg.jclass.util.swing.JCPopupEvent e)
This method is used internally. |
com.klg.jclass.field.validate.PopupFieldEditor |
getPopupEditor()
Returns the popup editor. |
Object |
getSelectedItem()
Overridden since this method assumed that a combobox list always exists. |
protected ComboBoxUI |
inferLookAndFeelUI()
|
void |
setLocale(Locale l)
Sets the locale being used by the popup field
chooser, which will set it on its child components. |
void |
setPopupEditor(com.klg.jclass.field.validate.PopupFieldEditor popup)
Sets the popup editor. |
void |
setUI(ComboBoxUI ui)
Sets the look and feel for this component. |
void |
updateUI()
Updates the look and feel for this component. |
void |
valueChanged(com.klg.jclass.util.value.JCValueEvent e)
This method is used internally. |
void |
valueChanging(com.klg.jclass.util.value.JCValueEvent e)
This method is used internally. |
Methods inherited from class com.klg.jclass.field.JCComboField |
add, addActionListener, addNotify, addPropertyChangeListener, addValueListener, commitEdit, createField, getAbout, getDataProperties, getInvalidInfo, getOriginalPickList, getPickList, getPrefixList, getSelectOnEnter, getState, getTextFieldEditor, getValidator, getValue, getValueModel, isAutoAppend, isAutoComplete, isAutoRefinement, isAutoSuggest, isRequired, removeActionListener, removePropertyChangeListener, removeValueListener, restoreOriginalPickList, setAbout, setAutoComplete, setBackground, setDataProperties, setForeground, setInvalidInfo, setItems, setPickList, setRequired, setSelectOnEnter, setTemporaryPickList, setValidator, setValue, setValueModel |
Methods inherited from class javax.swing.JComboBox |
actionPerformed, 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, processKeyEvent, removeAllItems, removeItem, removeItemAt, removeItemListener, removePopupMenuListener, selectedItemChanged, selectWithKeyChar, setAction, setActionCommand, setEditable, setEditor, setEnabled, setKeySelectionManager, setLightWeightPopupEnabled, setMaximumRowCount, setModel, setPopupVisible, setPrototypeDisplayValue, setRenderer, setSelectedIndex, setSelectedItem, showPopup |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFont, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
popupEditor
protected com.klg.jclass.field.validate.PopupFieldEditor popupEditor
JCPopupField
public JCPopupField()
- Constructs an empty
JCPopupField
.
JCPopupField
public JCPopupField(Class c)
- Constructs an empty
JCPopupField
, which expects an object of the
specified class.
- Parameters:
c
- The class
JCPopupField
public JCPopupField(Class c,
com.klg.jclass.field.validate.JCValidator v)
- Constructs an empty
JCPopupField
, which expects an object of the
specified class and which uses the specified validator.
- Parameters:
c
- The classv
- The validator
JCPopupField
public JCPopupField(com.klg.jclass.util.value.JCValueModel m)
- Constructs an empty
JCPopupField
, which uses the specified value
model to contain its value.
- Parameters:
m
- The value model
JCPopupField
public JCPopupField(com.klg.jclass.util.value.JCValueModel m,
com.klg.jclass.field.validate.JCValidator v)
- Constructs an empty
JCPopupField
, which uses the specified value
model to contain its value and which uses the specified validator.
- Parameters:
m
- The value modelv
- The validator
inferLookAndFeelUI
protected ComboBoxUI inferLookAndFeelUI()
setPopupEditor
public void setPopupEditor(com.klg.jclass.field.validate.PopupFieldEditor popup)
- Sets the popup editor.
- Parameters:
popup
-
getPopupEditor
public com.klg.jclass.field.validate.PopupFieldEditor getPopupEditor()
- Returns the popup editor.
- Returns:
- popup editor
commit
public void commit(com.klg.jclass.util.swing.JCPopupEvent e)
- This method is used internally. You should not have to call it.
- Specified by:
commit
in interface JCPopupListener
- Parameters:
e
-
valueChanging
public void valueChanging(com.klg.jclass.util.value.JCValueEvent e)
- This method is used internally. You should not have to call it.
- Specified by:
valueChanging
in interface JCValueListener
- Parameters:
e
-
valueChanged
public void valueChanged(com.klg.jclass.util.value.JCValueEvent e)
- This method is used internally. You should not have to call it.
- Specified by:
valueChanged
in interface JCValueListener
- Parameters:
e
-
setUI
public void setUI(ComboBoxUI ui)
- Sets the look and feel for this component.
This method is used internally. You should not have to call it.
- Overrides:
setUI
in class JCComboField
- Parameters:
ui
-
updateUI
public void updateUI()
- Updates the look and feel for this component.
This method is used internally. You should not have to call it.
- Overrides:
updateUI
in class JCComboField
getSelectedItem
public Object getSelectedItem()
- Overridden since this method assumed that a combobox list always exists.
Do not call this method directly.
- Overrides:
getSelectedItem
in class JComboBox
- Returns:
setLocale
public void setLocale(Locale l)
- Sets the locale being used by the popup field
chooser, which will set it on its child components.
- Overrides:
setLocale
in class JCComboField
- Parameters:
l
- the new locale to be used