Class DateEditor

  • All Implemented Interfaces:
    java.beans.PropertyEditor

    public class DateEditor
    extends java.beans.PropertyEditorSupport
    Non-editable Editor for date and time; creates a text field for the string version of the date.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.text.DateFormat DEFAULT_DATE_FORMAT  
    • Constructor Summary

      Constructors 
      Constructor Description
      DateEditor()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String format​(java.util.Date d)  
      java.awt.Component getCustomEditor()  
      java.lang.Object getValue()  
      void setAsText​(java.lang.String text)  
      void setDateFormat​(java.text.DateFormat format)  
      void setValue​(java.lang.Object value)  
      boolean supportsCustomEditor()  
      • Methods inherited from class java.beans.PropertyEditorSupport

        addPropertyChangeListener, firePropertyChange, getAsText, getJavaInitializationString, getSource, getTags, isPaintable, paintValue, removePropertyChangeListener, setSource
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DEFAULT_DATE_FORMAT

        public static java.text.DateFormat DEFAULT_DATE_FORMAT
    • Constructor Detail

      • DateEditor

        public DateEditor()
    • Method Detail

      • setDateFormat

        public void setDateFormat​(java.text.DateFormat format)
      • format

        public java.lang.String format​(java.util.Date d)
      • getCustomEditor

        public java.awt.Component getCustomEditor()
        Specified by:
        getCustomEditor in interface java.beans.PropertyEditor
        Overrides:
        getCustomEditor in class java.beans.PropertyEditorSupport
      • supportsCustomEditor

        public boolean supportsCustomEditor()
        Specified by:
        supportsCustomEditor in interface java.beans.PropertyEditor
        Overrides:
        supportsCustomEditor in class java.beans.PropertyEditorSupport
      • getValue

        public java.lang.Object getValue()
        Specified by:
        getValue in interface java.beans.PropertyEditor
        Overrides:
        getValue in class java.beans.PropertyEditorSupport
      • setValue

        public void setValue​(java.lang.Object value)
        Specified by:
        setValue in interface java.beans.PropertyEditor
        Overrides:
        setValue in class java.beans.PropertyEditorSupport
      • setAsText

        public void setAsText​(java.lang.String text)
                       throws java.lang.IllegalArgumentException
        Specified by:
        setAsText in interface java.beans.PropertyEditor
        Overrides:
        setAsText in class java.beans.PropertyEditorSupport
        Throws:
        java.lang.IllegalArgumentException