com.jp.comp.calendar
Class DateField

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended bydev.gui.field.PopupField
                      extended bycom.jp.comp.calendar.DateField
All Implemented Interfaces:
javax.accessibility.Accessible, CalendarInterface, CalendarListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.Serializable

public class DateField
extends dev.gui.field.PopupField
implements CalendarListener, java.beans.PropertyChangeListener, CalendarInterface

DateField represents a field to show and edit the date with popup MonthCalendarPanel

See Also:
MonthCalendarPanel, Serialized Form

Nested Class Summary
protected  class DateField.DateFieldVerifier
          Fires when the date field loses the focus
 
Nested classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
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 javax.swing.KeyStroke DEFAULT_POPUP_CALENDAR_HOT_KEY
          Default hot key to popup the MonthCalendarPanel (Down Arrow)
protected  DateDocument fDateDocument
           
protected  java.util.Locale fLocale
           
protected  java.util.Date fOldDate
           
protected static java.lang.String POPUP_CALENDAR_ACTION_NAME
           
static java.lang.String PROPERTY_POPUP_HOTKEY
          Property name for the popupHotKey property
static java.lang.String PROPERTY_YEAR_DIGITS_AMOUNT
          Property name for the yearDigitsAmount property
protected static java.util.Date TODAY
           
 
Fields inherited from class dev.gui.field.PopupField
btnPopup, DEFAULT_BUTTON_TEXT, fField, fSelectAllFocusAdapter, pnlPopup, popupMenu, PROPERTY_FIELD, PROPERTY_FIELD_ENABLED, PROPERTY_POPUP_BUTTON_ENABLED, PROPERTY_POPUP_BUTTON_ICON, PROPERTY_POPUP_BUTTON_TEXT, PROPERTY_POPUP_BUTTON_TOOLTIP_TEXT, PROPERTY_POPUP_PANEL, PROPERTY_TOOLTIP_TEXT
 
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.Container
 
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
DateField()
          Constructs the Date Field with default Locale
DateField(java.util.Locale aLocale)
          Constructs the Date Field with specified Locale
 
Method Summary
 void addActionListener(java.awt.event.ActionListener aListener)
          Adds action listener
 void addCalendarDateListener(CalendarDateListener aListener)
          Adds Calendar Date listener
 void addCalendarDayRendererListener(CalendarDayRendererListener aListener)
          Adds Calendar's day renderer listener
 void addCalendarListener(CalendarListener aListener)
          Adds Date Field's listener
protected  void beforeShowPopup()
           
 void dateChanged(CalendarEvent anEvent)
          Catches date is changed event from the MonthCalendarPanel and forwards it to the methods fireDateChanged
 void dateSelected(CalendarEvent anEvent)
          Catches date is selected event from the MonthCalendarPanel, processes and forwards it to the methods fireDateSelected
protected  void fireDateChanged(java.util.Date aOldDate, java.util.Date aNewDate)
          Fires date is changed event
protected  void fireDateSelected()
          Fires date is selected event
