class HRuleextends Rule
Represents a horizontal rule in RRD graphs. Draws a horizontal line at a specific value across the graph with optional legend.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) final double
    The value at which to draw the horizontal rule

    Fields inherited from class Rule

    legend, stroke
    Modifier and Type
    Field
    Description
    (package private) final LegendText
    Legend text for this rule
    (package private) final BasicStroke
    Stroke style for drawing the rule line

    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
    HRule(double value, Paint color, LegendText legend, BasicStroke stroke)
    Creates a horizontal rule at the specified value.
  • Method Summary

    All Methods
    Modifier and Type
    Method
    Description
    (package private) void
    setLegendVisibility(double minval, double maxval, boolean forceLegend)
    Sets legend visibility based on value range and force setting.

    Methods inherited from class Object

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

    • value

      final double value
      The value at which to draw the horizontal rule
  • Constructor Details

    • HRule

      HRule(double value, Paint color, LegendText legend, BasicStroke stroke)
      Creates a horizontal rule at the specified value.
      Parameters:
      value - the y-axis value for the rule
      color - color for the rule line
      legend - optional legend text
      stroke - stroke style for the line
  • Method Details

    • setLegendVisibility

      void setLegendVisibility(double minval, double maxval, boolean forceLegend)
      Sets legend visibility based on value range and force setting.
      Parameters:
      minval - minimum value range
      maxval - maximum value range
      forceLegend - if true, legend is always visible