com.toedter.calendar.demo

Class DateChooserPanel

Implemented Interfaces:
PropertyChangeListener

public class DateChooserPanel
extends JPanel
implements PropertyChangeListener

A demonstration panel including several JDateChoosers.
Version:
$LastChangedRevision: 96 $, $LastChangedDate: 2006-05-12 18:19:35 +0200 (Fr, 12 Mai 2006) $
Author:
Kai Toedter

Constructor Summary

DateChooserPanel()

Method Summary

Date
getDate()
Returns the date.
String
getDateFormatString()
Gets the date format string.
Locale
getLocale()
Returns the locale of the first JDateChooser.
Date
getMaxSelectableDate()
Date
getMinSelectableDate()
boolean
isEnabled()
void
propertyChange(PropertyChangeEvent evt)
void
setDate(Date date)
Sets the date.
void
setDateFormatString(String dfString)
Sets the date format string.
void
setEnabled(boolean enabled)
void
setLocale(Locale locale)
Sets the locale of the first 4 JDateChoosers.
void
setMaxSelectableDate(Date date)
void
setMinSelectableDate(Date date)

Constructor Details

DateChooserPanel

public DateChooserPanel()

Method Details

getDate

public Date getDate()
Returns the date. If the JDateChooser is started with an empty date and no date is set by the user, null is returned.
Returns:
the current date

getDateFormatString

public String getDateFormatString()
Gets the date format string.
Returns:
Returns the dateFormatString.

getLocale

public Locale getLocale()
Returns the locale of the first JDateChooser.

getMaxSelectableDate

public Date getMaxSelectableDate()

getMinSelectableDate

public Date getMinSelectableDate()

isEnabled

public boolean isEnabled()

propertyChange

public void propertyChange(PropertyChangeEvent evt)

setDate

public void setDate(Date date)
Sets the date. Fires the property change "date" if date != null.
Parameters:
date - the new date.

setDateFormatString

public void setDateFormatString(String dfString)
Sets the date format string. E.g "MMMMM d, yyyy" will result in "July 21, 2004" if this is the selected date and locale is English.
Parameters:
dfString - The dateFormatString to set.

setEnabled

public void setEnabled(boolean enabled)

setLocale

public void setLocale(Locale locale)
Sets the locale of the first 4 JDateChoosers.

setMaxSelectableDate

public void setMaxSelectableDate(Date date)

setMinSelectableDate

public void setMinSelectableDate(Date date)

Copyright B) 1999 - 2009 Kai Toedter.