Class GridMetrics.Spacing

java.lang.Object
heronarts.lx.studio.ui.timeline.GridMetrics.Spacing
Enclosing class:
GridMetrics

public static class GridMetrics.Spacing extends Object
The spacing values are read by the UI thread to draw grid backgrounds and labels, but they are written by the main LX thread when GridMetrics responds to relevant parameter changes. We use a non-locked but pseudo-immutable class here to hold the values such that at any given point in time the UI thread will get an internally consistent set of all the values (and in the case the values are out of date, there will be a pending redraw() call that results in the latest values being retrieved in a future pass).
  • Field Details

    • gridSpacing

      public final Cursor.Immutable gridSpacing
      Spacing of the grid lines, or ZERO if not present
    • labelSpacing

      public final Cursor.Immutable labelSpacing
      Spacing of the labels, which may be wider than the grid spacing, or ZERO if the labels do not fit or are not present
    • firstGridLine

      public final Cursor.Immutable firstGridLine
      Position of the first grid line in view
    • firstGridLabel

      public final Cursor.Immutable firstGridLabel
      Position of the first grid label in view
    • firstGridSectionIsAlternateColor

      public final boolean firstGridSectionIsAlternateColor
      Whether the first grid section in view uses the alternate color