- java.lang.Object
-
- javafx.util.StringConverter<Date>
-
- javafx.util.converter.DateTimeStringConverter
-
- javafx.util.converter.DateStringConverter
-
public class DateStringConverter extends DateTimeStringConverter
StringConverter
implementation forDate
values.- Since:
- JavaFX 2.1
- See Also:
TimeStringConverter
,DateTimeStringConverter
-
-
Field Summary
-
Fields inherited from class javafx.util.converter.DateTimeStringConverter
dateFormat, dateStyle, locale, pattern, timeStyle
-
-
Constructor Summary
Constructors Constructor Description DateStringConverter()
DateStringConverter(int dateStyle)
DateStringConverter(String pattern)
Create aStringConverter
forDate
values, using the specified pattern.DateStringConverter(DateFormat dateFormat)
DateStringConverter(Locale locale)
Create aStringConverter
forDate
values, using the specified locale and theDateFormat.DEFAULT
date style.DateStringConverter(Locale locale, int dateStyle)
DateStringConverter(Locale locale, String pattern)
Create aStringConverter
forDate
values, using the specified locale and pattern.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected DateFormat
getDateFormat()
Return aDateFormat
instance to use for formatting and parsing in thisStringConverter
.-
Methods inherited from class javafx.util.converter.DateTimeStringConverter
fromString, toString
-
-
-
-
Constructor Detail
-
DateStringConverter
public DateStringConverter()
-
DateStringConverter
public DateStringConverter(int dateStyle)
- Parameters:
dateStyle
- the given formatting style. For example,DateFormat.SHORT
for "M/d/yy" in the US locale.- Since:
- JavaFX 8u40
-
DateStringConverter
public DateStringConverter(Locale locale)
Create aStringConverter
forDate
values, using the specified locale and theDateFormat.DEFAULT
date style.- Parameters:
locale
- the given locale.
-
DateStringConverter
public DateStringConverter(Locale locale, int dateStyle)
- Parameters:
locale
- the given locale.dateStyle
- the given formatting style. For example,DateFormat.SHORT
for "M/d/yy" in the US locale.- Since:
- JavaFX 8u40
-
DateStringConverter
public DateStringConverter(String pattern)
Create aStringConverter
forDate
values, using the specified pattern.- Parameters:
pattern
- the pattern describing the date format.
-
DateStringConverter
public DateStringConverter(Locale locale, String pattern)
Create aStringConverter
forDate
values, using the specified locale and pattern.- Parameters:
locale
- the given locale.pattern
- the pattern describing the date format.
-
DateStringConverter
public DateStringConverter(DateFormat dateFormat)
- Parameters:
dateFormat
- theDateFormat
to be used for formatting and parsing.
-
-
Method Detail
-
getDateFormat
protected DateFormat getDateFormat()
Return a
DateFormat
instance to use for formatting and parsing in thisStringConverter
.- Overrides:
getDateFormat
in classDateTimeStringConverter
- Returns:
- a
DateFormat
instance for formatting and parsing in thisStringConverter
-
-