protected  void fireLocaleChanged(java.util.Locale aLocale, java.util.Date aDate)
          Fires locale is changed event
 java.lang.String getAbout()
           
 java.awt.Color getBackground()
          Returns MonthCalendarPanel's background Color
 MonthCalendarPanel getCalendar()
          Returns the MonthCalendarPanel
 CalendarController getCalendarController()
          Returns MonthCalendarPanel's CalendarController
 CalendarDayRenderer getCalendarDayRenderer()
          Returns MonthCalendarPanel's CalendarDayRenderer
 java.util.Date getDate()
          Returns selected Date
 int getDayOfMonth()
          Returns selected/entered day of month
 DateDocument getDocument()
          Gets the date field's Document
 java.awt.Color getForeground()
          Returns MonthCalendarPanel's foreground Color
 java.awt.Color getGridColor()
           
 java.awt.Color getHeaderForeground()
          Returns MonthCalendarPanel's header (names of the days of the week) foreground Color
 java.util.Locale getLocale()
          Returns Calendar's Locale
 int getMonth()
          Returns selected/entered month number (0 - 11)
 java.awt.Color getOffMonthWeekdayBackground()
          Returns off-month weekday background Color in the MonthCalendarPanel
 java.awt.Color getOffMonthWeekdayForeground()
          Returns off-month weekday foreground Color in the MonthCalendarPanel
 java.awt.Color getOffMonthWeekendBackground()
          Returns off-month weekend background Color in the MonthCalendarPanel
 java.awt.Color getOffMonthWeekendForeground()
          Returns off-month weekday background Color in the MonthCalendarPanel
 javax.swing.KeyStroke getPopupCalendarHotKey()
          Returns hot key for popup CalendarPanel
 java.awt.Dimension getPreferredSize()
           
 java.awt.Color getTodayBorderColor()
          Returns Calendar's today's date border Color in the MonthCalendarPanel
 int getTodayBorderThickness()
          Returns Calendar's today's date border thickness in the MonthCalendarPanel
 java.awt.Color getWeekendBackground()
          Returns current month's weekend background Color in the MonthCalendarPanel
 java.awt.Color getWeekendForeground()
          Returns current month's weekend foreground Color in the MonthCalendarPanel
 int getYear()
          Returns selected/entered year
 int getYearDigitsAmount()
          Gets the year digits amount
 boolean isAllowSelectOffMonthDays()
          Returns true if off-month days can be selected in the MonthCalendarPanel
 boolean isPreserveCurrentDate()
          Returns true if the current date should be preserved
 boolean isShortDayCaption()
          Returns true if short day caption is shown in the MonthCalendarPanel
 boolean isShowGrid()
          Returns true if the Calendar draws grid around days in the MonthCalendarPanel
 boolean isShowHorizontalLines()
          Returns true if the Calendar draws horizontal lines between days in the MonthCalendarPanel
 boolean isShowOffMonthDays()
          Returns true if off-month days are shown in the MonthCalendarPanel
 boolean isShowVerticalLines()
          Returns true if the Calendar draws vertical lines between days in the MonthCalendarPanel
 void localeChanged(CalendarInterface aSource, java.util.Locale aLocale, java.util.Date aDate)
          Catches locale is changed event from the table model and delegates it to the method fireLocaleChanged
 void propertyChange(java.beans.PropertyChangeEvent anEvent)
           
 void removeActionListener(java.awt.event.ActionListener aListener)
          Removes action listener
 void removeCalendarDateListener(CalendarDateListener aListener)
          Removes Calendar Date listener
 void removeCalendarDayRendererListener(CalendarDayRendererListener aListener)
          Removes Calendar's day renderer listener
 void removeCalendarListener(CalendarListener aListener)
          Removes Date Field's listener
 void setAbout(java.lang.String aAbout)
           
 void setAllowSelectOffMonthDays(boolean aFlag)
          Sets whether off-month days can be selected in the MonthCalendarPanel
 void setBackground(java.awt.Color aColor)
          Sets MonthCalendarPanel's background Color
 void setCalendarController(CalendarController aCalendarControler)
          Sets the CalendarController in the MonthCalendarPanel
 void setCalendarDayRenderer(CalendarDayRenderer aCalendarDayRenderer)
          Sets the CalendarDayRenderer in the MonthCalendarPanel
