com.toedter.calendar
Interface IDateEditor
- JSpinnerDateEditor, JTextFieldDateEditor
public interface IDateEditor
All date editors that should be used by a JDateChooser have to implement this
interface.
$LastChangedRevision: 96 $, $LastChangedDate: 2006-05-12 18:19:35 +0200 (Fr, 12 Mai 2006) $
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a property change listener that should be added to the implementing
UI component. The UI component should fire a "date" property if the date
changes.
listener
- the property change listener.
addPropertyChangeListener
public void addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Adds a property change listener that should be added to the implementing
UI component. The UI component should fire a "date" property if the date
changes.
propertyName
- the property name, e.g. "date"listener
- the property change listener.
getDate
public Date getDate()
Returns the date.
getDateFormatString
public String getDateFormatString()
Returns tha date format string.
getMaxSelectableDate
public Date getMaxSelectableDate()
Gets the minimum selectable date.
- the minimum selectable date
getMinSelectableDate
public Date getMinSelectableDate()
Gets the maximum selectable date.
- the maximum selectable date
getUiComponent
public JComponent getUiComponent()
Returns the UI component, e.g. the actual JTextField implementing the
editor.
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a property change listener.
listener
- the property change listener.
removePropertyChangeListener
public void removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Removes the listener from the date editor's property change listeners for the specific property.
propertyName
- the property to listen for, e.g. "date"listener
- the listener
setDate
public void setDate(Date date)
Sets the date. This should be implemented as a bound property, firing the
"date" property.
setDateFormatString
public void setDateFormatString(String dateFormatString)
Sets the date format string, e.g. "MM/dd/yy". If the date format string
is null or invalid, the date format string will be set to the MEDIUM
Simple date format of the current locale.
dateFormatString
- the date format string
setEnabled
public void setEnabled(boolean enabled)
Enables or disables the UI compoment.
enabled
- true, if the UI component should be enabled.
setLocale
public void setLocale(Locale locale)
Sets the locale. Usually this should have impact on the current date
format string.
locale
- the locale to set
setMaxSelectableDate
public void setMaxSelectableDate(Date max)
Sets the maximum selectable date.
max
- maximum selectable date
setMinSelectableDate
public void setMinSelectableDate(Date min)
Sets the minimum selectable date.
min
- minimum selectable date
setSelectableDateRange
public void setSelectableDateRange(Date min,
Date max)
Sets a valid date range for selectable dates. If max is before
min, the default range with no limitation is set.
min
- the minimum selectable date or null (then the minimum date should be
set to 01\01\0001)max
- the maximum selectable date or null (then the maximum date should be
set to 01\01\9999)
Copyright B) 1999 - 2006 Kai Toedter.