com.jp.comp.calendar
Class MultipleMonthCalendarPanel

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended bycom.jp.comp.calendar.CalendarAdapter
                      extended bycom.jp.comp.calendar.MultipleMonthCalendarPanel
All Implemented Interfaces:
javax.accessibility.Accessible, CalendarDayRendererListener, CalendarInterface, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.Serializable

public class MultipleMonthCalendarPanel
extends CalendarAdapter
implements CalendarDayRendererListener, java.beans.PropertyChangeListener

MultipleMonthCalendarPanel is similar to MonthCalendarPanel, but allows showing as many months as required

See Also:
Serialized Form

Nested Class Summary
 
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
protected  boolean fCalendarAdjusting
           
protected  MultipleMonthCalendarController fCalendarController
           
protected  MultipleMonthCalendarDayRenderer fCalendarDayRenderer
           
protected  int fCalendarsAmount
           
protected  SingleCalendarPanel fCurrentCalendar
           
protected  boolean fMonthNavigatorVisible
           
protected  int fRows
           
protected  boolean fShowBottomDelimiter
           
protected  boolean fWeekNavigatorVisible
           
protected  boolean fYearNavigatorVisible
           
protected  java.awt.GridLayout gridLayout
           
protected  javax.swing.JPanel pnlCalendars
           
protected  CalendarControlPanel pnlControl
           
static java.lang.String PROPERTY_CALENDARS_AMOUNT
          Property name for the calendarsAmount property
static java.lang.String PROPERTY_FIRST_MONTH
          Property name for the firstMonth property
static java.lang.String PROPERTY_ROWS
          Property name for the rows property
static java.lang.String PROPERTY_SHOW_BOTTOM_DELIMITER
          Property name for the showBottomDelimiter property
 
Fields inherited from class com.jp.comp.calendar.CalendarAdapter
fActionListeners, fAllowSelectOffMonthDays, fCalendarDateListeners, fCalendarDayRendererListeners, fCalendarListeners, fLocale, fShowOffMonthDays, fSynchronizeSetDate, PROPERTY_ALLOW_SELECT_OFFMONTH_DAYS, PROPERTY_SHOW_OFFMONTH_DAYS
 
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
MultipleMonthCalendarPanel()
          Constructs the Calendar with default Locale
MultipleMonthCalendarPanel(int aCalendarsAmount)
          Constructs the Calendar with default Locale and specified Calendars amount
MultipleMonthCalendarPanel(int aCalendarsAmount, int aRows)
          Constructs the Calendar with default Locale and specified Calendars and rows amount
MultipleMonthCalendarPanel(java.util.Locale aLocale)
          Constructs the Calendar with specified Locale and fourth Calendars
MultipleMonthCalendarPanel(java.util.Locale aLocale, int aCalendarsAmount)
          Constructs the Calendar with specified Locale and Calendars amount
MultipleMonthCalendarPanel(java.util.Locale aLocale, int aCalendarsAmount, int aRows)
          Constructs the Calendar with specified Locale and Calendars and rows amount
 
Method Summary
protected  void buildCalendarPanel()
          Builds the MultipleMonthCalendarPanel using Calendars and rows amount
 void dateChanged(CalendarEvent anEvent)
          Catches date is changed events from SingleCalendarPanels and forwards them to the method fireDateChanged
protected  void dateSelected()
          Invoked when OK button click is performed to fire dateSelected event
 void dateSelected(CalendarEvent anEvent)
          Catches date is selected events from SingleCalendarPanels and forwards them to the methods fireDateSelected and fireActionPerformed
