class HSpanextends Span
Represents a horizontal span in RRD graphs. Draws a colored rectangular region spanning a range of values on the y-axis.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) final double
    Value at which the span ends.
    (package private) final double
    Value 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
    HSpan(double start, double end, Paint color, LegendText legend)
    Create a span covering the given value range.
  • Method Summary

    Private Methods
    Modifier and Type
    Method
    Description
    private boolean
    checkRange(double v, double min, double max)
    Returns true when the value lies between the bounds, inclusive.
    (package private) void
    setLegendVisibility(double min, double max, boolean forceLegend)
    Control legend visibility based on current axis range.

    Methods inherited from class Object

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

    • start

      final double start
      Value at which the span begins.
    • end

      final double end
      Value at which the span ends.
  • Constructor Details

    • HSpan

      HSpan(double start, double end, Paint color, LegendText legend)
      Create a span covering the given value range.
      Parameters:
      start - value at which the span begins
      end - value 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(double v, double min, double max)
      Returns true when the value lies between the bounds, inclusive.
      Parameters:
      v - the value to test
      min - the lower bound
      max - the upper bound
      Returns:
      true if the value lies between the bounds, inclusive
    • setLegendVisibility

      void setLegendVisibility(double min, double max, boolean forceLegend)
      Control legend visibility based on current axis range.
      Parameters:
      min - the lower bound of the visible y-axis range
      max - the upper bound of the visible y-axis range
      forceLegend - when true, keep the legend shown whatever the span's overlap