protected  void setCaretPosition()
          Sets caret position in the date field to 0
 void setDate(java.util.Date aDate)
          Sets a new Date
 void setForeground(java.awt.Color aColor)
          Sets MonthCalendarPanel's foreground Color
 void setGridColor(java.awt.Color gridColor)
           
 void setHeaderForeground(java.awt.Color aHeaderForeground)
          Sets MonthCalendarPanel's header (names of the days of the week) foreground Color
 void setLocale(java.util.Locale aLocale)
          Sets a new Calendar's Locale
 void setOffMonthWeekdayBackground(java.awt.Color anOffMonthWeekdayBackground)
          Sets off-month weekday background Color in the MonthCalendarPanel
 void setOffMonthWeekdayForeground(java.awt.Color anOffMonthWeekdayForeground)
          Sets off-month weekday foreground Color in the MonthCalendarPanel
 void setOffMonthWeekendBackground(java.awt.Color anOffMonthWeekendBackground)
          Sets off-month weekend background Color in the MonthCalendarPanel
 void setOffMonthWeekendForeground(java.awt.Color anOffMonthWeekendForeground)
          Sets off-month weekend foreground Color in the MonthCalendarPanel
 void setPopupCalendarHotKey(javax.swing.KeyStroke aKeyStroke)
          Assigns a new hot key for the popup MonthCalendarPanel
 void setPreserveCurrentDate(boolean aFlag)
          Sets true if the current date should be preserved
 void setShortDayCaption(boolean aShortDayCaption)
          Sets whether short day caption should be shown in the MonthCalendarPanel
 void setShowGrid(boolean aFlag)
          Sets whether the Calendar draws grid lines around cells in the MonthCalendarPanel
 void setShowHorizontalLines(boolean aFlag)
          Sets whether the Calendar draws horizontal lines between days in the MonthCalendarPanel
 void setShowOffMonthDays(boolean aFlag)
          Sets whether off-month days should be shown in the MonthCalendarPanel
 void setShowVerticalLines(boolean aFlag)
          Sets whether the Calendar draws vertical lines between days in the MonthCalendarPanel
 void setTodayBorderColor(java.awt.Color aColor)
          Sets Calendar's today's date border Color in the MonthCalendarPanel
 void setTodayBorderThickness(int aThickness)
          Sets Calendar's today's date border thickness in the MonthCalendarPanel
 void setWeekendBackground(java.awt.Color aWeekendBackground)
          Sets current month's weekend background Color in the MonthCalendarPanel
 void setWeekendForeground(java.awt.Color aWeekendForeground)
          Sets current month's weekend foreground Color in the MonthCalendarPanel
 void setYearDigitsAmount(int aYearDigitsAmount)
          Sets the year digits amount
 
Methods inherited from class dev.gui.field.PopupField
btnPopup_actionPerformed, fieldFocusGained, getField, getPopupButton, getPopupButtonIcon, getPopupButtonText, getPopupButtonToolTipText, getPopupPanel, getToolTipText, initPopup, isEnabled, isFieldEnabled, isPopupButtonEnabled, requestFocus, setEnabled, setField, setFieldEnabled, setPopupButtonEnabled, setPopupButtonIcon, setPopupButtonText, setPopupButtonToolTipText, setPopupPanel, setToolTipText
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, 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, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, 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, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFont, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, 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, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, 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, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROPERTY_YEAR_DIGITS_AMOUNT

public static final java.lang.String PROPERTY_YEAR_DIGITS_AMOUNT
Property name for the yearDigitsAmount property

See Also:
Constant Field Values

PROPERTY_POPUP_HOTKEY

public static final java.lang.String PROPERTY_POPUP_HOTKEY
Property name for the popupHotKey property

See Also:
Constant Field Values

DEFAULT_POPUP_CALENDAR_HOT_KEY

public static final javax.swing.KeyStroke DEFAULT_POPUP_CALENDAR_HOT_KEY
Default hot key to popup the MonthCalendarPanel (Down Arrow)


POPUP_CALENDAR_ACTION_NAME

protected static final java.lang.String POPUP_CALENDAR_ACTION_NAME
See Also:
Constant Field Values

TODAY

protected static java.util.Date TODAY

fLocale

protected java.util.Locale fLocale

fDateDocument

protected DateDocument fDateDocument

fOldDate

protected java.util.Date fOldDate
Constructor Detail

DateField

public DateField()
Constructs the Date Field with default Locale


DateField

public DateField(java.util.Locale aLocale)
Constructs the Date Field with specified Locale

Parameters:
aLocale - the Locale
Method Detail

getGridColor

public java.awt.Color getGridColor()

setGridColor

public void setGridColor(java.awt.Color gridColor)

beforeShowPopup

protected void beforeShowPopup()

getCalendar

public MonthCalendarPanel getCalendar()
Returns the MonthCalendarPanel

Returns:
the MonthCalendarPanel

getDocument

public DateDocument getDocument()
Gets the date field's Document

Returns:
the date field's Document
See Also:
DateDocument

getYearDigitsAmount

public int getYearDigitsAmount()
Gets the year digits amount

Returns:
the year digits amount
See Also:
DateDocument.setYearDigitsAmount(int), DateDocument.getYearDigitsAmount()

setYearDigitsAmount

public void setYearDigitsAmount(int aYearDigitsAmount)
Sets the year digits amount

