Java Calendar Component v3.1
www.java-calendar.com

com.imagine.component.calendar
Interface CalendarComponent


public interface CalendarComponent

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

To use this component you must get an instance of it by calling the method calendarFactory.createCalendarComponent(java.util.Date).
In order to customize the look you must call the method getCalendarSkin() which will give you an instance of a CalendarSkin 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.


Field Summary
static CalendarProperty CHANGE_CURRENT_DATE_WHEN_YEAR_OR_MONTH_CHANGES
          When this property is set to true the current selected date will be automatically changed when the year or month is changed through the visual controls.
static CalendarProperty FIRST_DAY_OF_WEEK
          Defines the first day of week property.
static CalendarProperty LOCALE
          Defines the locale property.
static CalendarProperty MAX_ADVANCE_OVER_NON_SELECTABLE_DATES
          Specifies the maximum number of non selectable calendar cells to be skipped searching for a selectable cell in the current direction.
static CalendarProperty MAX_MONTHS_NAMES_LENGTH
          Defines the max months names length property.
static CalendarProperty MAX_WEEK_DAYS_NAMES_LENGTH
          Defines the max week days names length property.
static CalendarProperty SHOW_EXTRA_MONTH_DAYS
          Defines the visible status property for the extra month days.
static CalendarProperty SHOW_GRID
          Defines the grid visible status property.
static CalendarProperty SHOW_HOVER
          Defines the hover effect status property.
static CalendarProperty SHOW_STATUS_PANEL
          True if the panel containing the Today and None labels is visible.
static CalendarProperty SHOW_WEEK
          Defines the week numbers visible status property.
static CalendarProperty STATUS_PANEL_NONE_LABEL
          The label for None item on status panel.
static CalendarProperty STATUS_PANEL_TODAY_LABEL
          The label for Today item on status panel.
 
Method Summary
 void addCalendarComponentListener(CalendarComponentListener calendarComponentListener)
          Add a calendar component listener.
 void addDateListener(DateListener dateListener)
          Add a date listener.
 java.lang.Boolean getBooleanCalendarProperty(CalendarProperty calendarProperty)
          Get the value of the specified calendar property as a Boolean object.
 java.lang.Object getCalendarProperty(CalendarProperty calendarProperty)
          Get the value of the specified calendar property.
 CalendarRendererProvider getCalendarRendererProvider()
          Get the calendar renderer provider object used to render the calendar.
 CalendarSelectionModel getCalendarSelectionModel()
          Get the dates selection model.
 CalendarSkin getCalendarSkin()
          Get the CalendarSkin object associated.
 javax.swing.JComponent getComponent()
          Get the component associated.
 java.util.Date getDate()
          Get the date.
 java.lang.Integer getIntegerCalendarProperty(CalendarProperty calendarProperty)
          Get the value of the specified calendar property as an Integer object.
 java.util.Locale getLocaleCalendarProperty(CalendarProperty calendarProperty)
          Get the value of the specified calendar property as a Locale object.
 CalendarProperty[] getSupportedCalendarProperties()
          Get the list of properties suported.
 void processCalendarEvent(CalendarEvent calendarEvent)
          Send an event to the calendar component.
 boolean removeCalendarComponentListener(CalendarComponentListener calendarComponentListener)
          Remove a calendar component listener.
 boolean removeDateListener(DateListener dateListener)
          Remove a date listener.
 void setCalendarProperty(CalendarProperty calendarProperty, java.lang.Object value)
          Set the specified calendar property to the specified value.
 void setCalendarRendererProvider(CalendarRendererProvider calendarTableCellRendererProvider)
          Set the calendar renderer provider.
 void setCalendarSelectionModel(CalendarSelectionModel calendarSelectionModel)
          Set the dates selection model.
 void setDate(java.util.Date date)
          Set the date.
 

Field Detail

FIRST_DAY_OF_WEEK

public static final CalendarProperty FIRST_DAY_OF_WEEK
Defines the first day of week property. The first day of week can have one of the following values:
java.util.calendar.SUNDAY
java.util.calendar.MONDAY
java.util.calendar.TUESDAY
java.util.calendar.WEDNESDAY
java.util.calendar.THURSDAY
java.util.calendar.FRIDAY
java.util.calendar.SATURDAY


SHOW_GRID

public static final CalendarProperty SHOW_GRID
Defines the grid visible status property.


SHOW_WEEK

public static final CalendarProperty SHOW_WEEK
Defines the week numbers visible status property.


SHOW_HOVER

public static final CalendarProperty SHOW_HOVER
Defines the hover effect status property.


SHOW_STATUS_PANEL

public static final CalendarProperty SHOW_STATUS_PANEL
True if the panel containing the Today and None labels is visible.


STATUS_PANEL_TODAY_LABEL

public static final CalendarProperty STATUS_PANEL_TODAY_LABEL
The label for Today item on status panel.


STATUS_PANEL_NONE_LABEL

