- java.lang.Object
-
- javafx.util.StringConverter<Date>
-
- javafx.util.converter.DateTimeStringConverter
-
- javafx.util.converter.TimeStringConverter
-
public class TimeStringConverter extends DateTimeStringConverter
StringConverter
implementation forDate
values that represent time.- Since:
- JavaFX 2.1
- See Also:
DateStringConverter
,DateTimeStringConverter
-
-
Field Summary
-
Fields inherited from class javafx.util.converter.DateTimeStringConverter
dateFormat, dateStyle, locale, pattern, timeStyle
-
-
Constructor Summary
Constructors Constructor Description TimeStringConverter()
TimeStringConverter(int timeStyle)
TimeStringConverter(String pattern)
Create aStringConverter
forDate
values, using the specified pattern.TimeStringConverter(DateFormat dateFormat)
TimeStringConverter(Locale locale)
Create aStringConverter
forDate
values, using the specified locale and theDateFormat.DEFAULT
time style.TimeStringConverter(Locale locale, int timeStyle)
TimeStringConverter(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
-
TimeStringConverter
public TimeStringConverter()
-
TimeStringConverter
public TimeStringConverter(int timeStyle)
- Parameters:
timeStyle
- the given formatting style. For example,DateFormat.SHORT
for "h:mm a" in the US locale.- Since:
- JavaFX 8u40
-
TimeStringConverter
public TimeStringConverter(Locale locale)
Create aStringConverter
forDate
values, using the specified locale and theDateFormat.DEFAULT
time style.- Parameters:
locale
- the given locale.
-
TimeStringConverter
public TimeStringConverter(Locale locale, int timeStyle)
- Parameters:
locale
- the given locale.timeStyle
- the given formatting style. For example,DateFormat.SHORT
for "h:mm a" in the US locale.- Since:
- JavaFX 8u40
-
TimeStringConverter
public TimeStringConverter(String pattern)
Create aStringConverter
forDate
values, using the specified pattern.- Parameters:
pattern
- the pattern describing the time format.
-
TimeStringConverter
public TimeStringConverter(Locale locale, String pattern)
Create aStringConverter
forDate
values, using the specified locale and pattern.- Parameters:
locale
- the given locale.pattern
- the pattern describing the time format.
-
TimeStringConverter
public TimeStringConverter(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
-
-