protected  void evaluateParameters()
          Evaluates Calendars amount and rows parameters to calculate the columns value and valid ration between Calendars amount, rows and columns
 java.lang.String getAbout()
           
 CalendarController getCalendarController()
          Returns the CalendarController
 CalendarDayRenderer getCalendarDayRenderer()
          Returns the CalendarDayRenderer
 int getCalendarsAmount()
          Returns Calendars amount
 java.awt.Color getCaptionForeground()
          Returns caption's foreground Color
 CalendarPanel getCurrentCalendar()
          Returns selected SingleCalendarPanel
 java.util.Date getDate()
          Returns selected Date
 int getDayOfMonth()
          Returns selected day of month
 int getFirstMonth()
          Returns month number from the first SingleCalendarPanel
 java.awt.Color getGridColor()
           
 java.awt.Color getHeaderForeground()
          Returns Calendar's header (names of the days of the week) foreground Color
 java.util.Locale getLocale()
          Returns Calendar's Locale
 int getMonth()
          Returns selected month number (0 - 11)
 java.awt.Color getOffMonthWeekdayBackground()
          Returns off-month weekday background Color
 java.awt.Color getOffMonthWeekdayForeground()
          Returns off-month weekday foreground Color
 java.awt.Color getOffMonthWeekendBackground()
          Returns off-month weekend background Color
 java.awt.Color getOffMonthWeekendForeground()
          Returns off-month weekend foreground Color
 int getRows()
          Returns rows amount
 java.awt.Color getTodayBorderColor()
          Returns Calendar's today's date border Color
 int getTodayBorderThickness()
          Returns Calendar's today's date border thickness
 java.awt.Color getWeekendBackground()
          Returns current month's weekend background Color
 java.awt.Color getWeekendForeground()
          Returns current month's weekend foreground Color
 int getYear()
          Returns selected year
protected  boolean isCalendarAdjusting()
           
 boolean isEnabled()
          Returns whether this component is enabled
protected  boolean isFirstCalendar(CalendarPanel aCalendarPanel)
          Checks is aCalendarPanel first in MultipleMonthCalendarPanel
protected  boolean isLastCalendar(CalendarPanel aCalendarPanel)
          Checks is aCalendarPanel last in MultipleMonthCalendarPanel
 boolean isMonthNavigatorVisible()
          Returns whether Month Navigation buttons is visible
 boolean isOkButtonVisible()
          Returns whether OK button is visible
 boolean isPreserveCurrentDate()
          Returns true if the current date should be preserved
 boolean isShortDayCaption()
          Returns true if short day caption is shown
 boolean isShowBottomDelimiter()
          Gets whether to show bottom delimiter
 boolean isShowGrid()
          Returns true if the Calendar draws grid around days
 boolean isShowHorizontalLines()
          Returns true if the Calendar draws horizontal lines between days
 boolean isShowVerticalLines()
          Returns true if the Calendar draws vertical lines between days
 boolean isTodayButtonVisible()
          Returns whether Today button is visible
 boolean isWeekNavigatorVisible()
          Returns whether Week Navigation buttons is visible
 boolean isYearNavigatorVisible()
          Returns whether Week Navigation buttons is visible
 void localeChanged(CalendarInterface aSource, java.util.Locale aLocale, java.util.Date aDate)
           
 void onCalendarDayRenderer(CalendarInterface aSource, java.util.Date aDate, java.awt.Component aRendererComponent)
          Catches on calendar day renderer events from SingleCalendarPanels and forwards them to the method fireOnRendererCalendarDay
 void propertyChange(java.beans.PropertyChangeEvent anEvent)
           
 void requestFocus()
           
 void setAbout(java.lang.String aAbout)
           
 void setAllowSelectOffMonthDays(boolean aFlag)
          Sets whether off-month days can be selected
 void setBackground(java.awt.Color aBackground)
          Sets Calendar's background Color
 void setCalendarController(CalendarController aCalendarControler)
          Sets the CalendarController
 void setCalendarDayRenderer(CalendarDayRenderer aCalendarDayRenderer)
          Sets the CalendarDayRenderer
 void setCalendarsAmount(int aCalendarsAmount)
          Sets theCalendars amount.
 void setCaptionForeground(java.awt.Color aCaptionForeground)
          Sets caption's foreground Color.
protected  void setCurrentCalendar(java.util.Date aDate, boolean anIgnoreFirstMonth)
          Finds and sets current calendar which equals to a new date.
 void setDate(java.util.Date aDate)
          Sets a new Date
