class VSpanextends Span
Represents a vertical span in RRD graphs. Draws a colored rectangular region spanning a range of timestamps on x-axis.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) final long
    Timestamp at which the span ends.
    (package private) final long
    Timestamp at which the span begins.

    Fields inherited from class Span

    legend
    Modifier and Type
    Field
    Description
    (package private) final LegendText
    The legend entry describing this span.

    Fields inherited from class PlotElement

    color
    Modifier and Type
    Field
    Description
    (package private) final Paint
    The color used for rendering this plot element
  • Constructor Summary

    Constructors
    Constructor
    Description
    VSpan(long start, long end, Paint color, LegendText legend)
    Create a span covering the given timestamp range.
  • Method Summary

    Private Methods
    Modifier and Type
    Method
    Description
    private boolean
    checkRange(long v, long min, long max)
    True if v is between min and max inclusive.
    (package private) void
    setLegendVisibility(long min, long max, boolean forceLegend)
    Hide the legend unless the span lies within the visible time range.

    Methods inherited from class Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • start

      final long start
      Timestamp at which the span begins.
    • end

      final long end
      Timestamp at which the span ends.
  • Constructor Details

    • VSpan

      VSpan(long start, long end, Paint color, LegendText legend)
      Create a span covering the given timestamp range.
      Parameters:
      start - timestamp at which the span begins
      end - timestamp at which the span ends, which must be greater than start
      color - the fill color of the span
      legend - the legend entry describing the span
  • Method Details

    • checkRange

      private boolean checkRange(long v, long min, long max)
      True if v is between min and max inclusive.
      Parameters:
      v - the timestamp to test
      min - lower bound of the range, inclusive
      max - upper bound of the range, inclusive
      Returns:
      true if v is between min and max inclusive
    • setLegendVisibility

      void setLegendVisibility(long min, long max, boolean forceLegend)
      Hide the legend unless the span lies within the visible time range.
      Parameters:
      min - start of the visible time range
      max - end of the visible time range
      forceLegend - true to keep the legend regardless of overlap