# Class TimeStringConverter

java.lang.Object
javafx.util.StringConverter<Date>
javafx.util.converter.DateTimeStringConverter
javafx.util.converter.TimeStringConverter

public class TimeStringConverter extends DateTimeStringConverter

`StringConverter` implementation for `Date` values that represent time.

Since:
  JavaFX 2.1
See Also:
  - `DateStringConverter`
  - `DateTimeStringConverter`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TimeStringConverter()`
  Create a `StringConverter` for `Date` values, using the `DateFormat.DEFAULT` time style.
  `TimeStringConverter(int timeStyle)`
  Create a `StringConverter` for `Date` values, using the specified `DateFormat` time style.
  `TimeStringConverter(String pattern)`
  Create a `StringConverter` for `Date` values, using the specified pattern.
  `TimeStringConverter(DateFormat dateFormat)`
  Create a `StringConverter` for `Date` values, using the specified `DateFormat` formatter.
  `TimeStringConverter(Locale locale)`
  Create a `StringConverter` for `Date` values, using the specified locale and the `DateFormat.DEFAULT` time style.
  `TimeStringConverter(Locale locale, int timeStyle)`
  Create a `StringConverter` for `Date` values, using the specified locale and `DateFormat` time style.
  `TimeStringConverter(Locale locale, String pattern)`
  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`

  ### Methods declared in class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### TimeStringConverter

    public TimeStringConverter()
    Create a `StringConverter` for `Date` values, using the `DateFormat.DEFAULT` time style.

  - ### TimeStringConverter

    public TimeStringConverter(int timeStyle)
    Create a `StringConverter` for `Date` values, using the specified `DateFormat` time style.
    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 a `StringConverter` for `Date` values, using the specified locale and the `DateFormat.DEFAULT` time style.
    Parameters:
      `locale` - the given locale.

  - ### TimeStringConverter

    public TimeStringConverter(Locale locale, int timeStyle)
    Create a `StringConverter` for `Date` values, using the specified locale and `DateFormat` time style.
    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 a `StringConverter` for `Date` values, using the specified pattern.
    Parameters:
      `pattern` - the pattern describing the time format.

  - ### TimeStringConverter

    public TimeStringConverter(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 time format.

  - ### TimeStringConverter

    public TimeStringConverter(DateFormat dateFormat)
    Create a `StringConverter` for `Date` values, using the specified `DateFormat` formatter.
    Parameters:
      `dateFormat` - the `DateFormat` to 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.