Module javafx.base
Package javafx.util.converter

# Class PercentageStringConverter

java.lang.Object
javafx.util.StringConverter<Number>
javafx.util.converter.NumberStringConverter
javafx.util.converter.PercentageStringConverter

public class PercentageStringConverter extends NumberStringConverter
A `StringConverter` implementation for `Number` values that represent percentages. Instances of this class are immutable.

Since:
  JavaFX 2.1
See Also:
  - `CurrencyStringConverter`
  - `NumberStringConverter`
  - `StringConverter`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PercentageStringConverter()`
  Constructs a `PercentageStringConverter` with the default locale and format.
  `PercentageStringConverter(NumberFormat numberFormat)`
  Constructs a `PercentageStringConverter` with the given number format.
  `PercentageStringConverter(Locale locale)`
  Constructs a `PercentageStringConverter` with the given locale and the default format.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `NumberFormat`
  `getNumberFormat()`
  Returns a `NumberFormat` instance to use for formatting and parsing in this `StringConverter`.

  ### Methods declared in class javafx.util.converter.NumberStringConverter

  `fromString, toString`

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

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

- ## Constructor Details

  - ### PercentageStringConverter

    public PercentageStringConverter()
    Constructs a `PercentageStringConverter` with the default locale and format.

  - ### PercentageStringConverter

    public PercentageStringConverter(Locale locale)
    Constructs a `PercentageStringConverter` with the given locale and the default format.
    Parameters:
      `locale` - the locale used in determining the number format used to format the string

  - ### PercentageStringConverter

    public PercentageStringConverter(NumberFormat numberFormat)
    Constructs a `PercentageStringConverter` with the given number format.
    Parameters:
      `numberFormat` - the number format used to format the string

- ## Method Details

  - ### getNumberFormat

    public NumberFormat getNumberFormat()
    Returns a `NumberFormat` instance to use for formatting and parsing in this `StringConverter`.
    Overrides:
      `getNumberFormat` in class `NumberStringConverter`
    Returns:
      a `NumberFormat` instance for formatting and parsing in this `StringConverter`