All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.gsi.chart.axes.AxisLabelFormatter Maven / Gradle / Ivy

Go to download

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, ...).

There is a newer version: 11.2.7
Show newest version
package de.gsi.chart.axes;

import java.util.List;

import de.gsi.chart.axes.spi.format.DefaultTickUnitSupplier;
import javafx.beans.property.ObjectProperty;

/**
 * @author rstein
 */
public interface AxisLabelFormatter {
    // N.B. needs to be an abstract class since there is no interface definition
    // for StringConverter

    /**
     * Converts the object provided into its string form. Format of the returned
     * string is defined by the specific converter.
     *
     * @param val
     *            the number to be converted
     * @return a string representation of the object passed in.
     */
    String toString(Number val);

    /**
     * Converts the string provided into an object defined by the specific
     * converter. Format of the string and type of the resulting object is
     * defined by the specific converter.
     *
     * @param string
     *            the string to be converted back into a number
     * @return an object representation of the string passed in.
     */
    Number fromString(String string);

    /**
     * Returns the value of the {@link #tickUnitSupplierProperty()}.
     *
     * @return the TickUnitSupplier
     */
    TickUnitSupplier getTickUnitSupplier();

    /**
     * Sets the value of the {@link #tickUnitSupplierProperty()}.
     *
     * @param supplier
     *            the tick unit supplier. If {@code null}, the default one will
     *            be used
     */
    void setTickUnitSupplier(final TickUnitSupplier supplier);

    /**
     * Strategy to compute major tick unit when auto-range is on or when axis
     * bounds change. By default initialised to {@link DefaultTickUnitSupplier}.
     * 

* See {@link TickUnitSupplier} for more information about the expected * behaviour of the strategy. *

* * @return tickUnitSupplier property */ ObjectProperty tickUnitSupplierProperty(); /** * Called just before new TickMarks are computed * * @param newMajorTickMarks * for which the labels should be computed * @param unitScaling scaling applied to the raw data set units */ void updateFormatter(List newMajorTickMarks, double unitScaling); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy