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:
Constructor Summary
| Constructor | Description |
|---|---|
PercentageStringConverter() |
Constructs a PercentageStringConverter with the default locale and format. |
PercentageStringConverter |
Constructs a PercentageStringConverter with the given number format. |
PercentageStringConverter |
Constructs a PercentageStringConverter with the given locale and the default format. |
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
NumberFormat |
getNumberFormat() |
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.NumberStringConverter
fromString, toString
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
@Deprecated(forRemoval=true, since="22") public NumberFormat getNumberFormat()
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.
Description copied from class:
NumberStringConverterReturns a
NumberFormat instance to use for formatting and parsing in this StringConverter.- Overrides:
-
getNumberFormatin classNumberStringConverter - Returns:
- a
NumberFormatinstance for formatting and parsing in thisStringConverter
© 2008, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from JavaFX API Documentation.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Java, JavaFX and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.