PercentageStringConverter (JavaFX 28)
Description: declaration: module: javafx.base, package: javafx.util.converter, class: PercentageStringConverter

# 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.

Since:
  JavaFX 2.1

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PercentageStringConverter()`
  Creates a `PercentageStringConverter` that uses a formatter/parser based on the user's `Locale`.
  `PercentageStringConverter(NumberFormat numberFormat)`
  Creates a `PercentageStringConverter` that uses the given formatter/parser.
  `PercentageStringConverter(Locale locale)`
  Creates a `PercentageStringConverter` that uses a formatter/parser based on the given locale.

- ## Method Summary

  ### Methods declared in class NumberStringConverter

  `fromString, toString`

  ### Methods declared in class Object

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

- ## Constructor Details

  - ### PercentageStringConverter

    public PercentageStringConverter()
    Creates a `PercentageStringConverter` that uses a formatter/parser based on the user's `Locale`.

  - ### PercentageStringConverter

    public PercentageStringConverter(Locale locale)
    Creates a `PercentageStringConverter` that uses a formatter/parser based on the given locale.
    Parameters:
      `locale` - the `Locale` that will be used by the formatter/parser. If `null`, the user's locale will be used.

  - ### PercentageStringConverter

    public PercentageStringConverter(NumberFormat numberFormat)
    Creates a `PercentageStringConverter` that uses the given formatter/parser.
    Parameters:
      `numberFormat` - the formatter/parser that will be used by the `toString()` and `fromString()` methods. If `null`, a default formatter/parser will be used.