java.lang.Object
javafx.util.StringConverter<Number>
javafx.util.converter.NumberStringConverter
javafx.util.converter.PercentageStringConverter
A
StringConverter
implementation for Number
values that represent percentages. Instances of this class are
immutable.- Since:
- JavaFX 2.1
- See Also:
-
Constructor Summary
ConstructorDescriptionConstructs aPercentageStringConverter
with the default locale and format.PercentageStringConverter
(NumberFormat numberFormat) Constructs aPercentageStringConverter
with the given number format.PercentageStringConverter
(Locale locale) Constructs aPercentageStringConverter
with the given locale and the default format. -
Method Summary
Modifier and TypeMethodDescriptionReturns aNumberFormat
instance to use for formatting and parsing in thisStringConverter
.Methods declared in class javafx.util.converter.NumberStringConverter
fromString, toString
-
Constructor Details
-
PercentageStringConverter
public PercentageStringConverter()Constructs aPercentageStringConverter
with the default locale and format. -
PercentageStringConverter
Constructs aPercentageStringConverter
with the given locale and the default format.- Parameters:
locale
- the locale used in determining the number format used to format the string
-
PercentageStringConverter
Constructs aPercentageStringConverter
with the given number format.- Parameters:
numberFormat
- the number format used to format the string
-
-
Method Details
-
getNumberFormat
Returns aNumberFormat
instance to use for formatting and parsing in thisStringConverter
.- Overrides:
getNumberFormat
in classNumberStringConverter
- Returns:
- a
NumberFormat
instance for formatting and parsing in thisStringConverter
-