Parameters:
aYearDigitsAmount - the year digits amount
Throws:
java.lang.IllegalArgumentException
See Also:
DateDocument.setYearDigitsAmount(int)

getPopupCalendarHotKey

public javax.swing.KeyStroke getPopupCalendarHotKey()
Returns hot key for popup CalendarPanel

Returns:
hot key for popup CalendarPanel

setPopupCalendarHotKey

public void setPopupCalendarHotKey(javax.swing.KeyStroke aKeyStroke)
Assigns a new hot key for the popup MonthCalendarPanel

Parameters:
aKeyStroke - a new hot key

getDate

public java.util.Date getDate()
Returns selected Date

Specified by:
getDate in interface CalendarInterface
Returns:
selected Date

setDate

public final void setDate(java.util.Date aDate)
Sets a new Date

Specified by:
setDate in interface CalendarInterface
Parameters:
aDate - a new Date

getLocale

public java.util.Locale getLocale()
Returns Calendar's Locale

Specified by:
getLocale in interface CalendarInterface
Returns:
Calendar's Locale

setLocale

public void setLocale(java.util.Locale aLocale)
Sets a new Calendar's Locale

Specified by:
setLocale in interface CalendarInterface
Parameters:
aLocale - a new Calendar's Locale

getBackground

public java.awt.Color getBackground()
Returns MonthCalendarPanel's background Color

Specified by:
getBackground in interface CalendarInterface
Returns:
MonthCalendarPanel's background Color

setBackground

public void setBackground(java.awt.Color aColor)
Sets MonthCalendarPanel's background Color

Specified by:
setBackground in interface CalendarInterface
Parameters:
aColor - background Color

getForeground

public java.awt.Color getForeground()
Returns MonthCalendarPanel's foreground Color

Specified by:
getForeground in interface CalendarInterface
Returns:
MonthCalendarPanel's foreground Color

setForeground

public void setForeground(java.awt.Color aColor)
Sets MonthCalendarPanel's foreground Color

Specified by:
setForeground in interface CalendarInterface
Parameters:
aColor - foreground Color

getCalendarController

public CalendarController getCalendarController()
Returns MonthCalendarPanel's CalendarController

Specified by:
getCalendarController in interface CalendarInterface
Returns:
MonthCalendarPanel's CalendarController

getCalendarDayRenderer

public CalendarDayRenderer getCalendarDayRenderer()
Returns MonthCalendarPanel's CalendarDayRenderer

Specified by:
getCalendarDayRenderer in interface CalendarInterface
Returns:
MonthCalendarPanel's CalendarDayRenderer

getDayOfMonth

public int getDayOfMonth()
Returns selected/entered day of month

Specified by:
getDayOfMonth in interface CalendarInterface
Returns:
selected/entered day of month

getMonth

public int getMonth()
Returns selected/entered month number (0 - 11)

Specified by:
getMonth in interface CalendarInterface
Returns:
selected/entered month number

getYear

public int getYear()
Returns selected/entered year

Specified by:
getYear in interface CalendarInterface
Returns:
selected/entered year

getHeaderForeground

public java.awt.Color getHeaderForeground()
Returns MonthCalendarPanel's header (names of the days of the week) foreground Color

Specified by:
getHeaderForeground in interface CalendarInterface
Returns:
MonthCalendarPanel's header foreground Color

isShowOffMonthDays

public boolean isShowOffMonthDays()
Returns true if off-month days are shown in the MonthCalendarPanel

Specified by:
isShowOffMonthDays in interface CalendarInterface
Returns:
true if off-month days are shown
See Also:
CalendarInterface.setShowOffMonthDays(boolean)

setShowOffMonthDays

public void setShowOffMonthDays(boolean aFlag)
Sets whether off-month days should be shown in the MonthCalendarPanel

Specified by:
setShowOffMonthDays in interface CalendarInterface
Parameters:
aFlag - true if off-month days should be shown
See Also:
CalendarInterface.setAllowSelectOffMonthDays(boolean)

isAllowSelectOffMonthDays

public boolean isAllowSelectOffMonthDays()
Returns true if off-month days can be selected in the MonthCalendarPanel

