- Direct Known Subclasses:
- DateStringConverter,- TimeStringConverter
StringConverter implementation for Date values that
 represent a date and time.
- Since:
- JavaFX 2.1
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final DateFormatDeprecated, for removal: This API element is subject to removal in a future version.This field was exposed erroneously and will be removed in a future version.protected final intDeprecated, for removal: This API element is subject to removal in a future version.This field was exposed erroneously and will be removed in a future version.protected final LocaleDeprecated, for removal: This API element is subject to removal in a future version.This field was exposed erroneously and will be removed in a future version.protected final StringDeprecated, for removal: This API element is subject to removal in a future version.This field was exposed erroneously and will be removed in a future version.protected final intDeprecated, for removal: This API element is subject to removal in a future version.This field was exposed erroneously and will be removed in a future version.
- 
Constructor SummaryConstructorsConstructorDescriptionDateTimeStringConverter(int dateStyle, int timeStyle) DateTimeStringConverter(String pattern) Create aStringConverterforDatevalues, using the specified pattern.DateTimeStringConverter(DateFormat dateFormat) DateTimeStringConverter(Locale locale) Create aStringConverterforDatevalues, using the specified locale andDateFormat.DEFAULTstyles for date and time.DateTimeStringConverter(Locale locale, int dateStyle, int timeStyle) Create aStringConverterforDatevalues, using specified locale andDateFormatstyles for date and time.DateTimeStringConverter(Locale locale, String pattern) Create aStringConverterforDatevalues, using the specified locale and pattern.
- 
Method SummaryModifier and TypeMethodDescriptionfromString(String value) Converts the string provided into an object defined by the specific converter.protected DateFormatDeprecated, for removal: This API element is subject to removal in a future version.This method exposes internal implementation details and will be removed in a future version.Converts the object provided into its string form.
- 
Field Details- 
localeDeprecated, for removal: This API element is subject to removal in a future version.This field was exposed erroneously and will be removed in a future version.
- 
patternDeprecated, for removal: This API element is subject to removal in a future version.This field was exposed erroneously and will be removed in a future version.
- 
dateFormatDeprecated, for removal: This API element is subject to removal in a future version.This field was exposed erroneously and will be removed in a future version.
- 
dateStyleDeprecated, for removal: This API element is subject to removal in a future version.This field was exposed erroneously and will be removed in a future version.- Since:
- JavaFX 8u40
 
- 
timeStyleDeprecated, for removal: This API element is subject to removal in a future version.This field was exposed erroneously and will be removed in a future version.- Since:
- JavaFX 8u40
 
 
- 
- 
Constructor Details- 
DateTimeStringConverterpublic DateTimeStringConverter()
- 
DateTimeStringConverterpublic DateTimeStringConverter(int dateStyle, int timeStyle) - Parameters:
- dateStyle- the given formatting style. For example,- DateFormat.SHORTfor "M/d/yy" in the US locale.
- timeStyle- the given formatting style. For example,- DateFormat.SHORTfor "h:mm a" in the US locale.
- Since:
- JavaFX 8u40
 
- 
DateTimeStringConverterCreate aStringConverterforDatevalues, using the specified locale andDateFormat.DEFAULTstyles for date and time.- Parameters:
- locale- the given locale.
 
- 
DateTimeStringConverterCreate aStringConverterforDatevalues, using specified locale andDateFormatstyles for date and time.- Parameters:
- locale- the given locale.
- dateStyle- the given formatting style. For example,- DateFormat.SHORTfor "M/d/yy" in the US locale.
- timeStyle- the given formatting style. For example,- DateFormat.SHORTfor "h:mm a" in the US locale.
- Since:
- JavaFX 8u40
 
- 
DateTimeStringConverterCreate aStringConverterforDatevalues, using the specified pattern.- Parameters:
- pattern- the pattern describing the date and time format.
 
- 
DateTimeStringConverterCreate aStringConverterforDatevalues, using the specified locale and pattern.- Parameters:
- locale- the given locale.
- pattern- the pattern describing the date and time format.
 
- 
DateTimeStringConverter- Parameters:
- dateFormat- the- DateFormatto be used for formatting and parsing.
 
 
- 
- 
Method Details- 
fromStringConverts the string provided into an object defined by the specific converter. Format of the string and type of the resulting object is defined by the specific converter.- Specified by:
- fromStringin class- StringConverter<Date>
- Parameters:
- value- the- Stringto convert
- Returns:
- an object representation of the string passed in.
 
- 
toStringConverts the object provided into its string form. Format of the returned string is defined by the specific converter.- Specified by:
- toStringin class- StringConverter<Date>
- Parameters:
- value- the object of type- Tto convert
- Returns:
- a string representation of the object passed in
 
- 
getDateFormatDeprecated, for removal: This API element is subject to removal in a future version.This method exposes internal implementation details and will be removed in a future version.Return a DateFormatinstance to use for formatting and parsing in thisStringConverter.- Returns:
- a DateFormatinstance for formatting and parsing in thisStringConverter
 
 
-