Package de.gsi.chart.axes.spi.format
Class SimpleFormatter
- java.lang.Object
-
- javafx.util.StringConverter<java.lang.Number>
-
- de.gsi.chart.axes.spi.format.AbstractFormatter
-
- de.gsi.chart.axes.spi.format.SimpleFormatter
-
- All Implemented Interfaces:
AxisLabelFormatter
public class SimpleFormatter extends AbstractFormatter
- Author:
- rstein
-
-
Field Summary
-
Fields inherited from class de.gsi.chart.axes.spi.format.AbstractFormatter
labelCache, localSchmidtTriggerThreshold, majorTickMarksCopy, rangeMax, rangeMin, schmittTriggerThreshold, unitScaling
-
-
Constructor Summary
Constructors Constructor Description SimpleFormatter()Construct a DefaultFormatter for the given NumberAxisSimpleFormatter(Axis axis)Construct a DefaultFormatter for the given NumberAxisSimpleFormatter(Axis axis, java.lang.String prefix, java.lang.String suffix)Construct a DefaultFormatter for the given NumberAxis with a prefix and/or suffix.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.NumberfromString(java.lang.String string)Converts the string provided into a Number defined by the this converter.protected voidrangeUpdated()java.lang.StringtoString(java.lang.Number object)Converts the object provided into its string form.-
Methods inherited from class de.gsi.chart.axes.spi.format.AbstractFormatter
getLogRange, getRange, getTickUnitSupplier, schmittTriggerThresholdProperty, setTickUnitSupplier, tickUnitSupplierProperty, updateFormatter
-
-
-
-
Constructor Detail
-
SimpleFormatter
public SimpleFormatter()
Construct a DefaultFormatter for the given NumberAxis
-
SimpleFormatter
public SimpleFormatter(Axis axis)
Construct a DefaultFormatter for the given NumberAxis- Parameters:
axis- The axis to format tick marks for
-
SimpleFormatter
public SimpleFormatter(Axis axis, java.lang.String prefix, java.lang.String suffix)
Construct a DefaultFormatter for the given NumberAxis with a prefix and/or suffix.- Parameters:
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 needed
-
-
Method Detail
-
fromString
public java.lang.Number fromString(java.lang.String string)
Converts the string provided into a Number defined by the this converter. Format of the string and type of the resulting object is defined by this converter.- Specified by:
fromStringin interfaceAxisLabelFormatter- Specified by:
fromStringin classjavafx.util.StringConverter<java.lang.Number>- Parameters:
string- the string to be converted back into a number- Returns:
- a Number representation of the string passed in.
- See Also:
StringConverter.toString(T)
-
rangeUpdated
protected void rangeUpdated()
- Specified by:
rangeUpdatedin classAbstractFormatter
-
toString
public java.lang.String toString(java.lang.Number object)
Converts the object provided into its string form. Format of the returned string is defined by this converter.- Specified by:
toStringin interfaceAxisLabelFormatter- Specified by:
toStringin classjavafx.util.StringConverter<java.lang.Number>- Parameters:
object- the number to be converted- Returns:
- a string representation of the object passed in.
- See Also:
StringConverter.toString(T)
-
-