Specified by:
isAllowSelectOffMonthDays in interface CalendarInterface
Returns:
true if off-month days can be selected
See Also:
CalendarInterface.setAllowSelectOffMonthDays(boolean)

setAllowSelectOffMonthDays

public void setAllowSelectOffMonthDays(boolean aFlag)
Sets whether off-month days can be selected in the MonthCalendarPanel

Specified by:
setAllowSelectOffMonthDays in interface CalendarInterface
Parameters:
aFlag - true if off-month days can be selected
See Also:
CalendarInterface.setShowOffMonthDays(boolean)

getOffMonthWeekdayForeground

public java.awt.Color getOffMonthWeekdayForeground()
Returns off-month weekday foreground Color in the MonthCalendarPanel

Specified by:
getOffMonthWeekdayForeground in interface CalendarInterface
Returns:
off-month weekday foreground Color

getOffMonthWeekendForeground

public java.awt.Color getOffMonthWeekendForeground()
Returns off-month weekday background Color in the MonthCalendarPanel

Specified by:
getOffMonthWeekendForeground in interface CalendarInterface
Returns:
off-month weekday background Color

getWeekendForeground

public java.awt.Color getWeekendForeground()
Returns current month's weekend foreground Color in the MonthCalendarPanel

Specified by:
getWeekendForeground in interface CalendarInterface
Returns:
current month's weekend foreground Color

isShortDayCaption

public boolean isShortDayCaption()
Returns true if short day caption is shown in the MonthCalendarPanel

Specified by:
isShortDayCaption in interface CalendarInterface
Returns:
true if short day caption is shown
See Also:
CalendarInterface.setShortDayCaption(boolean)

isShowGrid

public boolean isShowGrid()
Returns true if the Calendar draws grid around days in the MonthCalendarPanel

Specified by:
isShowGrid in interface CalendarInterface
Returns:
true if the Calendar draws grid around days

isShowHorizontalLines

public boolean isShowHorizontalLines()
Returns true if the Calendar draws horizontal lines between days in the MonthCalendarPanel

Specified by:
isShowHorizontalLines in interface CalendarInterface
Returns:
true if the Calendar draws horizontal lines between days

isShowVerticalLines

public boolean isShowVerticalLines()
Returns true if the Calendar draws vertical lines between days in the MonthCalendarPanel

Specified by:
isShowVerticalLines in interface CalendarInterface
Returns:
true if the table draws vertical lines between days

setCalendarController

public void setCalendarController(CalendarController aCalendarControler)
Sets the CalendarController in the MonthCalendarPanel

Specified by:
setCalendarController in interface CalendarInterface
Parameters:
aCalendarControler - the CalendarController
See Also:
CalendarController

setCalendarDayRenderer

public void setCalendarDayRenderer(CalendarDayRenderer aCalendarDayRenderer)
Sets the CalendarDayRenderer in the MonthCalendarPanel

Specified by:
setCalendarDayRenderer in interface CalendarInterface
Parameters:
aCalendarDayRenderer - CalendarDayRenderer
See Also:
CalendarDayRenderer

setHeaderForeground

public void setHeaderForeground(java.awt.Color aHeaderForeground)
Sets MonthCalendarPanel's header (names of the days of the week) foreground Color

Specified by:
setHeaderForeground in interface CalendarInterface
Parameters:
aHeaderForeground - MonthCalendarPanel's header foreground Color

setOffMonthWeekdayForeground

public void setOffMonthWeekdayForeground(java.awt.Color anOffMonthWeekdayForeground)
Sets off-month weekday foreground Color in the MonthCalendarPanel

Specified by:
setOffMonthWeekdayForeground in interface CalendarInterface
Parameters:
anOffMonthWeekdayForeground - off-month weekday foreground Color

setOffMonthWeekendForeground

public void setOffMonthWeekendForeground(java.awt.Color anOffMonthWeekendForeground)
Sets off-month weekend foreground Color in the MonthCalendarPanel

Specified by:
setOffMonthWeekendForeground in interface CalendarInterface
Parameters:
anOffMonthWeekendForeground - off-month weekend foreground Color

getOffMonthWeekdayBackground

public java.awt.Color getOffMonthWeekdayBackground()
Returns off-month weekday background Color in the MonthCalendarPanel

