Class TimeLabelsAndTicksDescriptor

java.lang.Object
com.amalgamasimulation.charts.axes.ticks.TimeLabelsAndTicksDescriptor

public class TimeLabelsAndTicksDescriptor extends Object
Class representing the parameters descriptor of the chart axis ticks and labels for a particular displayed range.
Author:
Aleksey Kirillov
  • Constructor Details

    • TimeLabelsAndTicksDescriptor

      public TimeLabelsAndTicksDescriptor(AxisTimeStyle axisTimeStyle, double minWindowSize, double maxWindowSize, TimeTicksParameters majorTicksParameters, TimeTicksParameters minorTicksParameters, Function<LocalDateTime,String> majorTickLabelsProvider)
      Constructs a descriptor with manually setting of all initialization parameters.
      Parameters:
      axisTimeStyle - AxisTimeStyle which is the owner of this object
      minWindowSize - displayed range minimum size
      maxWindowSize - displayed range maximum size
      majorTicksParameters - TimeTicksParameters for major ticks
      minorTicksParameters - TimeTicksParameters for minor ticks
      majorTickLabelsProvider - the formatter to tick labels, i.e. the function that takes a LocalDateTime value and produces a String that should be drawn to represent this value
  • Method Details

    • getAxisTimeStyle

      public AxisTimeStyle getAxisTimeStyle()
      Returns the axis time style which is the owner of this object.
      Returns:
      the axis time style which is the owner of this object.
    • getMinWindowSize

      public double getMinWindowSize()
      Returns the displayed range minimum size.
      Returns:
      the displayed range minimum size
    • getMaxWindowSize

      public double getMaxWindowSize()
      Returns the displayed range maximum size.
      Returns:
      the displayed range maximum size
    • getMajorTicksParameters

      public TimeTicksParameters getMajorTicksParameters()
      Returns the major ticks frequency descriptor.
      Returns:
      the major ticks frequency descriptor
    • getMinorTicksParameters

      public TimeTicksParameters getMinorTicksParameters()
      Returns the minor ticks frequency descriptor.
      Returns:
      the minor ticks frequency descriptor
    • getMajorTickLabelsProvider

      public Function<LocalDateTime,String> getMajorTickLabelsProvider()
      Returns the formatter to tick labels, i.e. the function that takes a LocalDateTime value and produces a String that should be drawn to represent this value.
      Returns:
      the formatter to tick labels