|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
CalendarInterface is an interface which is implemented by
CalendarPanel, MonthCalendarPanel, MultipleMonthCalendarPanel
and DateField to have a unified access to all types of the Calendar.
It includes base properties and methods.
CalendarPanel,
MonthCalendarPanel,
MultipleMonthCalendarPanel,
DateField| 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 Calendar's listener |
java.awt.Color |
getBackground()
Returns Calendar's background Color |
CalendarController |
getCalendarController()
Returns a particular CalendarController instance |
CalendarDayRenderer |
getCalendarDayRenderer()
Returns a particular CalendarDayRenderer instance |
java.util.Date |
getDate()
Returns selected Date |
int |
getDayOfMonth()
Returns selected day of month |
java.awt.Color |
getForeground()
Returns Calendar's foreground Color |
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 |
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 |
boolean |
isAllowSelectOffMonthDays()
Returns true |
boolean |
isPreserveCurrentDate()
Returns true if the current date should be preserved when disabled off-month day was selected. |
boolean |
isShortDayCaption()
Returns true |
boolean |
isShowGrid()
Returns true |
boolean |
isShowHorizontalLines()
Returns true |
boolean |
isShowOffMonthDays()
Returns true |
boolean |
isShowVerticalLines()
Returns true |
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 Calendar's listener |
void |
setAllowSelectOffMonthDays(boolean aFlag)
Sets whether off-month days can be selected. |
void |
setBackground(java.awt.Color aColor)
Sets Calendar's background Color |
void |
setCalendarController(CalendarController aCalendarControler)
Sets the CalendarController to be used by the Calendar
to perform navigation |
void |
setCalendarDayRenderer(CalendarDayRenderer aCalendarDayRenderer)
Sets the CalendarDayRenderer to be used by the Calendar
to display Calendar's days in a particular way |
void |
setDate(java.util.Date aDate)
Sets a new Date |
void |
setForeground(java.awt.Color aColor)
Sets Calendar's foreground Color |
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 |
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 |
setPreserveCurrentDate(boolean aFlag)
Sets true if the current date should be preserved. |
void |
setShortDayCaption(boolean aShortDayCaption)
Sets whether short day caption should be shown. |
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 |
setShowOffMonthDays(boolean aFlag)
Sets whether off-month days should be shown. |
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 |
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 |
| Method Detail |
public CalendarDayRenderer getCalendarDayRenderer()
CalendarDayRenderer instance
CalendarDayRenderer instancepublic void setCalendarDayRenderer(CalendarDayRenderer aCalendarDayRenderer)
CalendarDayRenderer to be used by the Calendar
to display Calendar's days in a particular way
aCalendarDayRenderer - CalendarDayRendererCalendarDayRendererpublic CalendarController getCalendarController()
CalendarController instance
CalendarController instancepublic void setCalendarController(CalendarController aCalendarControler)
CalendarController to be used by the Calendar
to perform navigation
aCalendarControler - CalendarControllerCalendarControllerpublic java.awt.Color getBackground()
Color
Colorpublic void setBackground(java.awt.Color aColor)
Color
aColor - background Colorpublic java.awt.Color getForeground()
Color
Colorpublic void setForeground(java.awt.Color aColor)
Color
aColor - foreground Colorpublic java.util.Date getDate()
Date
Datepublic void setDate(java.util.Date aDate)
Date
aDate - a new Datepublic int getDayOfMonth()
public int getMonth()
public int getYear()
public java.util.Locale getLocale()
Locale
Localepublic void setLocale(java.util.Locale aLocale)
Locale. The change of the Calendar's Locale
will change navigation buttons tool tip text and caption, days appearance and weekday names
and their order. By default Default Locale is used.
aLocale - a new Calendar's Localepublic boolean isShortDayCaption()
true if short day caption is shown
- Returns:
true if short day caption is shown- See Also:
setShortDayCaption(boolean)
public void setShortDayCaption(boolean aShortDayCaption)
true only one letter from
the name of the day of the week will be shown, otherwise default short name will be shown.
It may be 1-3 letters.
aShortDayCaption - true if short day caption should be shownpublic boolean isShowVerticalLines()
true if the Calendar draws vertical lines between days, false if it
doesn't. The default is false.
- Returns:
true if the table draws vertical lines between days,
false if it doesn't
public void setShowVerticalLines(boolean aFlag)
aFlag is true it does; if it is false it doesn't.
Change of this propery may affect the result of the method isShowGrid.
- Parameters:
aFlag - true if the Calendar view should draw vertical lines- See Also:
setShowGrid(boolean)
public boolean isShowHorizontalLines()
true if the Calendar draws horizontal lines between days, false if it
doesn't. The default is flase.
- Returns:
true if the Calendar draws horizontal lines between days, false if it doesn't
public void setShowHorizontalLines(boolean aFlag)
aFlag is true it does; if it is false it doesn't.
Change of this propery may affect the result of the method isShowGrid
- Parameters:
aFlag - true if the Calendar view should draw horizontal lines- See Also:
setShowGrid(boolean)
public boolean isShowGrid()
true if the Calendar draws grid around days, false if it doesn't.
The default is false.
- Returns:
true if the Calendar draws grid around days, false if it doesn't
public void setShowGrid(boolean aFlag)
aFlag is true it does; if it is false it doesn't.
Change of this propery will affect the result of the methods isShowVerticalLines and
setShowHorizontalLines
- Parameters:
aFlag - true if the Calendar should draw grid lines- See Also:
setShowVerticalLines(boolean),
setShowHorizontalLines(boolean)
public boolean isShowOffMonthDays()
true if off-month days are shown
- Returns:
true if off-month days are shown- See Also:
setShowOffMonthDays(boolean)
public void setShowOffMonthDays(boolean aFlag)
true off-month days
(outside of current month) of previous and next months are shown, otherwise not.
Change of this propery will affect the result of the method isAllowSelectOffMonthDays
aFlag - true if off-month days should be shownsetAllowSelectOffMonthDays(boolean)public boolean isAllowSelectOffMonthDays()
true if off-month days can be selected
- Returns:
true if off-month days can be selected- See Also:
setAllowSelectOffMonthDays(boolean)
public void setAllowSelectOffMonthDays(boolean aFlag)
true off-month days
(outside of current month) of previous and next months can be selected, otherwise not.
Change of this propery will affect the result of the method isShowOffMonthDays
aFlag - true if off-month days can be selectedsetShowOffMonthDays(boolean)public java.awt.Color getOffMonthWeekdayForeground()
Color
Colorpublic void setOffMonthWeekdayForeground(java.awt.Color anOffMonthWeekdayForeground)
Color
anOffMonthWeekdayForeground - off-month weekday foreground Colorpublic java.awt.Color getOffMonthWeekdayBackground()
Color
Colorpublic void setOffMonthWeekdayBackground(java.awt.Color anOffMonthWeekdayBackground)
Color
anOffMonthWeekdayBackground - off-month weekday background Colorpublic java.awt.Color getOffMonthWeekendForeground()
Color
Colorpublic void setOffMonthWeekendForeground(java.awt.Color anOffMonthWeekendForeground)
Color
anOffMonthWeekendForeground - off-month weekend foreground Colorpublic java.awt.Color getOffMonthWeekendBackground()
Color
Colorpublic void setOffMonthWeekendBackground(java.awt.Color anOffMonthWeekendBackground)
Color
anOffMonthWeekendBackground - off-month weekend background Colorpublic java.awt.Color getWeekendForeground()
Color
Colorpublic void setWeekendForeground(java.awt.Color aWeekendForeground)
Color
aWeekendForeground - current month's weekend foreground Colorpublic java.awt.Color getWeekendBackground()
Color
Colorpublic void setWeekendBackground(java.awt.Color aWeekendBackground)
Color
aWeekendBackground - current month's weekend background Colorpublic java.awt.Color getHeaderForeground()
Color
Colorpublic void setHeaderForeground(java.awt.Color aHeaderForeground)
Color
aHeaderForeground - Calendar's header foreground Colorpublic int getTodayBorderThickness()
public void setTodayBorderThickness(int aThickness)
aThickness - Calendar's today's date border thicknesspublic java.awt.Color getTodayBorderColor()
Color
Colorpublic void setTodayBorderColor(java.awt.Color aColor)
Color
aColor - Calendar's today's date border Colorpublic boolean isPreserveCurrentDate()
true if the current date should be preserved when disabled off-month day was selected.
By default returns true
true if the current date should be preservedsetPreserveCurrentDate(boolean)public void setPreserveCurrentDate(boolean aFlag)
true if the current date should be preserved.
This property works in conjuction with the propery allowSelectOffMonthDays when it
set to false. If preserveCurrentDate set to true and
off-month day is selected by mouse or keyboard new selection will be refused and restored to
the previous one, otherwise the nearest day of current month is selected (in case of next month -
last day of the month, in case of previous month - first day of the month)
aFlag - true if the current date should be preserved.public void addCalendarListener(CalendarListener aListener)
aListener - Calendar's listenerpublic void removeCalendarListener(CalendarListener aListener)
aListener - Calendar's listenerpublic void addCalendarDayRendererListener(CalendarDayRendererListener aListener)
aListener - Calendar's day renderer listenerpublic void removeCalendarDayRendererListener(CalendarDayRendererListener aListener)
aListener - Calendar's day renderer listenerpublic void addCalendarDateListener(CalendarDateListener aListener)
aListener - Calendar's day renderer listenerpublic void removeCalendarDateListener(CalendarDateListener aListener)
aListener - Calendar Date listenerpublic void addActionListener(java.awt.event.ActionListener aListener)
aListener - action listenerpublic void removeActionListener(java.awt.event.ActionListener aListener)
aListener - action listener
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||