javax.swing.text
Class DateFormatter

java.lang.Object
  extended by javax.swing.JFormattedTextField.AbstractFormatter
      extended by javax.swing.text.DefaultFormatter
          extended by javax.swing.text.InternationalFormatter
              extended by javax.swing.text.DateFormatter
All Implemented Interfaces:
Serializable, Cloneable

public class DateFormatter
extends InternationalFormatter

DateFormatter is an InternationalFormatter that implements value to string and string to value conversion via an instance of DateFormat.

See Also:
Serialized Form

Constructor Summary
DateFormatter()
          Creates a new instance using the default DateFormat object returned by DateFormat.getDateInstance().
DateFormatter(DateFormat format)
          Creates a new instance of DateFormatter using the specified DateFormat
 
Method Summary
 void setFormat(DateFormat format)
          Sets the format that is used by this DateFormatter.
 
Methods inherited from class javax.swing.text.InternationalFormatter
clone, getActions, getFields, getFormat, getMaximum, getMinimum, install, setFormat, setMaximum, setMinimum, stringToValue, valueToString
 
Methods inherited from class javax.swing.text.DefaultFormatter
getAllowsInvalid, getCommitsOnValidEdit, getDocumentFilter, getOverwriteMode, getValueClass, setAllowsInvalid, setCommitsOnValidEdit, setOverwriteMode, setValueClass
 
Methods inherited from class javax.swing.JFormattedTextField.AbstractFormatter
getFormattedTextField, getNavigationFilter, invalidEdit, setEditValid, uninstall
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateFormatter

public DateFormatter()
Creates a new instance using the default DateFormat object returned by DateFormat.getDateInstance().


DateFormatter

public DateFormatter(DateFormat format)
Creates a new instance of DateFormatter using the specified DateFormat

Parameters:
format - the DateFormat to use
Method Detail

setFormat

public void setFormat(DateFormat format)
Sets the format that is used by this DateFormatter.

Parameters:
format - the DateFormat to use