Specified by:
getOffMonthWeekdayBackground in interface CalendarInterface
Returns:
off-month weekday background Color

setOffMonthWeekdayBackground

public void setOffMonthWeekdayBackground(java.awt.Color anOffMonthWeekdayBackground)
Sets off-month weekday background Color in the MonthCalendarPanel

Specified by:
setOffMonthWeekdayBackground in interface CalendarInterface
Parameters:
anOffMonthWeekdayBackground - off-month weekday background Color

getOffMonthWeekendBackground

public java.awt.Color getOffMonthWeekendBackground()
Returns off-month weekend background Color in the MonthCalendarPanel

Specified by:
getOffMonthWeekendBackground in interface CalendarInterface
Returns:
off-month weekend background Color

setOffMonthWeekendBackground

public void setOffMonthWeekendBackground(java.awt.Color anOffMonthWeekendBackground)
Sets off-month weekend background Color in the MonthCalendarPanel

Specified by:
setOffMonthWeekendBackground in interface CalendarInterface
Parameters:
anOffMonthWeekendBackground - off-month weekend background Color

setShortDayCaption

public void setShortDayCaption(boolean aShortDayCaption)
Sets whether short day caption should be shown in the MonthCalendarPanel

Specified by:
setShortDayCaption in interface CalendarInterface
Parameters:
aShortDayCaption - true if short day caption should be shown

setShowGrid

public void setShowGrid(boolean aFlag)
Sets whether the Calendar draws grid lines around cells in the MonthCalendarPanel

Specified by:
setShowGrid in interface CalendarInterface
Parameters:
aFlag - true if the Calendar should draw grid lines
See Also:
CalendarInterface.setShowVerticalLines(boolean), CalendarInterface.setShowHorizontalLines(boolean)

setShowHorizontalLines

public void setShowHorizontalLines(boolean aFlag)
Sets whether the Calendar draws horizontal lines between days in the MonthCalendarPanel

Specified by:
setShowHorizontalLines in interface CalendarInterface
Parameters:
aFlag - true if the Calendar view should draw horizontal lines
See Also:
CalendarInterface.setShowGrid(boolean)

setShowVerticalLines

public void setShowVerticalLines(boolean aFlag)
Sets whether the Calendar draws vertical lines between days in the MonthCalendarPanel

Specified by:
setShowVerticalLines in interface CalendarInterface
Parameters:
aFlag - true if the Calendar view should draw vertical lines
See Also:
CalendarInterface.setShowGrid(boolean)

setWeekendForeground

public void setWeekendForeground(java.awt.Color aWeekendForeground)
Sets current month's weekend foreground Color in the MonthCalendarPanel

Specified by:
setWeekendForeground in interface CalendarInterface
Parameters:
aWeekendForeground - current month's weekend foreground Color

getWeekendBackground

public java.awt.Color getWeekendBackground()
Returns current month's weekend background Color in the MonthCalendarPanel

Specified by:
getWeekendBackground in interface CalendarInterface
Returns:
current month's weekend background Color

setWeekendBackground

public void setWeekendBackground(java.awt.Color aWeekendBackground)
Sets current month's weekend background Color in the MonthCalendarPanel

Specified by:
setWeekendBackground in interface CalendarInterface
Parameters:
aWeekendBackground - current month's weekend background Color

getTodayBorderThickness

public int getTodayBorderThickness()
Returns Calendar's today's date border thickness in the MonthCalendarPanel

Specified by:
getTodayBorderThickness in interface CalendarInterface
Returns:
Calendar's today's date border thickness

setTodayBorderThickness

public void setTodayBorderThickness(int aThickness)
Sets Calendar's today's date border thickness in the MonthCalendarPanel

Specified by:
setTodayBorderThickness in interface CalendarInterface
Parameters:
aThickness - Calendar's today's date border thickness

getTodayBorderColor

public java.awt.Color getTodayBorderColor()
Returns Calendar's today's date border Color in the MonthCalendarPanel

Specified by:
getTodayBorderColor in interface CalendarInterface
Returns:
Calendar's today's date border Color

setTodayBorderColor

public void setTodayBorderColor(java.awt.Color aColor)
Sets Calendar's today's date border Color in the MonthCalendarPanel

