Klasse FixedNumberFormat
java.lang.Object
java.text.Format
java.text.NumberFormat
com.inet.report.chart.format.FixedNumberFormat
- Alle implementierten Schnittstellen:
ChartFormat, Serializable, Cloneable
This is a "fixed" number format.
There are three format styles available: number, percent and currency. The number style format shows the value as is.
The percent style format multiplies the values with 100 and shows the percent symbol. The currency style format shows the currency symbol.
The percent and currency symbol position is decided from locale to locale.
There are three format styles available: number, percent and currency. The number style format shows the value as is.
The percent style format multiplies the values with 100 and shows the percent symbol. The currency style format shows the currency symbol.
The percent and currency symbol position is decided from locale to locale.
- Seit:
- 8.0
- Siehe auch:
-
Verschachtelte Klassen - Übersicht
Von Klasse geerbte verschachtelte Klassen/Schnittstellen NumberFormat
NumberFormat.Field, NumberFormat.Style -
Feldübersicht
FelderModifikator und TypFeldBeschreibungstatic final AbbreviationThe default abbreviation.static final intDefault number of decimal places.static final booleanDefault using of thousands separator.static final intThe currency format stylestatic final intThe number format stylestatic final intThe percent format stylestatic final intMinus symbol is placed after number.static final intMinus symbol is placed before number.static final intUse brackets instead of minus.static final intUse system default pattern for negative values.Von Klasse geerbte Felder NumberFormat
FRACTION_FIELD, INTEGER_FIELD -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungCreates a new instance of format with typeFORMAT_NUMBERand default properties.FixedNumberFormat(int type) Creates a new instance of format with default properties. -
Methodenübersicht
Modifikator und TypMethodeBeschreibungclone()Overrides Cloneableformat(double number, StringBuffer toAppendTo, FieldPosition pos) format(long number, StringBuffer toAppendTo, FieldPosition pos) Returns the abbreviation of formatted values.intReturns the flag that control the placing and form of the minus symbol.protected StringgetName()FOR INTERNAL USE ONLY Returns the XML attribute name for this dataset.intReturns the number of decimal places of this number format.intgetType()Returns the formating type: number, currency or percent.booleanReturns the flag that controls the showing of thousands separator.parse(String source, ParsePosition parsePosition) voidreadProperties(Element element) Reads the XML properties of a chart format.voidsaveProperties(StringBuilder buffer, int depth) Writes the format properties to output.voidsetAbbreviation(Abbreviation abbreviation) Sets the abbreviation of formatted values.voidsetFormatingProperties(com.inet.report.chart.format.FormatingProperties properties) Sets the location specific formating properties, e.g. locale, time zone, first day of week.voidsetMinusSymbol(int minusSymbol) Sets the flag that control the placing and form of the minus symbol.voidsetNumberOfDecimalPlaces(int numberOfDecimalPlaces) Sets the number of decimal places of this number format.voidsetUseThousandSeparator(boolean useThousandSeparator) Sets the flag that controls the showing of thousands separator.Von Klasse geerbte Methoden NumberFormat
equals, format, format, format, getAvailableLocales, getCompactNumberInstance, getCompactNumberInstance, getCurrency, getCurrencyInstance, getCurrencyInstance, getInstance, getInstance, getIntegerInstance, getIntegerInstance, getMaximumFractionDigits, getMaximumIntegerDigits, getMinimumFractionDigits, getMinimumIntegerDigits, getNumberInstance, getNumberInstance, getPercentInstance, getPercentInstance, getRoundingMode, hashCode, isGroupingUsed, isParseIntegerOnly, isStrict, parse, parseObject, setCurrency, setGroupingUsed, setMaximumFractionDigits, setMaximumIntegerDigits, setMinimumFractionDigits, setMinimumIntegerDigits, setParseIntegerOnly, setRoundingMode, setStrictVon Klasse geerbte Methoden Format
format, formatToCharacterIterator, parseObject
-
Felddetails
-
DEFAULT_NUMBER_OF_DECIMAL_PLACES
public static final int DEFAULT_NUMBER_OF_DECIMAL_PLACESDefault number of decimal places.- Siehe auch:
-
DEFAULT_USE_THOUSANDS_SEPARATOR
public static final boolean DEFAULT_USE_THOUSANDS_SEPARATORDefault using of thousands separator.- Siehe auch:
-
DEFAULT_ABBREVIATION
The default abbreviation. -
MINUS_SIGN_BEFORE
public static final int MINUS_SIGN_BEFOREMinus symbol is placed before number.- Siehe auch:
-
MINUS_SIGN_AFTER
public static final int MINUS_SIGN_AFTERMinus symbol is placed after number.- Siehe auch:
-
MINUS_SIGN_BRACKETS
public static final int MINUS_SIGN_BRACKETSUse brackets instead of minus.- Siehe auch:
-
MINUS_SIGN_SYSTEM_DEFAULT
public static final int MINUS_SIGN_SYSTEM_DEFAULTUse system default pattern for negative values.- Siehe auch:
-
FORMAT_NUMBER
public static final int FORMAT_NUMBERThe number format style- Siehe auch:
-
FORMAT_PERCENT
public static final int FORMAT_PERCENTThe percent format style- Siehe auch:
-
FORMAT_CURRENCY
public static final int FORMAT_CURRENCYThe currency format style- Siehe auch:
-
-
Konstruktordetails
-
FixedNumberFormat
public FixedNumberFormat()Creates a new instance of format with typeFORMAT_NUMBERand default properties.- Seit:
- 8.0
- Siehe auch:
-
FixedNumberFormat
public FixedNumberFormat(int type) Creates a new instance of format with default properties.- Parameter:
type- the formating type- Löst aus:
IllegalArgumentException- by illegal type.- Seit:
- 8.0
- Siehe auch:
-
-
Methodendetails
-
getAbbreviation
Returns the abbreviation of formatted values.- Gibt zurück:
- the abbreviation
- Seit:
- 8.0
- Siehe auch:
-
setAbbreviation
Sets the abbreviation of formatted values. Note: this property works with number format only, not with currency or percent.- Parameter:
abbreviation- the abbreviation (nullnot permitted)- Seit:
- 8.0
- Siehe auch:
-
getNumberOfDecimalPlaces
public int getNumberOfDecimalPlaces()Returns the number of decimal places of this number format. The format handles a value with more digits to the right of the decimal point as set with this function by rounding up.- Gibt zurück:
- the number of decimals.
- Seit:
- 8.0
- Siehe auch:
-
setNumberOfDecimalPlaces
public void setNumberOfDecimalPlaces(int numberOfDecimalPlaces) Sets the number of decimal places of this number format. The format handles a value with more digits to the right of the decimal point as set with this function by rounding up.- Parameter:
numberOfDecimalPlaces- the number of places- Löst aus:
IllegalArgumentException- by negative number.- Seit:
- 8.0
-
isUseThousandSeparator
public boolean isUseThousandSeparator()Returns the flag that controls the showing of thousands separator.- Gibt zurück:
- the flag.
- Seit:
- 8.0
- Siehe auch:
-
setUseThousandSeparator
public void setUseThousandSeparator(boolean useThousandSeparator) Sets the flag that controls the showing of thousands separator.- Parameter:
useThousandSeparator- the flag- Seit:
- 8.0
- Siehe auch:
-
getMinusSymbol
public int getMinusSymbol()Returns the flag that control the placing and form of the minus symbol.- Gibt zurück:
- the flag.
- Seit:
- 8.0
- Siehe auch:
-
setMinusSymbol
public void setMinusSymbol(int minusSymbol) Sets the flag that control the placing and form of the minus symbol.- Parameter:
minusSymbol- the flag- Seit:
- 8.0
- Siehe auch:
-
setFormatingProperties
public void setFormatingProperties(com.inet.report.chart.format.FormatingProperties properties) Sets the location specific formating properties, e.g. locale, time zone, first day of week.- Angegeben von:
setFormatingPropertiesin SchnittstelleChartFormat- Parameter:
properties- the properties object (nullnot permitted)
-
format
- Angegeben von:
formatin KlasseNumberFormat
-
format
- Angegeben von:
formatin KlasseNumberFormat
-
parse
- Angegeben von:
parsein KlasseNumberFormat
-
saveProperties
Writes the format properties to output.- Angegeben von:
savePropertiesin SchnittstelleChartFormat- Parameter:
buffer- the outputdepth- the depth of XML indent
-
readProperties
Reads the XML properties of a chart format.- Angegeben von:
readPropertiesin SchnittstelleChartFormat- Parameter:
element- DOM element- Siehe auch:
-
clone
Overrides Cloneable- Angegeben von:
clonein SchnittstelleChartFormat- Setzt außer Kraft:
clonein KlasseNumberFormat- Gibt zurück:
- the chart format
-
getName
FOR INTERNAL USE ONLY Returns the XML attribute name for this dataset.- Gibt zurück:
- the name.
-
getType
public int getType()Returns the formating type: number, currency or percent.- Gibt zurück:
- the type
- Seit:
- 8.0
- Siehe auch:
-