Home » openjdk-7 » javax » swing » text » [javadoc | source]
javax.swing.text
public class: DateFormatter [javadoc | source]
java.lang.Object
   javax.swing.JFormattedTextField.AbstractFormatter
      javax.swing.text.DefaultFormatter
         javax.swing.text.InternationalFormatter
            javax.swing.text.DateFormatter

All Implemented Interfaces:
    Cloneable, Serializable

Direct Known Subclasses:
    DateEditorFormatter

DateFormatter is an InternationalFormatter that does its formatting by way of an instance of java.text.DateFormat.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeansTM has been added to the java.beans package. Please see java.beans.XMLEncoder .

Fields inherited from javax.swing.text.DefaultFormatter:
replaceHolder
Constructor:
 public DateFormatter() 
 public DateFormatter(DateFormat format) 
    Returns a DateFormatter configured with the specified Format instance.
    Parameters:
    format - Format used to dictate legal values
Method from javax.swing.text.DateFormatter Summary:
adjustValue,   getAdjustField,   getSupportsIncrement,   setFormat
Methods from javax.swing.text.InternationalFormatter:
adjustValue,   canIncrement,   canReplace,   clone,   getActions,   getAdjustField,   getAttributeStart,   getAttributes,   getBufferedChar,   getFields,   getFormat,   getIterator,   getLiteral,   getLiteralCountTo,   getMaximum,   getMinimum,   getReplaceHolder,   getSupportsIncrement,   install,   isLiteral,   isLiteral,   isNavigatable,   isValidMask,   isValidValue,   replace,   replace,   resetValue,   selectField,   setFormat,   setMaximum,   setMinimum,   stringToValue,   stringToValue,   updateMask,   updateMaskIfNecessary,   updateValue,   valueToString
Methods from javax.swing.text.DefaultFormatter:
canReplace,   clone,   commitEdit,   getAllowsInvalid,   getCommitsOnValidEdit,   getDocumentFilter,   getInitialVisualPosition,   getNavigationFilter,   getNextCursorPosition,   getNextVisualPositionFrom,   getOverwriteMode,   getReplaceHolder,   getReplaceString,   getValueClass,   install,   isLegalInsertText,   isNavigatable,   isValidEdit,   moveDot,   positionCursorAtInitialLocation,   replace,   replace,   repositionCursor,   setAllowsInvalid,   setCommitsOnValidEdit,   setDot,   setOverwriteMode,   setValueClass,   stringToValue,   updateValue,   updateValue,   valueToString
Methods from javax.swing.JFormattedTextField$AbstractFormatter:
clone,   getActions,   getDocumentFilter,   getFormattedTextField,   getNavigationFilter,   install,   invalidEdit,   setEditValid,   stringToValue,   uninstall,   valueToString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.swing.text.DateFormatter Detail:
 Object adjustValue(Object value,
    Map attributes,
    Object key,
    int direction) throws BadLocationException, ParseException 
    Adjusts the Date if FieldPosition identifies a known calendar field.
 Object getAdjustField(int start,
    Map attributes) 
    Returns the field that will be adjusted by adjustValue.
 boolean getSupportsIncrement() 
    Returns true, as DateFormatterFilter will support incrementing/decrementing of the value.
 public  void setFormat(DateFormat format) 
    Sets the format that dictates the legal values that can be edited and displayed.

    If you have used the nullary constructor the value of this property will be determined for the current locale by way of the Dateformat.getDateInstance() method.