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 Details

    • 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

      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

      Gets the minimum selectable date.
      Returns:
      the minimum selectable date
    • getMinSelectableDate

      Gets the maximum selectable date.
      Returns:
      the maximum selectable date
    • setMaxSelectableDate

      Sets the maximum selectable date.
      Parameters:
      max - maximum selectable date
    • setMinSelectableDate

      Sets the minimum selectable date.
      Parameters:
      min - minimum selectable date
    • 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

      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

      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

      Removes a property change listener.
      Parameters:
      listener - the property change listener.
    • removePropertyChangeListener

      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