Package de.gsi.chart.plugins
Class AbstractDataFormattingPlugin
- java.lang.Object
-
- de.gsi.chart.plugins.ChartPlugin
-
- de.gsi.chart.plugins.AbstractDataFormattingPlugin
-
- Direct Known Subclasses:
CrosshairIndicator,DataPointTooltip
public abstract class AbstractDataFormattingPlugin extends ChartPlugin
An abstract plugin with associated formatters for X and Y value of the data. For details seeformatData(de.gsi.chart.Chart, de.gsi.dataset.spi.utils.Tuple<java.lang.Number, java.lang.Number>).- Author:
- Grzegorz Kruk, rstein
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractDataFormattingPlugin()Creates a new instance of AbstractDataIndicator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringformatData(Chart chart, de.gsi.dataset.spi.utils.Tuple<java.lang.Number,java.lang.Number> data)Formats the data to be displayed by this plugin.javafx.util.StringConverter<java.lang.Number>getXValueFormatter()Returns the value of thexValueFormatterProperty().javafx.util.StringConverter<java.lang.Number>getYValueFormatter()Returns the value of thexValueFormatterProperty().voidsetXValueFormatter(javafx.util.StringConverter<java.lang.Number> formatter)Sets the value of thexValueFormatterProperty().voidsetYValueFormatter(javafx.util.StringConverter<java.lang.Number> formatter)Sets the value of thexValueFormatterProperty().javafx.beans.property.ObjectProperty<javafx.util.StringConverter<java.lang.Number>>xValueFormatterProperty()StringConverter used to format X values.javafx.beans.property.ObjectProperty<javafx.util.StringConverter<java.lang.Number>>yValueFormatterProperty()StringConverter used to format Y values.-
Methods inherited from class de.gsi.chart.plugins.ChartPlugin
addButtonsToToolBarProperty, chartProperty, getChart, getChartChildren, getLocationInPlotArea, isAddButtonsToToolBar, layoutChildren, registerInputEventHandler, setAddButtonsToToolBar, setChart, toDataPoint, toDisplayPoint
-
-
-
-
Method Detail
-
xValueFormatterProperty
public final javafx.beans.property.ObjectProperty<javafx.util.StringConverter<java.lang.Number>> xValueFormatterProperty()
StringConverter used to format X values. Ifnulla default will be used.- Returns:
- the X value formatter property
-
getXValueFormatter
public final javafx.util.StringConverter<java.lang.Number> getXValueFormatter()
Returns the value of thexValueFormatterProperty().- Returns:
- the X value formatter
-
setXValueFormatter
public final void setXValueFormatter(javafx.util.StringConverter<java.lang.Number> formatter)
Sets the value of thexValueFormatterProperty().- Parameters:
formatter- the X value formatter
-
yValueFormatterProperty
public final javafx.beans.property.ObjectProperty<javafx.util.StringConverter<java.lang.Number>> yValueFormatterProperty()
StringConverter used to format Y values. Ifnulla default will be used.- Returns:
- the Y value formatter property
-
getYValueFormatter
public final javafx.util.StringConverter<java.lang.Number> getYValueFormatter()
Returns the value of thexValueFormatterProperty().- Returns:
- the X value formatter
-
setYValueFormatter
public final void setYValueFormatter(javafx.util.StringConverter<java.lang.Number> formatter)
Sets the value of thexValueFormatterProperty().- Parameters:
formatter- the X value formatter
-
formatData
protected java.lang.String formatData(Chart chart, de.gsi.dataset.spi.utils.Tuple<java.lang.Number,java.lang.Number> data)
Formats the data to be displayed by this plugin. Uses the specifiedxValueFormatterProperty()andyValueFormatterProperty()to obtain the corresponding formatters. If it isnulland the axis is aValueAxis- the method will usetick label formatter. If this one is also not initialized - a default formatter is used.Can be overridden to modify formatting of the data.
- Parameters:
chart- reference to chartdata- the data point to be formatted- Returns:
- formatted data
-
-