edu.wisc.ssec.mcidasv.data.dateChooser
Interface IDateEditor

All Known Implementing Classes:
JTextFieldDateEditor

public interface IDateEditor

All date editors that should be used by a JDateChooser have to implement this interface.

Version:
$LastChangedRevision: 105 $, $LastChangedDate: 2007-02-16 12:56:29 +0100 (Fr, 16 Feb 2007) $
Author:
Kai Toedter

Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Adds a property change listener that should be added to the implementing UI component.
 void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
          Adds a property change listener that should be added to the implementing UI component.
 Date getDate()
          Returns the date.
 String getDateFormatString()
          Returns tha date format string.
 Date getMaxSelectableDate()
          Gets the minimum selectable date.
 Date getMinSelectableDate()
          Gets the maximum selectable date.
 JComponent getUiComponent()
          Returns the UI component, e.g. the actual JTextField implementing the editor.
 void removePropertyChangeListener(PropertyChangeListener listener)
          Removes a property change listener.
 void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
          Removes the listener from the date editor's property change listeners for the specific property.
 void setDate(Date date)
          Sets the date.
 void setDateFormatString(String dateFormatString)
          Sets the date format string, e.g.
 void setEnabled(boolean enabled)
          Enables or disables the UI compoment.
 void setLocale(Locale locale)
          Sets the locale.
 void setMaxSelectableDate(Date max)
          Sets the maximum selectable date.
 void setMinSelectableDate(Date min)
          Sets the minimum selectable date.
 void setSelectableDateRange(Date min, Date max)
          Sets a valid date range for selectable dates.
 

Method Detail

getDate

Date getDate()
Returns the date.

Returns:
the date

setDate

void setDate(Date date)
Sets the date. This should be implemented as a bound property, firing the "date" property.

Parameters:
date - the date to set

setDateFormatString

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.

Parameters:
dateFormatString - the date format string

getDateFormatString

String getDateFormatString()
Returns tha date format string.

Returns:
the date format string

setSelectableDateRange

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.

Parameters:
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)

getMaxSelectableDate

Date getMaxSelectableDate()
Gets the minimum selectable date.

Returns:
the minimum selectable date

getMinSelectableDate

Date getMinSelectableDate()
Gets the maximum selectable date.

Returns:
the maximum selectable date

setMaxSelectableDate

void setMaxSelectableDate(Date max)
Sets the maximum selectable date.

Parameters:
max - maximum selectable date

setMinSelectableDate

void setMinSelectableDate(Date min)
Sets the minimum selectable date.

Parameters:
min - minimum selectable date

getUiComponent

JComponent getUiComponent()
Returns the UI component, e.g. the actual JTextField implementing the editor.

Returns:
the UI component

setLocale

void setLocale(Locale locale)
Sets the locale. Usually this should have impact on the current date format string.

Parameters:
locale - the locale to set

setEnabled

void setEnabled(boolean enabled)
Enables or disables the UI compoment.

Parameters:
enabled - true, if the UI component should be enabled.

addPropertyChangeListener

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.

Parameters:
listener - the property change listener.

addPropertyChangeListener

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.

Parameters:
propertyName - the property name, e.g. "date"
listener - the property change listener.

removePropertyChangeListener

void removePropertyChangeListener(PropertyChangeListener listener)
Removes a property change listener.

Parameters:
listener - the property change listener.

removePropertyChangeListener

void removePropertyChangeListener(String propertyName,
                                  PropertyChangeListener listener)
Removes the listener from the date editor's property change listeners for the specific property.

Parameters:
propertyName - the property to listen for, e.g. "date"
listener - the listener