Class DateStringConverter
- javafx.util.StringConverter<Date>
-
- javafx.util.converter.DateTimeStringConverter
-
- javafx.util.converter.DateStringConverter
public class DateStringConverter extends DateTimeStringConverter
StringConverter implementation for Date values.
Since:
JavaFX 2.1
See Also:
-
Field Summary
-
Fields inherited from class javafx.util.converter.DateTimeStringConverter
dateFormat, dateStyle, locale, pattern, timeStyle
-
-
Constructor Summary
Constructors Constructor and Description DateStringConverter()DateStringConverter(DateFormat dateFormat)DateStringConverter(int dateStyle)DateStringConverter(Locale locale)Create aStringConverterforDatevalues, using the specified locale and theDateFormat.DEFAULTdate style.DateStringConverter(Locale locale, int dateStyle)DateStringConverter(Locale locale, String pattern)Create aStringConverterforDatevalues, using the specified locale and pattern.DateStringConverter(String pattern)Create aStringConverterforDatevalues, using the specified pattern.
-
Method Summary
All MethodsInstance MethodsConcrete Methods Modifier and Type Method and Description protected DateFormatgetDateFormat()Return aDateFormatinstance 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.SHORTfor "M/d/yy" in the US locale.Since:
JavaFX 8u40
-
DateStringConverter
public DateStringConverter(Locale locale)
Create aStringConverterforDatevalues, using the specified locale and theDateFormat.DEFAULTdate style.Parameters:
locale- the given locale.
-
DateStringConverter
public DateStringConverter(Locale locale, int dateStyle)Parameters:
locale- the given locale.Since:
JavaFX 8u40
-
DateStringConverter
public DateStringConverter(String pattern)
Create aStringConverterforDatevalues, using the specified pattern.Parameters:
pattern- the pattern describing the date format.
-
DateStringConverter
public DateStringConverter(Locale locale, String pattern)Create aStringConverterforDatevalues, using the specified locale and pattern.Parameters:
locale- the given locale.
-
DateStringConverter
public DateStringConverter(DateFormat dateFormat)
Parameters:
dateFormat- theDateFormatto be used for formatting and parsing.
-
-
Method Detail
-
getDateFormat
protected DateFormat getDateFormat()
Return a
DateFormatinstance to use for formatting and parsing in thisStringConverter.Overrides:
getDateFormatin classDateTimeStringConverter
-
© 2008, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from JavaFX API Documentation.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Java, JavaFX and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.