Specified by:
setTodayBorderColor in interface CalendarInterface
Parameters:
aColor - Calendar's today's date border Color

isPreserveCurrentDate

public boolean isPreserveCurrentDate()
Returns true if the current date should be preserved

Specified by:
isPreserveCurrentDate in interface CalendarInterface
Returns:
true if the current date should be preserved
See Also:
CalendarInterface.setPreserveCurrentDate(boolean)

setPreserveCurrentDate

public void setPreserveCurrentDate(boolean aFlag)
Sets true if the current date should be preserved

Specified by:
setPreserveCurrentDate in interface CalendarInterface
Parameters:
aFlag - true if the current date should be preserved.

getAbout

public java.lang.String getAbout()

setAbout

public void setAbout(java.lang.String aAbout)

setCaretPosition

protected void setCaretPosition()
Sets caret position in the date field to 0


dateChanged

public void dateChanged(CalendarEvent anEvent)
Catches date is changed event from the MonthCalendarPanel and forwards it to the methods fireDateChanged

Specified by:
dateChanged in interface CalendarListener
Parameters:
anEvent - the CalendarEvent

dateSelected

public void dateSelected(CalendarEvent anEvent)
Catches date is selected event from the MonthCalendarPanel, processes and forwards it to the methods fireDateSelected

Specified by:
dateSelected in interface CalendarListener
Parameters:
anEvent - the CalendarEvent

localeChanged

public void localeChanged(CalendarInterface aSource,
                          java.util.Locale aLocale,
                          java.util.Date aDate)
Catches locale is changed event from the table model and delegates it to the method fireLocaleChanged

Specified by:
localeChanged in interface CalendarListener
Parameters:
aSource - the source of the event
aLocale - the new Locale
aDate - the current Date

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent anEvent)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener

fireDateChanged

protected void fireDateChanged(java.util.Date aOldDate,
                               java.util.Date aNewDate)
Fires date is changed event

Parameters:
aOldDate - old Date
aNewDate - new Date

fireDateSelected

protected void fireDateSelected()
Fires date is selected event


fireLocaleChanged

protected void fireLocaleChanged(java.util.Locale aLocale,
                                 java.util.Date aDate)
Fires locale is changed event

Parameters:
aLocale - new Locale
aDate - current Date

addCalendarListener

public void addCalendarListener(CalendarListener aListener)
Adds Date Field's listener

Specified by:
addCalendarListener in interface CalendarInterface
Parameters:
aListener - Date Field's listener

removeCalendarListener

public void removeCalendarListener(CalendarListener aListener)
Removes Date Field's listener

Specified by:
removeCalendarListener in interface CalendarInterface
Parameters:
aListener - Date Field's listener

addCalendarDayRendererListener

public void addCalendarDayRendererListener(CalendarDayRendererListener aListener)
Adds Calendar's day renderer listener

Specified by:
addCalendarDayRendererListener in interface CalendarInterface
Parameters:
aListener - Calendar's day renderer listener

removeCalendarDayRendererListener

public void removeCalendarDayRendererListener(CalendarDayRendererListener aListener)
Removes Calendar's day renderer listener

Specified by:
removeCalendarDayRendererListener in interface CalendarInterface
Parameters:
aListener - Calendar's day renderer listener

addCalendarDateListener

public void addCalendarDateListener(CalendarDateListener aListener)
Adds Calendar Date listener

Specified by:
addCalendarDateListener in interface CalendarInterface
Parameters:
aListener - Calendar Date listener

removeCalendarDateListener

public void removeCalendarDateListener(CalendarDateListener aListener)
Removes Calendar Date listener

Specified by:
removeCalendarDateListener in interface CalendarInterface
Parameters:
aListener - Calendar Date listener

addActionListener

public void addActionListener(java.awt.event.ActionListener aListener)
Adds action listener

Specified by:
addActionListener in interface CalendarInterface
Parameters:
aListener - action listener

removeActionListener

public void removeActionListener(java.awt.event.ActionListener aListener)
Removes action listener

Specified by:
removeActionListener in interface CalendarInterface
Parameters:
aListener - action listener

getPreferredSize

public java.awt.Dimension getPreferredSize()