Calendar Component v5.1
www.calendarcomponent.com

com.imagine.component.calendar
Class CalendarComboBox

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended bycom.imagine.component.calendar.CalendarComboBox
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class CalendarComboBox
extends javax.swing.JComponent

This is the calendar combobox you have to insert into your application.

To use this component you must get an instance of it by calling the method new CalendarComboBox(java.util.Date).
In order to customize the look you must call the method getCalendarComponent() which will give you an instance of a CalendarComponent object and work with it.
To set the date you must call the method setDate() and to get the date you must call the method getDate().

See also howto.html file for further informations.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static CalendarProperty CLOSE_WHEN_DATE_SELECTED
          If true the combobox will be hidden when selecting a date with the mouse or with a key.
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
CalendarComboBox()
          Constructor for the CalendarComboBox object.
 
Method Summary
 java.lang.Boolean getBooleanCalendarComboBoxProperty(CalendarProperty calendarProperty)
          Get the value of the specified calendar property as a Boolean object.
 java.lang.Object getCalendarComboBoxProperty(CalendarProperty calendarProperty)
          Get the value of the specified calendar property.
 CalendarComboBoxView getCalendarComboBoxView()
          Get the calendar combo box view object containg informations about the calendar combobox view.
 CalendarComponent getCalendarComponent()
          Get the calendarComponent associated.
 java.util.Date getDate()
          Get the date.
 java.lang.String getDateFormat()
          Get the date format.
 void invalidate()
          Invalidate the UI.
 void setCalendarComboBoxProperty(CalendarProperty calendarProperty, java.lang.Object value)
          Set the specified CalendarComboBox property to the specified value.
 void setDate(java.util.Date date)
          Set the date.
 void setDateFormat(java.lang.String dateFormat)
          Set the date format.
 void setEnabled(boolean enabled)
          Sets whether or not this component is enabled.
 void updateUI()
          Update the UI.
 
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, getAccessibleContext, 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, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, 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, 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, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLOSE_WHEN_DATE_SELECTED

public static final CalendarProperty CLOSE_WHEN_DATE_SELECTED
If true the combobox will be hidden when selecting a date with the mouse or with a key. The default value is true.

Constructor Detail

CalendarComboBox

public CalendarComboBox()
Constructor for the CalendarComboBox object.

Method Detail

getCalendarComboBoxProperty

public java.lang.Object getCalendarComboBoxProperty(CalendarProperty calendarProperty)
Get the value of the specified calendar property.

Parameters:
calendarProperty - The property for which the value must be returned.
Returns:
The value for the specified property.

getBooleanCalendarComboBoxProperty

public java.lang.Boolean getBooleanCalendarComboBoxProperty(CalendarProperty calendarProperty)
Get the value of the specified calendar property as a Boolean object. This is an alias of the getCalendarComboBoxProperty function and returns directly the type of this property without forcing the user to cast the return type to the proper type.

Parameters:
calendarProperty - The property for which the value must be returned.
Returns:
The value for the specified property.

setCalendarComboBoxProperty

public void setCalendarComboBoxProperty(CalendarProperty calendarProperty,
                                        java.lang.Object value)
                                 throws CalendarPropertyException
Set the specified CalendarComboBox property to the specified value. The value must be an instance of the class type defined by the specified calendar property.

Parameters:
calendarProperty - The property to be set.
value - The value to set for the specified property.
Throws:
CalendarPropertyException

getCalendarComponent

public CalendarComponent getCalendarComponent()
Get the calendarComponent associated.

Returns:
The calendarComponent.

getCalendarComboBoxView

public CalendarComboBoxView getCalendarComboBoxView()
Get the calendar combo box view object containg informations about the calendar combobox view.

Returns:
The calendar combo box view object containg informations about the calendar combobox view.

setDateFormat

public void setDateFormat(java.lang.String dateFormat)
Set the date format.

Parameters:
dateFormat - the date format to be set.

getDateFormat

public java.lang.String getDateFormat()
Get the date format.

Returns:
The date format.

getDate

public java.util.Date getDate()
Get the date.

Returns:
The date.

setDate

public void setDate(java.util.Date date)
Set the date.

Parameters:
date - The date.

updateUI

public void updateUI()
Update the UI.


invalidate

public void invalidate()
Invalidate the UI.


setEnabled

public void setEnabled(boolean enabled)
Sets whether or not this component is enabled.

Parameters:
enabled - true if this component should be enabled, false otherwise

Calendar Component v5.1
www.calendarcomponent.com