|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.JFormattedTextField.AbstractFormatter | +--javax.swing.text.DefaultFormatter | +--javax.swing.text.InternationalFormatter | +--javax.swing.text.DateFormatter
Safe: 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
.
java.text.DateFormat
,
Serialized FormField Summary |
Fields inherited from class javax.swing.text.InternationalFormatter |
|
Fields inherited from class javax.swing.text.DefaultFormatter |
replaceHolder |
Fields inherited from class javax.swing.AbstractFormatter |
|
Constructor Summary | |
DateFormatter()
Enabled: This is shorthand for new DateFormatter(DateFormat.getDateInstance()) . |
|
DateFormatter(java.text.DateFormat format)
Enabled: Returns a DateFormatter configured with the specified Format instance. |
Method Summary | |
(package private) Object |
adjustValue(Object value,
Map attributes,
Object key,
int direction)
Adjusts the Date if FieldPosition identifies a known calendar field. |
(package private) Object |
getAdjustField(int start,
Map attributes)
Returns the field that will be adjusted by adjustValue. |
private Calendar |
getCalendar()
Returns the Calendar that DateFormat is associated with,
or if the Format is not a DateFormat
Calendar.getInstance is returned. |
(package private) boolean |
getSupportsIncrement()
Returns true, as DateFormatterFilter will support incrementing/decrementing of the value. |
void |
setFormat(java.text.DateFormat format)
Enabled: Sets the format that dictates the legal values that can be edited and displayed. |
Methods inherited from class javax.swing.text.InternationalFormatter |
canIncrement, canReplace, clone, getActions, getAttributes, getAttributeStart, getBufferedChar, getFields, getFormat, getIterator, getLiteral, getLiteralCountTo, getMaximum, getMinimum, getReplaceHolder, install, isLiteral, isLiteral, isNavigatable, isValidMask, isValidValue, replace, replace, resetValue, selectField, setFormat, setMaximum, setMinimum, stringToValue, stringToValue, updateMask, updateMaskIfNecessary, updateValue, valueToString |
Methods inherited from class javax.swing.AbstractFormatter |
getFormattedTextField, invalidEdit, setEditValid, uninstall |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DateFormatter()
new DateFormatter(DateFormat.getDateInstance())
.
public DateFormatter(java.text.DateFormat format)
Format
instance.
format
- Format used to dictate legal valuesMethod Detail |
public void setFormat(java.text.DateFormat format)
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.
format
- DateFormat instance used for converting from/to Stringsprivate Calendar getCalendar()
DateFormat
is associated with,
or if the Format
is not a DateFormat
Calendar.getInstance
is returned.
boolean getSupportsIncrement()
getSupportsIncrement
in class InternationalFormatter
Object getAdjustField(int start, Map attributes)
getAdjustField
in class InternationalFormatter
Object adjustValue(Object value, Map attributes, Object key, int direction) throws BadLocationException, java.text.ParseException
adjustValue
in class InternationalFormatter
BadLocationException
java.text.ParseException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |