public class DateEditor
extends java.beans.PropertyEditorSupport
Date.| Modifier and Type | Field and Description |
|---|---|
private static java.text.DateFormat[] |
formats
The formats to use when parsing the string date
|
private java.lang.String |
text
Keep the text version of the date
|
| Constructor and Description |
|---|
DateEditor() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAsText()
Returns either the cached string date, or the stored
java.util.Date instance formated to string using the
last of the registered DateFormat(s)
|
static void |
initialize()
Setup the parsing formats.
|
void |
setAsText(java.lang.String text)
Parse the text into a java.util.Date by trying
one by one the registered DateFormat(s).
|
void |
setValue(java.lang.Object value)
Sets directly the java.util.Date value
|
private static java.text.DateFormat[] formats
private java.lang.String text
public static void initialize()
public void setValue(java.lang.Object value)
setValue in interface java.beans.PropertyEditorsetValue in class java.beans.PropertyEditorSupportvalue - a java.util.Datepublic void setAsText(java.lang.String text)
setAsText in interface java.beans.PropertyEditorsetAsText in class java.beans.PropertyEditorSupporttext - the string datepublic java.lang.String getAsText()
getAsText in interface java.beans.PropertyEditorgetAsText in class java.beans.PropertyEditorSupport