protected  void setDate(java.util.Date aDate, boolean anIgnoreFirstMonth)
          Sets a new Date
 void setEnabled(boolean aFlag)
          Sets this component accessibility
 void setFirstMonth(int aMonth)
          Sets first SingleCalendarPanel with speciifed month
 void setForeground(java.awt.Color aForeground)
          Sets Calendar's foreground Color
 void setGridColor(java.awt.Color gridColor)
           
 void setHeaderForeground(java.awt.Color aHeaderForeground)
          Sets Calendar's header (names of the days of the week) foreground Color
 void setLocale(java.util.Locale aLocale)
          Sets a new Calendar's Locale
 void setMonthNavigatorVisible(boolean aFlag)
          Sets Month Navigation buttons' visibility
 void setOffMonthWeekdayBackground(java.awt.Color anOffMonthWeekdayBackground)
          Sets off-month weekday background Color
 void setOffMonthWeekdayForeground(java.awt.Color anOffMonthWeekdayForeground)
          Sets off-month weekday foreground Color
 void setOffMonthWeekendBackground(java.awt.Color anOffMonthWeekendBackground)
          Sets off-month weekend background Color
 void setOffMonthWeekendForeground(java.awt.Color anOffMonthWeekendForeground)
          Sets off-month weekend foreground Color
 void setOkButtonVisible(boolean aFlag)
          Sets OK button's visibility
 void setPreserveCurrentDate(boolean aFlag)
          Sets true if the current date should be preserved
 void setRows(int aRows)
          Sets the rows amount
 void setShortDayCaption(boolean aShortDayCaption)
          Sets whether short day caption should be shown
 void setShowBottomDelimiter(boolean aShowBottomDelimiter)
          Sets whether to show bottom delimiter
 void setShowGrid(boolean aFlag)
          Sets whether the Calendar draws grid lines around cells
 void setShowHorizontalLines(boolean aFlag)
          Sets whether the Calendar draws horizontal lines between days
 void setShowVerticalLines(boolean aFlag)
          Sets whether the Calendar draws vertical lines between days
 void setTodayBorderColor(java.awt.Color aColor)
          Sets Calendar's today's date border Color
 void setTodayBorderThickness(int aThickness)
          Sets Calendar's today's date border thickness
 void setTodayButtonVisible(boolean aFlag)
          Sets Today button's visibility
 void setWeekendBackground(java.awt.Color aWeekendBackground)
          Sets current month's weekend background Color
 void setWeekendForeground(java.awt.Color aWeekendForeground)
          Sets current month's weekend foreground Color
 void setWeekNavigatorVisible(boolean aFlag)
          Sets Week Navigation buttons' visibility
 void setYearNavigatorVisible(boolean aFlag)
          Sets Week Navigation buttons' visibility
protected  void updateCalendars(CalendarPanel aCalendarPanel)
          Updates the date of all Calendars starting from aCalendarPanel
protected  void updateDelimiter()
          Updates delemiter (line) dividing the Calendar from the bottom decoration panel
 void updateUI()
           
 
Methods inherited from class com.jp.comp.calendar.CalendarAdapter
aboutToChangeDate, addActionListener, addCalendarDateListener, addCalendarDayRendererListener, addCalendarListener, fireAboutToChangeDate, fireActionPerformed, fireDateChanged, fireDateSelected, fireLocaleChanged, fireOnCalendarDayRenderer, isAllowSelectOffMonthDays, isShowOffMonthDays, removeActionListener, removeCalendarDateListener, removeCalendarDayRendererListener, removeCalendarListener, setShowOffMonthDays
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI
 
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, 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, 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, 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
 
Methods inherited from interface com.jp.comp.calendar.CalendarInterface
getBackground, getForeground
 

Field Detail

PROPERTY_SHOW_BOTTOM_DELIMITER

public static final java.lang.String PROPERTY_SHOW_BOTTOM_DELIMITER
Property name for the showBottomDelimiter property

See Also:
Constant Field Values

PROPERTY_CALENDARS_AMOUNT

public static final java.lang.String PROPERTY_CALENDARS_AMOUNT
Property name for the calendarsAmount property

