JCalendar
public JCalendar()
Default JCalendar constructor.
JCalendar
public JCalendar(Date date)
JCalendar constructor which allows the initial date to be set.
JCalendar
public JCalendar(Date date,
Locale locale)
JCalendar constructor specifying both the initial date and locale.
date
- the datelocale
- the new locale
JCalendar
public JCalendar(Date date,
Locale locale,
boolean monthSpinner,
boolean weekOfYearVisible)
JCalendar constructor with month spinner parameter.
date
- the datelocale
- the localemonthSpinner
- false, if no month spinner should be usedweekOfYearVisible
- true, if weeks of year shall be visible
JCalendar
public JCalendar(Date date,
boolean monthSpinner)
JCalendar constructor specifying both the initial date and the month
spinner type.
date
- the datemonthSpinner
- false, if no month spinner should be used
JCalendar
public JCalendar(Locale locale)
JCalendar constructor allowing the initial locale to be set.
JCalendar
public JCalendar(Locale locale,
boolean monthSpinner)
JCalendar constructor specifying both the locale and the month spinner.
locale
- the localemonthSpinner
- false, if no month spinner should be used
JCalendar
public JCalendar(boolean monthSpinner)
JCalendar constructor specifying the month spinner type.
monthSpinner
- false, if no month spinner should be used
getCalendar
public Calendar getCalendar()
Returns the calendar property.
- the value of the calendar property.
getDate
public Date getDate()
Returns a Date object.
- a date object constructed from the calendar property.
getDayChooser
public JDayChooser getDayChooser()
Gets the dayChooser attribute of the JCalendar object
getDecorationBackgroundColor
public Color getDecorationBackgroundColor()
Returns the color of the decoration (day names and weeks).
- the color of the decoration (day names and weeks).
getLocale
public Locale getLocale()
Returns the locale.
- the value of the locale property.
getMonthChooser
public JMonthChooser getMonthChooser()
Gets the monthChooser attribute of the JCalendar object
getName
public String getName()
Returns "JCalendar".
getSundayForeground
public Color getSundayForeground()
Returns the Sunday foreground.
- Color the Sunday foreground.
getWeekdayForeground
public Color getWeekdayForeground()
Returns the weekday foreground.
- Color the weekday foreground.
getYearChooser
public JYearChooser getYearChooser()
Gets the yearChooser attribute of the JCalendar object
isDecorationBackgroundVisible
public boolean isDecorationBackgroundVisible()
Gets the visibility of the decoration background.
- true, if the decoration background is visible.
isDecorationBordersVisible
public boolean isDecorationBordersVisible()
Gets the visibility of the decoration border.
- true, if the decoration border is visible.
isEnabled
public boolean isEnabled()
Returns true, if enabled.
isWeekOfYearVisible
public boolean isWeekOfYearVisible()
Indicates if the weeks of year are visible..
- boolean true, if weeks of year are visible
main
public static void main(String[] s)
Creates a JFrame with a JCalendar inside and can be used for testing.
s
- The command line arguments
propertyChange
public void propertyChange(PropertyChangeEvent evt)
JCalendar is a PropertyChangeListener, for its day, month and year
chooser.
evt
- the property change event
setBackground
public void setBackground(Color bg)
Sets the background color.
setCalendar
public void setCalendar(Calendar c)
Sets the calendar property. This is a bound property.
setDate
public void setDate(Date date)
Sets the date. Fires the property change "date".
setDecorationBackgroundColor
public void setDecorationBackgroundColor(Color decorationBackgroundColor)
Sets the background of days and weeks of year buttons.
decorationBackgroundColor
- the background color
setDecorationBackgroundVisible
public void setDecorationBackgroundVisible(boolean decorationBackgroundVisible)
Sets the decoration background visible.
decorationBackgroundVisible
- true, if the decoration background
should be visible.
setDecorationBordersVisible
public void setDecorationBordersVisible(boolean decorationBordersVisible)
Sets the decoration borders visible.
decorationBordersVisible
- true, if the decoration borders should
be visible.
setEnabled
public void setEnabled(boolean enabled)
Enable or disable the JCalendar.
enabled
- the new enabled value
setFont
public void setFont(Font font)
Sets the font property.
setForeground
public void setForeground(Color fg)
Sets the foreground color.
setLocale
public void setLocale(Locale l)
Sets the locale property. This is a bound property.
setSundayForeground
public void setSundayForeground(Color sundayForeground)
Sets the Sunday foreground.
sundayForeground
- the sundayForeground to set
setWeekOfYearVisible
public void setWeekOfYearVisible(boolean weekOfYearVisible)
Sets the week of year visible.
weekOfYearVisible
- true, if weeks of year shall be visible
setWeekdayForeground
public void setWeekdayForeground(Color weekdayForeground)
Sets the weekday foreground.
weekdayForeground
- the weekdayForeground to set