javax.swing.text
Class DateFormatter
java.lang.Object
javax.swing.JFormattedTextField.AbstractFormatter
javax.swing.text.DefaultFormatter
javax.swing.text.InternationalFormatter
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
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 |
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
setFormat
public void setFormat(DateFormat format)
- Sets the format that is used by this
DateFormatter
.
- Parameters:
format
- the DateFormat
to use