Class DateStringConverter
java.lang.Object
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:
Constructor Summary
| Constructor | Description |
|---|---|
DateStringConverter() |
|
DateStringConverter |
|
DateStringConverter |
Create a StringConverter for Date values, using the specified pattern. |
DateStringConverter |
|
DateStringConverter |
Create a StringConverter for Date values, using the specified locale and the DateFormat.DEFAULT date style. |
DateStringConverter |
|
DateStringConverter |
Create a StringConverter for Date values, using the specified locale and pattern. |
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
protected DateFormat |
getDateFormat() |
Deprecated, for removal: This API element is subject to removal in a future version. This method was exposed erroneously and will be removed in a future version. |
Methods declared in class javafx.util.converter.DateTimeStringConverter
fromString, toString
Constructor Details
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 a
StringConverter for Date values, using the specified locale and the DateFormat.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.SHORTfor "M/d/yy" in the US locale. - Since:
- JavaFX 8u40
DateStringConverter
public DateStringConverter(String pattern)
Create a
StringConverter for Date values, using the specified pattern.- Parameters:
-
pattern- the pattern describing the date format.
DateStringConverter
public DateStringConverter(Locale locale, String pattern)
Create a
StringConverter for Date 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- theDateFormatto be used for formatting and parsing.
Method Details
getDateFormat
@Deprecated(forRemoval=true, since="22") protected DateFormat getDateFormat()
Deprecated, for removal: This API element is subject to removal in a future version.
This method was exposed erroneously and will be removed in a future version.
© 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.