Class DefaultTimeTickUnitSupplier

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double computeTickUnit​(double referenceTickUnit)
      Should return tick unit that is equal or greater to the given reference tick unit.
      static int getTickIndex​(double referenceTickUnit)
      Gets the index in the TICK_UNIT_DEFAULT list, for which the tick unit is just larger or equal to the reference tick unit.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • TICK_UNIT_DEFAULTS

        public static final double[] TICK_UNIT_DEFAULTS
        We use these for auto ranging to pick a user friendly tick unit. (must be increasingly bigger)
      • TICK_UNIT_FORMATTER_DEFAULTS

        public static final java.lang.String[] TICK_UNIT_FORMATTER_DEFAULTS
        These are matching date formatter strings N.B. spaces are being replaced with carriage returns '\n'
    • Constructor Detail

      • DefaultTimeTickUnitSupplier

        public DefaultTimeTickUnitSupplier()
    • Method Detail

      • computeTickUnit

        public double computeTickUnit​(double referenceTickUnit)
        Should return tick unit that is equal or greater to the given reference tick unit.
        Specified by:
        computeTickUnit in interface TickUnitSupplier
        Parameters:
        referenceTickUnit - reference tick unit
        Returns:
        the computed unit that is equal or grater to the specified one
      • getTickIndex

        public static int getTickIndex​(double referenceTickUnit)
        Gets the index in the TICK_UNIT_DEFAULT list, for which the tick unit is just larger or equal to the reference tick unit.
        Parameters:
        referenceTickUnit - pre-computed tick unit
        Returns:
        index in the TICK_UNIT_DEFAULT list