See Also:
Constant Field Values

PROPERTY_ROWS

public static final java.lang.String PROPERTY_ROWS
Property name for the rows property

See Also:
Constant Field Values

PROPERTY_FIRST_MONTH

public static final java.lang.String PROPERTY_FIRST_MONTH
Property name for the firstMonth property

See Also:
Constant Field Values

gridLayout

protected java.awt.GridLayout gridLayout

pnlCalendars

protected javax.swing.JPanel pnlCalendars

pnlControl

protected CalendarControlPanel pnlControl

fCalendarsAmount

protected int fCalendarsAmount

fRows

protected int fRows

fCurrentCalendar

protected SingleCalendarPanel fCurrentCalendar

fCalendarController

protected MultipleMonthCalendarController fCalendarController

fCalendarDayRenderer

protected MultipleMonthCalendarDayRenderer fCalendarDayRenderer

fCalendarAdjusting

protected boolean fCalendarAdjusting

fWeekNavigatorVisible

protected boolean fWeekNavigatorVisible

fMonthNavigatorVisible

protected boolean fMonthNavigatorVisible

fYearNavigatorVisible

protected boolean fYearNavigatorVisible

fShowBottomDelimiter

protected boolean fShowBottomDelimiter
Constructor Detail

MultipleMonthCalendarPanel

public MultipleMonthCalendarPanel()
Constructs the Calendar with default Locale


MultipleMonthCalendarPanel

public MultipleMonthCalendarPanel(java.util.Locale aLocale)
Constructs the Calendar with specified Locale and fourth Calendars

Parameters:
aLocale - the Locale

MultipleMonthCalendarPanel

public MultipleMonthCalendarPanel(int aCalendarsAmount)
Constructs the Calendar with default Locale and specified Calendars amount

Parameters:
aCalendarsAmount - the Calendars amount

MultipleMonthCalendarPanel

public MultipleMonthCalendarPanel(java.util.Locale aLocale,
                                  int aCalendarsAmount)
Constructs the Calendar with specified Locale and Calendars amount

Parameters:
aLocale - the Locale
aCalendarsAmount - the Calendars amount

MultipleMonthCalendarPanel

public MultipleMonthCalendarPanel(int aCalendarsAmount,
                                  int aRows)
Constructs the Calendar with default Locale and specified Calendars and rows amount

Parameters:
aCalendarsAmount - the Calendars amount
aRows - the rows amount

MultipleMonthCalendarPanel

public MultipleMonthCalendarPanel(java.util.Locale aLocale,
                                  int aCalendarsAmount,
                                  int aRows)
Constructs the Calendar with specified Locale and Calendars and rows amount

Parameters:
aLocale - the Locale
aCalendarsAmount - the Calendars amount
aRows - the rows amount
Method Detail

updateDelimiter

protected void updateDelimiter()
Updates delemiter (line) dividing the Calendar from the bottom decoration panel


updateUI

public void updateUI()

buildCalendarPanel

protected void buildCalendarPanel()
Builds the MultipleMonthCalendarPanel using Calendars and rows amount


evaluateParameters

protected void evaluateParameters()
Evaluates Calendars amount and rows parameters to calculate the columns value and valid ration between Calendars amount, rows and columns


isFirstCalendar

protected boolean isFirstCalendar(CalendarPanel aCalendarPanel)
Checks is aCalendarPanel first in MultipleMonthCalendarPanel

Parameters:
aCalendarPanel - the SimpleCalendarPanel for checking
Returns:
true if first

isLastCalendar

protected boolean isLastCalendar(CalendarPanel aCalendarPanel)
Checks is aCalendarPanel last in MultipleMonthCalendarPanel

Parameters:
aCalendarPanel - the SimpleCalendarPanel for checking
Returns:
true if last

updateCalendars

protected void updateCalendars(CalendarPanel aCalendarPanel)
Updates the date of all Calendars starting from aCalendarPanel

Parameters:
aCalendarPanel - the SimpleCalendarPanel to start updating from

dateSelected

