Package de.gsi.chart.axes.spi.format
Class AbstractFormatter
- java.lang.Object
-
- javafx.util.StringConverter<java.lang.Number>
-
- de.gsi.chart.axes.spi.format.AbstractFormatter
-
- All Implemented Interfaces:
AxisLabelFormatter
- Direct Known Subclasses:
DefaultFormatter,DefaultLogFormatter,DefaultTimeFormatter,SimpleFormatter
public abstract class AbstractFormatter extends javafx.util.StringConverter<java.lang.Number> implements AxisLabelFormatter
- Author:
- rstein
-
-
Field Summary
Fields Modifier and Type Field Description protected FormatterLabelCachelabelCacheprotected doublelocalSchmidtTriggerThresholdprotected java.util.List<java.lang.Double>majorTickMarksCopyprotected doublerangeMaxprotected doublerangeMinprotected javafx.beans.property.DoublePropertyschmittTriggerThresholdprotected doubleunitScaling
-
Constructor Summary
Constructors Constructor Description AbstractFormatter()AbstractFormatter(Axis axis)Construct a DefaultFormatter for the given NumberAxis
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected doublegetLogRange()protected doublegetRange()TickUnitSuppliergetTickUnitSupplier()Returns the value of thetickUnitSupplierProperty().protected abstract voidrangeUpdated()javafx.beans.property.DoublePropertyschmittTriggerThresholdProperty()sets the min/max threshold when to change from one formatter domain to the othervoidsetTickUnitSupplier(TickUnitSupplier supplier)Sets the value of thetickUnitSupplierProperty().javafx.beans.property.ObjectProperty<TickUnitSupplier>tickUnitSupplierProperty()Strategy to compute major tick unit when auto-range is on or when axis bounds change.voidupdateFormatter(java.util.List<java.lang.Double> newMajorTickMarks, double unitScaling)Called just before new TickMarks are computed-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.gsi.chart.axes.AxisLabelFormatter
fromString, toString
-
-
-
-
Field Detail
-
labelCache
protected FormatterLabelCache labelCache
-
majorTickMarksCopy
protected java.util.List<java.lang.Double> majorTickMarksCopy
-
unitScaling
protected double unitScaling
-
rangeMin
protected double rangeMin
-
rangeMax
protected double rangeMax
-
localSchmidtTriggerThreshold
protected double localSchmidtTriggerThreshold
-
schmittTriggerThreshold
protected javafx.beans.property.DoubleProperty schmittTriggerThreshold
-
-
Constructor Detail
-
AbstractFormatter
public AbstractFormatter()
-
AbstractFormatter
public AbstractFormatter(Axis axis)
Construct a DefaultFormatter for the given NumberAxis- Parameters:
axis- The axis to format tick marks for
-
-
Method Detail
-
getLogRange
protected double getLogRange()
-
getRange
protected double getRange()
-
getTickUnitSupplier
public TickUnitSupplier getTickUnitSupplier()
Returns the value of thetickUnitSupplierProperty().- Specified by:
getTickUnitSupplierin interfaceAxisLabelFormatter- Returns:
- the TickUnitSupplier
-
rangeUpdated
protected abstract void rangeUpdated()
-
schmittTriggerThresholdProperty
public javafx.beans.property.DoubleProperty schmittTriggerThresholdProperty()
sets the min/max threshold when to change from one formatter domain to the other- Returns:
- the Schmitt trigger threshold property
-
setTickUnitSupplier
public void setTickUnitSupplier(TickUnitSupplier supplier)
Sets the value of thetickUnitSupplierProperty().- Specified by:
setTickUnitSupplierin interfaceAxisLabelFormatter- Parameters:
supplier- the tick unit supplier. Ifnull, the default one will be used
-
tickUnitSupplierProperty
public javafx.beans.property.ObjectProperty<TickUnitSupplier> tickUnitSupplierProperty()
Strategy to compute major tick unit when auto-range is on or when axis bounds change. By default initialised toDefaultTickUnitSupplier.See
TickUnitSupplierfor more information about the expected behaviour of the strategy.- Specified by:
tickUnitSupplierPropertyin interfaceAxisLabelFormatter- Returns:
- tickUnitSupplier property
-
updateFormatter
public void updateFormatter(java.util.List<java.lang.Double> newMajorTickMarks, double unitScaling)Description copied from interface:AxisLabelFormatterCalled just before new TickMarks are computed- Specified by:
updateFormatterin interfaceAxisLabelFormatter- Parameters:
newMajorTickMarks- for which the labels should be computedunitScaling- scaling applied to the raw data set units
-
-