public class CustomXMLGregorianCalendarEditor
extends java.beans.PropertyEditorSupport
Constructor and Description |
---|
CustomXMLGregorianCalendarEditor(java.text.DateFormat dateFormat,
boolean allowEmpty)
Create a new CustomDateEditor instance, using the given DateFormat for parsing and rendering.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAsText()
Format the XMLGregorianCalendar as String, using the specified DateFormat.
|
void |
setAsText(java.lang.String text)
Parse the Date from the given text, using the specified DateFormat.
|
public CustomXMLGregorianCalendarEditor(java.text.DateFormat dateFormat, boolean allowEmpty)
The "allowEmpty" parameter states if an empty String should be allowed for parsing, i.e. get interpreted as null value. Otherwise, an IllegalArgumentException gets thrown in that case.
dateFormat
- DateFormat to use for parsing and renderingallowEmpty
- if empty strings should be allowedpublic void setAsText(java.lang.String text) throws java.lang.IllegalArgumentException
setAsText
in interface java.beans.PropertyEditor
setAsText
in class java.beans.PropertyEditorSupport
java.lang.IllegalArgumentException
public java.lang.String getAsText()
getAsText
in interface java.beans.PropertyEditor
getAsText
in class java.beans.PropertyEditorSupport