protected void dateSelected()
Invoked when OK button click is performed to fire dateSelected event


requestFocus

public void requestFocus()

setCurrentCalendar

protected void setCurrentCalendar(java.util.Date aDate,
                                  boolean anIgnoreFirstMonth)
Finds and sets current calendar which equals to a new date. If not found in the current calendars set the neares one will be set with a new date

Parameters:
aDate - a new Date
anIgnoreFirstMonth - if true set the date to the nearest Calendar, otherwise change a new date to the date of the nearest Calendar

isShowBottomDelimiter

public boolean isShowBottomDelimiter()
Gets whether to show bottom delimiter

Returns:
true if yes

setShowBottomDelimiter

public void setShowBottomDelimiter(boolean aShowBottomDelimiter)
Sets whether to show bottom delimiter

Parameters:
aShowBottomDelimiter - true if yes

isWeekNavigatorVisible

public boolean isWeekNavigatorVisible()
Returns whether Week Navigation buttons is visible

Returns:
true if visible

setWeekNavigatorVisible

public void setWeekNavigatorVisible(boolean aFlag)
Sets Week Navigation buttons' visibility

Parameters:
aFlag - true if Week Navigation buttons should be visible

isMonthNavigatorVisible

public boolean isMonthNavigatorVisible()
Returns whether Month Navigation buttons is visible

Returns:
true if visible

setMonthNavigatorVisible

public void setMonthNavigatorVisible(boolean aFlag)
Sets Month Navigation buttons' visibility

Parameters:
aFlag - true if Month Navigation buttons should be visible

isYearNavigatorVisible

public boolean isYearNavigatorVisible()
Returns whether Week Navigation buttons is visible

Returns:
true if visible

setYearNavigatorVisible

public void setYearNavigatorVisible(boolean aFlag)
Sets Week Navigation buttons' visibility

Parameters:
aFlag - true if Week Navigation buttons should be visible

getCalendarsAmount

public int getCalendarsAmount()
Returns Calendars amount

Returns:
Calendars amount

setCalendarsAmount

public void setCalendarsAmount(int aCalendarsAmount)
Sets theCalendars amount. The change of this parameter may change the result of the method getRows()

Parameters:
aCalendarsAmount - the Calendars amount
See Also:
getRows(), setRows(int)

getRows

public int getRows()
Returns rows amount

Returns:
rows amount

setRows

public void setRows(int aRows)
Sets the rows amount

Parameters:
aRows - the rows amount

getFirstMonth

public int getFirstMonth()
Returns month number from the first SingleCalendarPanel

Returns:
month number from the first SingleCalendarPanel

setFirstMonth

public void setFirstMonth(int aMonth)
Sets first SingleCalendarPanel with speciifed month

Parameters:
aMonth - the month number

getCurrentCalendar

public CalendarPanel getCurrentCalendar()
Returns selected SingleCalendarPanel

Returns:
selected SingleCalendarPanel

getDate

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

Specified by:
getDate in interface CalendarInterface
Returns:
selected Date

setDate

protected final void setDate(java.util.Date aDate,
                             boolean anIgnoreFirstMonth)
Sets a new Date

Parameters:
aDate - a new Date
anIgnoreFirstMonth - if true set the date to the nearest Calendar, otherwise change a new date to the date of the nearest Calendar

setDate

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

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

getDayOfMonth

public int getDayOfMonth()
Returns selected day of month

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

getMonth

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

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

getYear

public int getYear()
Returns selected year

Specified by:
getYear in interface CalendarInterface
Returns:
selected year

isOkButtonVisible

public boolean isOkButtonVisible()
Returns whether OK button is visible

Returns:
true if visible

setOkButtonVisible

public void setOkButtonVisible(boolean aFlag)
Sets OK button's visibility

Parameters:
aFlag - true if OK button should be visible

isTodayButtonVisible

public boolean isTodayButtonVisible()
Returns whether Today button is visible

Returns:
true if visible

setTodayButtonVisible

public void setTodayButtonVisible(boolean aFlag)
Sets Today button's visibility

