Interface TickUnitSupplier

  • All Known Implementing Classes:
    DefaultTickUnitSupplier, DefaultTimeTickUnitSupplier
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface TickUnitSupplier
    Supplier of Axis tick units that is expected to compute a tick unit that is equal or greater than the one given as argument. In case the calculated tick labels don't fit on the axis, the computeTickUnit(double) method is called again with a grater reference unit so that the supplier can calculate next bigger value of the tick unit.

    If the computeTickUnit(double) returns value that is smaller than the reference unit, the value will be used without further checks which may result in tick labels overlapping.

    If the computeTickUnit(double) returns value smaller than or equal to zero, IllegalArgumentException will be thrown at runtime.

    Author:
    Grzegorz Kruk
    • Method Detail

      • computeTickUnit

        double computeTickUnit​(double referenceTickUnit)
        Should return tick unit that is equal or grater to the given reference tick unit.
        Parameters:
        referenceTickUnit - reference tick unit
        Returns:
        the computed unit that is equal or grater to the specified one