public static class NumberAxis.DefaultFormatter
extends <any>
Modifier and Type | Field and Description |
---|---|
private java.text.DecimalFormat |
formatter |
private java.lang.String |
prefix |
private java.lang.String |
suffix |
Constructor and Description |
---|
DefaultFormatter(NumberAxis axis)
Construct a DefaultFormatter for the given NumberAxis
|
DefaultFormatter(NumberAxis axis,
java.lang.String prefix,
java.lang.String suffix)
Construct a DefaultFormatter for the given NumberAxis with a prefix and/or suffix.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Number |
fromString(java.lang.String string)
Converts the string provided into a Number defined by the this converter.
|
java.lang.String |
toString(java.lang.Number object)
Converts the object provided into its string form.
|
private java.lang.String |
toString(java.lang.Number object,
java.text.DecimalFormat formatter) |
private java.lang.String |
toString(java.lang.Number object,
java.lang.String numFormatter) |
private java.text.DecimalFormat formatter
private java.lang.String prefix
private java.lang.String suffix
public DefaultFormatter(NumberAxis axis)
axis
- The axis to format tick marks forpublic DefaultFormatter(NumberAxis axis, java.lang.String prefix, java.lang.String suffix)
axis
- The axis to format tick marks forprefix
- The prefix to append to the start of formatted number, can be null if not neededsuffix
- The suffix to append to the end of formatted number, can be null if not neededpublic java.lang.String toString(java.lang.Number object)
StringConverter#toString
private java.lang.String toString(java.lang.Number object, java.lang.String numFormatter)
private java.lang.String toString(java.lang.Number object, java.text.DecimalFormat formatter)
public java.lang.Number fromString(java.lang.String string)
StringConverter#toString