|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.gwt.user.datepicker.client.DateBox.DefaultFormat
public static class DateBox.DefaultFormat
Default DateBox.Format
class. The date is first parsed using the
DateTimeFormat
supplied by the user, or
DateTimeFormat.PredefinedFormat.DATE_TIME_MEDIUM
by default.
If that fails, we then try to parse again using the default browser date parsing.
If that fails, thedateBoxFormatError
css style is applied to
the DateBox
. The style will be removed when either a successful
parse(DateBox,String, boolean)
is called or
format(DateBox,Date)
is called.
Use a different DateBox.Format
instance to change that behavior.
Constructor Summary | |
---|---|
DateBox.DefaultFormat()
Creates a new default format instance. |
|
DateBox.DefaultFormat(DateTimeFormat dateTimeFormat)
Creates a new default format instance. |
Method Summary | |
---|---|
java.lang.String |
format(DateBox box,
java.util.Date date)
Formats the provided date. |
DateTimeFormat |
getDateTimeFormat()
Gets the date time format. |
java.util.Date |
parse(DateBox dateBox,
java.lang.String dateText,
boolean reportError)
Parses the provided string as a date. |
void |
reset(DateBox dateBox,
boolean abandon)
If the format did any modifications to the date box's styling, reset them now. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DateBox.DefaultFormat()
public DateBox.DefaultFormat(DateTimeFormat dateTimeFormat)
dateTimeFormat
- the DateTimeFormat
to use with this
DateBox.DefaultFormat
.Method Detail |
---|
public java.lang.String format(DateBox box, java.util.Date date)
DateBox.Format
format
in interface DateBox.Format
box
- the date box you are formattingdate
- the date to format
public DateTimeFormat getDateTimeFormat()
public java.util.Date parse(DateBox dateBox, java.lang.String dateText, boolean reportError)
DateBox.Format
parse
in interface DateBox.Format
dateBox
- the date boxdateText
- the string representing a datereportError
- should the formatter indicate a parse error to the
user?
public void reset(DateBox dateBox, boolean abandon)
DateBox.Format
reset
in interface DateBox.Format
dateBox
- the date boxabandon
- true when the current format is being replaced by another
|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |