com.klg.jclass.util.calendar
Class MonthPopdown
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--javax.swing.JComboBox
|
+--com.klg.jclass.util.calendar.MonthPopdown
- All Implemented Interfaces:
- Accessible, ActionListener, CalendarComponent, EventListener, ImageObserver, ItemListener, ItemSelectable, JCValueListener, ListDataListener, MenuContainer, Serializable
- public class MonthPopdown
- extends JComboBox
- implements CalendarComponent, JCValueListener, ItemListener
Combobox that shows the months of the year.
- See Also:
- Serialized Form
Constructor Summary |
MonthPopdown(com.klg.jclass.util.value.JCValueModel model,
Locale l)
Construct a MonthPopdown with the given value model and locale. |
MonthPopdown(com.klg.jclass.util.value.JCValueModel model,
Locale l,
String[] months)
Construct a MonthPopdown with the given value model and locale. |
Method Summary |
void |
addActionListener(ActionListener l)
Add listener to receive action event when data is changed by the user |
com.klg.jclass.util.value.JCValueModel |
getCalendarModel()
Get the value model. |
Locale |
getLocale()
Get the current locale. |
com.klg.jclass.util.calendar.JCCalendar |
getSpecialDates()
Get the special dates being used by the DayTable. |
com.klg.jclass.util.calendar.JCCalendar |
getSpecialDates(com.klg.jclass.util.calendar.JCCalendar sd)
Deprecated. As the parameter is unused, should use getSpecialDates() |
void |
itemStateChanged(ItemEvent e)
State changed. |
void |
removeActionListener(ActionListener l)
remove listener to receive action event when data is changed by the user |
void |
setCalendarModel(com.klg.jclass.util.value.JCValueModel model)
Set the value model. |
void |
setLocale(Locale l)
Set the locale to use. |
void |
setSpecialDates(com.klg.jclass.util.calendar.JCCalendar sd)
This component ignores special dates. |
void |
valueChanged(com.klg.jclass.util.value.JCValueEvent event)
The method informs the listener that the value has been changed. |
void |
valueChanging(com.klg.jclass.util.value.JCValueEvent event)
The value is changing. |
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, getSelectedItem, 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, setUI, showPopup, updateUI |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, 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, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFont, setForeground, 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, 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 |
locale
protected Locale locale
calendarModel
protected com.klg.jclass.util.value.JCValueModel calendarModel
selectedMonth
protected int selectedMonth
months
protected String[] months
userSetMonths
protected boolean userSetMonths
actionListeners
protected com.klg.jclass.util.JCListenerList actionListeners
ignoreChange
protected boolean ignoreChange
MonthPopdown
public MonthPopdown(com.klg.jclass.util.value.JCValueModel model,
Locale l)
- Construct a MonthPopdown with the given value model and locale.
- Parameters:
model
- The new calendar value modell
- The locale to use
MonthPopdown
public MonthPopdown(com.klg.jclass.util.value.JCValueModel model,
Locale l,
String[] months)
- Construct a MonthPopdown with the given value model and locale.
- Parameters:
model
- The new calendar value modell
- The locale to usemonths
- A list of months to use (null means use locale specific names)
setLocale
public void setLocale(Locale l)
- Set the locale to use.
- Specified by:
setLocale
in interface CalendarComponent
- Overrides:
setLocale
in class Component
- Parameters:
l
- The new locale to use
getLocale
public Locale getLocale()
- Get the current locale.
- Overrides:
getLocale
in class Component
- Returns:
- The current locale being used.
setCalendarModel
public void setCalendarModel(com.klg.jclass.util.value.JCValueModel model)
- Set the value model.
- Specified by:
setCalendarModel
in interface CalendarComponent
- Parameters:
model
- The new calendar value model
getCalendarModel
public com.klg.jclass.util.value.JCValueModel getCalendarModel()
- Get the value model.
- Returns:
- The current calendar value model
setSpecialDates
public void setSpecialDates(com.klg.jclass.util.calendar.JCCalendar sd)
- This component ignores special dates.
- Specified by:
setSpecialDates
in interface CalendarComponent
- Parameters:
sd
- The new list of special dates stored within a JCCalendar object
getSpecialDates
public com.klg.jclass.util.calendar.JCCalendar getSpecialDates(com.klg.jclass.util.calendar.JCCalendar sd)
- Deprecated. As the parameter is unused, should use getSpecialDates()
- Get the special dates being used by the DayTable.
- Parameters:
sd
- Unused
- Returns:
- The current list of special dates stored within a JCCalendar object
getSpecialDates
public com.klg.jclass.util.calendar.JCCalendar getSpecialDates()
- Get the special dates being used by the DayTable.
- Returns:
- The current list of special dates stored within a JCCalendar object
addActionListener
public void addActionListener(ActionListener l)
- Add listener to receive action event when data is changed by the user
- Specified by:
addActionListener
in interface CalendarComponent
- Overrides:
addActionListener
in class JComboBox
- Parameters:
l
- The action listener to be added
removeActionListener
public void removeActionListener(ActionListener l)
- remove listener to receive action event when data is changed by the user
- Specified by:
removeActionListener
in interface CalendarComponent
- Overrides:
removeActionListener
in class JComboBox
- Parameters:
l
- The action listener to be removed
itemStateChanged
public void itemStateChanged(ItemEvent e)
- State changed.
- Specified by:
itemStateChanged
in interface ItemListener
- Parameters:
e
- The event caused by the item being changed
valueChanging
public void valueChanging(com.klg.jclass.util.value.JCValueEvent event)
- The value is changing. The listener may further change the new_value or
abort the change altogether. If the case of an abort (call
event.setAllowChange(false)) the "valueChanged" method will never be
called.
- Specified by:
valueChanging
in interface JCValueListener
- Parameters:
event
- The event generated by the value changing
valueChanged
public void valueChanged(com.klg.jclass.util.value.JCValueEvent event)
- The method informs the listener that the value has been changed.
- Specified by:
valueChanged
in interface JCValueListener
- Parameters:
event
- The event generated by the value being changed