- java.lang.Object
-
- javafx.util.StringConverter<Number>
-
- javafx.util.converter.NumberStringConverter
-
- javafx.util.converter.PercentageStringConverter
-
public class PercentageStringConverter extends NumberStringConverter
AStringConverterimplementation forNumbervalues 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 aPercentageStringConverterwith the default locale and format.PercentageStringConverter(NumberFormat numberFormat)Constructs aPercentageStringConverterwith the given number format.PercentageStringConverter(Locale locale)Constructs aPercentageStringConverterwith the given locale and the default format.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NumberFormatgetNumberFormat()Returns aNumberFormatinstance to use for formatting and parsing in thisStringConverter.-
Methods inherited from class javafx.util.converter.NumberStringConverter
fromString, toString
-
-
-
-
Constructor Detail
-
PercentageStringConverter
public PercentageStringConverter()
Constructs aPercentageStringConverterwith the default locale and format.
-
PercentageStringConverter
public PercentageStringConverter(Locale locale)
Constructs aPercentageStringConverterwith 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 aPercentageStringConverterwith the given number format.- Parameters:
numberFormat- the number format used to format the string
-
-
Method Detail
-
getNumberFormat
public NumberFormat getNumberFormat()
Returns aNumberFormatinstance to use for formatting and parsing in thisStringConverter.- Overrides:
getNumberFormatin classNumberStringConverter- Returns:
- a
NumberFormatinstance for formatting and parsing in thisStringConverter
-
-