public static final CalendarProperty STATUS_PANEL_NONE_LABEL
The label for None item on status panel.


SHOW_EXTRA_MONTH_DAYS

public static final CalendarProperty SHOW_EXTRA_MONTH_DAYS
Defines the visible status property for the extra month days.


MAX_WEEK_DAYS_NAMES_LENGTH

public static final CalendarProperty MAX_WEEK_DAYS_NAMES_LENGTH
Defines the max week days names length property.


MAX_MONTHS_NAMES_LENGTH

public static final CalendarProperty MAX_MONTHS_NAMES_LENGTH
Defines the max months names length property.


LOCALE

public static final CalendarProperty LOCALE
Defines the locale property.


MAX_ADVANCE_OVER_NON_SELECTABLE_DATES

public static final CalendarProperty MAX_ADVANCE_OVER_NON_SELECTABLE_DATES
Specifies the maximum number of non selectable calendar cells to be skipped searching for a selectable cell in the current direction.


CHANGE_CURRENT_DATE_WHEN_YEAR_OR_MONTH_CHANGES

public static final CalendarProperty CHANGE_CURRENT_DATE_WHEN_YEAR_OR_MONTH_CHANGES
When this property is set to true the current selected date will be automatically changed when the year or month is changed through the visual controls. The value of this property defaults to false. Please note that setting this property to true will reset the selected date every time when the year or month is changed through the visual controls. This property was created for backward compatibility with the old versions of the calendar which automatically changed the current selected date when the year or month was changed through the visual controls.

Method Detail

getCalendarProperty

public java.lang.Object getCalendarProperty(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.

getLocaleCalendarProperty

public java.util.Locale getLocaleCalendarProperty(CalendarProperty calendarProperty)
Get the value of the specified calendar property as a Locale object. This is an alias of the getCalendarProperty 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.

getIntegerCalendarProperty

public java.lang.Integer getIntegerCalendarProperty(CalendarProperty calendarProperty)
Get the value of the specified calendar property as an Integer object. This is an alias of the getCalendarProperty 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.

getBooleanCalendarProperty

public java.lang.Boolean getBooleanCalendarProperty(CalendarProperty calendarProperty)
Get the value of the specified calendar property as a Boolean object. This is an alias of the getCalendarProperty 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.

setCalendarProperty

public void setCalendarProperty(CalendarProperty calendarProperty,
                                java.lang.Object value)
                         throws CalendarPropertyException
Set the specified calendar 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

getSupportedCalendarProperties

public CalendarProperty[] getSupportedCalendarProperties()
Get the list of properties suported.

Returns:
The list of properties supported.

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.

addDateListener

public void addDateListener(DateListener dateListener)
Add a date listener.

Parameters:
dateListener - The date listener.

removeDateListener

public boolean removeDateListener(DateListener dateListener)
Remove a date listener.

Parameters:
dateListener - The date listener to be removed.

addCalendarComponentListener

public void addCalendarComponentListener(CalendarComponentListener calendarComponentListener)
Add a calendar component listener.

Parameters:
calendarComponentListener - The calendar component listener to be added.

removeCalendarComponentListener

public boolean removeCalendarComponentListener(CalendarComponentListener calendarComponentListener)
Remove a calendar component listener.

Parameters:
calendarComponentListener - The calendar component listener to be removed.

processCalendarEvent

public void processCalendarEvent(CalendarEvent calendarEvent)
Send an event to the calendar component.

Parameters:
calendarEvent - The event sent for processing to the calendar component.

setCalendarRendererProvider

public void setCalendarRendererProvider(CalendarRendererProvider calendarTableCellRendererProvider)
Set the calendar renderer provider. All the drawing operations on the calendar are performed using the calendar renderer provider.

Parameters:
calendarTableCellRendererProvider - The calendar renderer provider to be set.

getCalendarRendererProvider

public CalendarRendererProvider getCalendarRendererProvider()
Get the calendar renderer provider object used to render the calendar. All the drawing operations on the calendar are performed by a calendar renderer provider object.

Returns:
The calendar renderer provider set.

setCalendarSelectionModel

public void setCalendarSelectionModel(CalendarSelectionModel calendarSelectionModel)
Set the dates selection model. This handles the way it is made the dates selection.

Parameters:
calendarSelectionModel - The dates selection model to be set.

getCalendarSelectionModel

public CalendarSelectionModel getCalendarSelectionModel()
Get the dates selection model. This handles the way it is made the dates selection.

Returns:
The dates selection model set.

getCalendarSkin

public CalendarSkin getCalendarSkin()
Get the CalendarSkin object associated. All the drawing operations on the calendar table cells are performed using the graphic properties (colors, fonts) defined by the CalendarSkin object.

Returns:
The CalendarSkin object associated.

getComponent

public javax.swing.JComponent getComponent()
Get the component associated.

Returns:
The component associated.

Java Calendar Component v3.1
www.java-calendar.com