public class PercentageStyleBuilder extends Object implements DataStyleBuilder<PercentageStyle,PercentageStyleBuilder>, NumberStyleBuilder<PercentageStyle,PercentageStyleBuilder>, DecimalStyleBuilder<PercentageStyleBuilder>
| Constructor and Description |
|---|
PercentageStyleBuilder(String name,
Locale locale)
Create a new number style with the name name, minimum integer digits is
minIntDigits and decimal places is decPlaces.
|
| Modifier and Type | Method and Description |
|---|---|
PercentageStyle |
build() |
PercentageStyleBuilder |
country(String countryCode)
Set the country code
|
PercentageStyleBuilder |
decimalPlaces(int decimalPlaces)
20.250 style:decimal-places
Set how many digits are to the right of the decimal symbol.
|
PercentageStyleBuilder |
groupThousands(boolean grouping) |
PercentageStyleBuilder |
language(String languageCode)
Set the language code
|
PercentageStyleBuilder |
locale(Locale locale)
Set the locale
|
PercentageStyleBuilder |
minIntegerDigits(int minIntegerDigits) |
PercentageStyleBuilder |
negativeValueColor(Color negativeValueColor) |
PercentageStyleBuilder |
negativeValueRed()
Sets the red color for negative values
|
PercentageStyleBuilder |
visible()
Make this style visible, ie part of common styles
|
PercentageStyleBuilder |
volatileStyle(boolean volatileStyle)
19.517 style:volatile
"The style:volatile attribute specifies whether unused style in a document are retained or
discarded by consumers."
|
public PercentageStyle build()
build in interface StyleBuilder<PercentageStyle>public PercentageStyleBuilder decimalPlaces(int decimalPlaces)
DecimalStyleBuilderdecimalPlaces in interface DecimalStyleBuilder<PercentageStyleBuilder>decimalPlaces - "the maximum number of decimal places that are displayed if numbers
are formatted by a data style that has no setting for number of
decimal places itself"public PercentageStyleBuilder groupThousands(boolean grouping)
groupThousands in interface NumberStyleBuilder<PercentageStyle,PercentageStyleBuilder>grouping - if true, the thousands separator is shown.public PercentageStyleBuilder minIntegerDigits(int minIntegerDigits)
minIntegerDigits in interface NumberStyleBuilder<PercentageStyle,PercentageStyleBuilder>minIntegerDigits - The number of digits for integer partpublic PercentageStyleBuilder negativeValueColor(Color negativeValueColor)
negativeValueColor in interface NumberStyleBuilder<PercentageStyle,PercentageStyleBuilder>negativeValueColor - the color for negative values, null if nonepublic PercentageStyleBuilder negativeValueRed()
NumberStyleBuildernegativeValueRed in interface NumberStyleBuilder<PercentageStyle,PercentageStyleBuilder>public PercentageStyleBuilder country(String countryCode)
LocalizedBuildercountry in interface LocalizedBuilder<PercentageStyleBuilder>countryCode - The two letter country code, e.g. 'US'public PercentageStyleBuilder language(String languageCode)
LocalizedBuilderlanguage in interface LocalizedBuilder<PercentageStyleBuilder>languageCode - The two letter language code, e.g. 'en'. See http://www.ietf
.org/rfc/rfc3066.txtpublic PercentageStyleBuilder locale(Locale locale)
LocalizedBuilderlocale in interface LocalizedBuilder<PercentageStyleBuilder>locale - the localepublic PercentageStyleBuilder volatileStyle(boolean volatileStyle)
IsVolatileBuildervolatileStyle in interface IsVolatileBuilder<PercentageStyleBuilder>volatileStyle - true if "consumers should keep unused styles", false otherwise.public PercentageStyleBuilder visible()
ShowableBuildervisible in interface ShowableBuilder<PercentageStyleBuilder>Copyright © 2016–2021. All rights reserved.