Top Description Fields Constructors Methods
javafx.util.converter

public Class TimeStringConverter

extends DateTimeStringConverter
Class Inheritance
Imports
java.text.DateFormat, .SimpleDateFormat, java.util.Date, .Locale, javafx.util.StringConverter

StringConverter implementation for Date values that represent time.

Since
JavaFX 2.1
See Also
DateStringConverter, DateTimeStringConverter

Field Summary

Inherited from javafx.util.converter.DateTimeStringConverter:
dateFormatdateStylelocalepatterntimeStyle

Constructor Summary

AccessConstructor and Description
public
TimeStringConverter()

Create a StringConverter for Date values, using the DateFormat#DEFAULT time style.

public
TimeStringConverter(int
the given formatting style. For example, DateFormat#SHORT for "h:mm a" in the US locale.
timeStyle
)

Create a StringConverter for Date values, using the specified DateFormat time style.

public
TimeStringConverter(Locale
the given locale.
locale
)

Create a StringConverter for Date values, using the specified locale and the DateFormat#DEFAULT time style.

public
TimeStringConverter(Locale
the given locale.
locale
,
int
the given formatting style. For example, DateFormat#SHORT for "h:mm a" in the US locale.
timeStyle
)

Create a StringConverter for Date values, using the specified locale and DateFormat time style.

public
TimeStringConverter(String
the pattern describing the time format.
pattern
)

Create a StringConverter for Date values, using the specified pattern.

public
TimeStringConverter(Locale
the given locale.
locale
,
String
the pattern describing the time format.
pattern
)

Create a StringConverter for Date values, using the specified locale and pattern.

public
TimeStringConverter(DateFormat
the DateFormat to be used for formatting and parsing.
dateFormat
)

Create a StringConverter for Date values, using the specified DateFormat formatter.

private
TimeStringConverter(Locale locale, String pattern, DateFormat dateFormat, int timeStyle)

Method Summary

Modifier and TypeMethod and Description
protected DateFormat
getDateFormat()

Overrides javafx.util.converter.DateTimeStringConverter.getDateFormat.

Deprecated for removal since 22. This method was exposed erroneously and will be removed in a future version.

Returns a DateFormat instance to use for formatting and parsing in this StringConverter.

Inherited from javafx.util.converter.DateTimeStringConverter:
fromStringtoString

Constructor Detail

TimeStringConverterback to summary
public TimeStringConverter()

Create a StringConverter for Date values, using the DateFormat#DEFAULT time style.

TimeStringConverterback to summary
public TimeStringConverter(int timeStyle)

Create a StringConverter for Date values, using the specified DateFormat time style.

Parameters
timeStyle:int

the given formatting style. For example, DateFormat#SHORT for "h:mm a" in the US locale.

Since
JavaFX 8u40
TimeStringConverterback to summary
public TimeStringConverter(Locale locale)

Create a StringConverter for Date values, using the specified locale and the DateFormat#DEFAULT time style.

Parameters
locale:Locale

the given locale.

TimeStringConverterback to summary
public TimeStringConverter(Locale locale, int timeStyle)

Create a StringConverter for Date values, using the specified locale and DateFormat time style.

Parameters
locale:Locale

the given locale.

timeStyle:int

the given formatting style. For example, DateFormat#SHORT for "h:mm a" in the US locale.

Since
JavaFX 8u40
TimeStringConverterback to summary
public TimeStringConverter(String pattern)

Create a StringConverter for Date values, using the specified pattern.

Parameters
pattern:String

the pattern describing the time format.

TimeStringConverterback to summary
public TimeStringConverter(Locale locale, String pattern)

Create a StringConverter for Date values, using the specified locale and pattern.

Parameters
locale:Locale

the given locale.

pattern:String

the pattern describing the time format.

TimeStringConverterback to summary
public TimeStringConverter(DateFormat dateFormat)

Create a StringConverter for Date values, using the specified DateFormat formatter.

Parameters
dateFormat:DateFormat

the DateFormat to be used for formatting and parsing.

TimeStringConverterback to summary
private TimeStringConverter(Locale locale, String pattern, DateFormat dateFormat, int timeStyle)

Method Detail

getDateFormatback to summary
protected DateFormat getDateFormat()

Overrides javafx.util.converter.DateTimeStringConverter.getDateFormat.

Doc from javafx.util.converter.DateTimeStringConverter.getDateFormat.

Deprecated

for removal since 22.

This method was exposed erroneously and will be removed in a future version.

Returns a DateFormat instance to use for formatting and parsing in this StringConverter.

Returns:DateFormat

a DateFormat instance for formatting and parsing in this StringConverter

Annotations
@Deprecated
forRemoval:true
since:22
@Override