public class PatternNumberFormat extends java.text.NumberFormat implements ChartFormat
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_PATTERN
The default pattern with thousands separator and two decimals.
|
Constructor and Description |
---|
PatternNumberFormat()
Creates a new instance of format.
|
Modifier and Type | Method and Description |
---|---|
PatternNumberFormat |
clone()
Overrides Cloneable
|
java.lang.StringBuffer |
format(double number,
java.lang.StringBuffer toAppendTo,
java.text.FieldPosition pos) |
java.lang.StringBuffer |
format(long number,
java.lang.StringBuffer toAppendTo,
java.text.FieldPosition pos) |
java.lang.String |
getPattern()
Returns the format pattern.
|
java.lang.Number |
parse(java.lang.String source,
java.text.ParsePosition parsePosition) |
void |
readProperties(org.w3c.dom.Element element)
Reads the XML properties of a chart format.
|
void |
saveProperties(java.lang.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(java.lang.String pattern)
Sets the format pattern.
|
public static final java.lang.String DEFAULT_PATTERN
public PatternNumberFormat()
public java.lang.String getPattern()
setPattern(String)
public void setPattern(java.lang.String pattern)
pattern
- the pattern (null
not permitted)getPattern()
public void setFormatingProperties(com.inet.report.chart.format.FormatingProperties properties)
setFormatingProperties
in interface ChartFormat
properties
- the properties object (null
not permitted)public java.lang.StringBuffer format(double number, java.lang.StringBuffer toAppendTo, java.text.FieldPosition pos)
format
in class java.text.NumberFormat
public java.lang.StringBuffer format(long number, java.lang.StringBuffer toAppendTo, java.text.FieldPosition pos)
format
in class java.text.NumberFormat
public java.lang.Number parse(java.lang.String source, java.text.ParsePosition parsePosition)
parse
in class java.text.NumberFormat
public void saveProperties(java.lang.StringBuilder buffer, int depth)
saveProperties
in interface ChartFormat
buffer
- the outputdepth
- the depth of XML indentpublic void readProperties(org.w3c.dom.Element element)
readProperties
in interface ChartFormat
element
- DOM elementChartFormat.saveProperties(StringBuilder, int)
public PatternNumberFormat clone()
clone
in interface ChartFormat
clone
in class java.text.NumberFormat
Copyright © 1999-2020 by i-net software GmbH