Package com.inet.report.chart.format
Class PatternNumberFormat
java.lang.Object
java.text.Format
java.text.NumberFormat
com.inet.report.chart.format.PatternNumberFormat
- All Implemented Interfaces:
ChartFormat
,Serializable
,Cloneable
This is a number format defined by a pattern.
For more information to the pattern see http://docs.oracle.com/javase/8/docs/api/java/text/DecimalFormat.html
For more information to the pattern see http://docs.oracle.com/javase/8/docs/api/java/text/DecimalFormat.html
- Since:
- 8.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.text.NumberFormat
NumberFormat.Field, NumberFormat.Style
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The default pattern with thousands separator and two decimals.Fields inherited from class java.text.NumberFormat
FRACTION_FIELD, INTEGER_FIELD
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
Overrides Cloneableformat
(double number, StringBuffer toAppendTo, FieldPosition pos) format
(long number, StringBuffer toAppendTo, FieldPosition pos) protected String
getName()
FOR INTERNAL USE ONLY Returns the XML attribute name for this dataset.Returns the format pattern.parse
(String source, ParsePosition parsePosition) void
readProperties
(Element element) Reads the XML properties of a chart format.void
saveProperties
(StringBuilder buffer, int depth) Writes the format properties to output.void
setFormatingProperties
(com.inet.report.chart.format.FormatingProperties properties) Sets the location specific formating properties, e.g. locale, time zone, first day of week.void
setPattern
(String pattern) Sets the format pattern.Methods inherited from class java.text.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, parse, parseObject, setCurrency, setGroupingUsed, setMaximumFractionDigits, setMaximumIntegerDigits, setMinimumFractionDigits, setMinimumIntegerDigits, setParseIntegerOnly, setRoundingMode
Methods inherited from class java.text.Format
format, formatToCharacterIterator, parseObject
-
Field Details
-
DEFAULT_PATTERN
The default pattern with thousands separator and two decimals.- See Also:
-
-
Constructor Details
-
PatternNumberFormat
public PatternNumberFormat()Creates a new instance of format.- Since:
- 8.0
-
-
Method Details
-
getPattern
Returns the format pattern. The pattern should have the Java format, see this class doc.- Returns:
- the pattern.
- Since:
- 8.0
- See Also:
-
setPattern
Sets the format pattern. The pattern should have the Java format, see this class doc.- Parameters:
pattern
- the pattern (null
not permitted)- Since:
- 8.0
- See Also:
-
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.- Specified by:
setFormatingProperties
in interfaceChartFormat
- Parameters:
properties
- the properties object (null
not permitted)
-
format
- Specified by:
format
in classNumberFormat
-
format
- Specified by:
format
in classNumberFormat
-
parse
- Specified by:
parse
in classNumberFormat
-
saveProperties
Writes the format properties to output.- Specified by:
saveProperties
in interfaceChartFormat
- Parameters:
buffer
- the outputdepth
- the depth of XML indent
-
readProperties
Reads the XML properties of a chart format.- Specified by:
readProperties
in interfaceChartFormat
- Parameters:
element
- DOM element- See Also:
-
clone
Overrides Cloneable- Specified by:
clone
in interfaceChartFormat
- Overrides:
clone
in classNumberFormat
- Returns:
- the chart format
-
getName
FOR INTERNAL USE ONLY Returns the XML attribute name for this dataset.- Returns:
- the name.
-