de.gsi.chart.axes.spi.transforms.AbstractAxisTransform Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of chartfx-chart Show documentation
Show all versions of chartfx-chart Show documentation
This charting library ${project.artifactId}- is an extension
in the spirit of Oracle's XYChart and performance/time-proven JDataViewer charting functionalities.
Emphasis was put on plotting performance for both large number of data points and real-time displays,
as well as scientific accuracies leading to error bar/surface plots, and other scientific plotting
features (parameter measurements, fitting, multiple axes, zoom, ...).
package de.gsi.chart.axes.spi.transforms;
import de.gsi.chart.axes.Axis;
import de.gsi.chart.axes.AxisTransform;
/**
* @author rstein
*/
public abstract class AbstractAxisTransform implements AxisTransform {
protected Axis axis;
protected double rangeMin = -Double.MAX_VALUE;
protected double rangeMax = +Double.MAX_VALUE;
protected AbstractAxisTransform(final Axis axis) {
this.axis = axis;
axis.lowerBoundProperty().addListener((ch, o, n) -> rangeMin = n.doubleValue());
axis.upperBoundProperty().addListener((ch, o, n) -> rangeMax = n.doubleValue());
}
@Override
public double getMinimumRange() {
return rangeMin;
}
@Override
public double getMaximumRange() {
return rangeMax;
}
@Override
public void setMinimumRange(final double val) {
axis.lowerBoundProperty().set(val);
}
@Override
public void setMaximumRange(final double val) {
axis.upperBoundProperty().set(val);
}
}