Parameters:
aFlag - true if OK button should be visible

isShowVerticalLines

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

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

setShowVerticalLines

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

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

isShowHorizontalLines

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

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

setShowHorizontalLines

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

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

isShowGrid

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

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

setShowGrid

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

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

isShortDayCaption

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

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

setShortDayCaption

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

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

getCalendarDayRenderer

public CalendarDayRenderer getCalendarDayRenderer()
Returns the CalendarDayRenderer

Specified by:
getCalendarDayRenderer in interface CalendarInterface
Returns:
the CalendarDayRenderer

setCalendarDayRenderer

public void setCalendarDayRenderer(CalendarDayRenderer aCalendarDayRenderer)
Sets the CalendarDayRenderer

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

getCalendarController

public CalendarController getCalendarController()
Returns the CalendarController

Specified by:
getCalendarController in interface CalendarInterface
Returns:
the CalendarController

setCalendarController

public void setCalendarController(CalendarController aCalendarControler)
Sets the CalendarController

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

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

isEnabled

public boolean isEnabled()
Returns whether this component is enabled

Returns:
true if enabled

setEnabled

public void setEnabled(boolean aFlag)
Sets this component accessibility

Parameters:
aFlag - true if this component should be enabled

getOffMonthWeekdayForeground

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

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

setOffMonthWeekdayForeground

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

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

getOffMonthWeekdayBackground

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

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

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

getOffMonthWeekendForeground

public java.awt.Color getOffMonthWeekendForeground()
Returns off-month weekend foreground Color

Specified by:
getOffMonthWeekendForeground in interface CalendarInterface
Returns:
off-month weekend foreground Color

setOffMonthWeekendForeground

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

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

getOffMonthWeekendBackground

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

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

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

getWeekendForeground

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

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

setWeekendForeground

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

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

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

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

getHeaderForeground

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

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

setHeaderForeground

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

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

getCaptionForeground

public java.awt.Color getCaptionForeground()
Returns caption's foreground Color

Returns:
caption's foreground Color

setCaptionForeground

public void setCaptionForeground(java.awt.Color aCaptionForeground)
Sets caption's foreground Color. Caption shows current month and year

Parameters:
aCaptionForeground - caption's foreground Color

setBackground

public void setBackground(java.awt.Color aBackground)
Sets Calendar's background Color

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

setForeground

public void setForeground(java.awt.Color aForeground)
Sets Calendar's foreground Color

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

getTodayBorderThickness

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

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

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

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

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.

setAllowSelectOffMonthDays

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

Specified by:
setAllowSelectOffMonthDays in interface CalendarInterface
Overrides:
setAllowSelectOffMonthDays in class CalendarAdapter
Parameters:
aFlag - true if off-month days can be selected

getAbout

public java.lang.String getAbout()

setAbout

public void setAbout(java.lang.String aAbout)

isCalendarAdjusting

protected boolean isCalendarAdjusting()

dateChanged

public void dateChanged(CalendarEvent anEvent)
Catches date is changed events from SingleCalendarPanels and forwards them to the method fireDateChanged

Parameters:
anEvent - the CalendarEvent

dateSelected

public void dateSelected(CalendarEvent anEvent)
Catches date is selected events from SingleCalendarPanels and forwards them to the methods fireDateSelected and fireActionPerformed

Parameters:
anEvent - the CalendarEvent

localeChanged

public void localeChanged(CalendarInterface aSource,
                          java.util.Locale aLocale,
                          java.util.Date aDate)

onCalendarDayRenderer

public void onCalendarDayRenderer(CalendarInterface aSource,
                                  java.util.Date aDate,
                                  java.awt.Component aRendererComponent)
Catches on calendar day renderer events from SingleCalendarPanels and forwards them to the method fireOnRendererCalendarDay

Specified by:
onCalendarDayRenderer in interface CalendarDayRendererListener
Parameters:
aSource - the source
aDate - current Date
aRendererComponent - day renderer Component

propertyChange

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

getGridColor

public java.awt.Color getGridColor()

setGridColor

public void setGridColor(java.awt.Color gridColor)