java.lang.Object
org.rrd4j.graph.PlotElement
org.rrd4j.graph.SourcedPlotElement
Direct Known Subclasses:
Area, Line, Stack

class SourcedPlotElementextends PlotElement
Represents a plot element that obtains data from a named source. Extends PlotElement to handle data assignment, stacking, and value calculations. Supports parent-child relationships for stacked graph elements and provides value range calculations.
  • Field Details

    • srcName

      final String srcName
      The source name.
    • parent

      final SourcedPlotElement parent
      The parent element, or null.
    • values

      double[] values
      The values.
  • Constructor Details

    • SourcedPlotElement

      SourcedPlotElement(String srcName, Paint color)
      Create a SourcedPlotElement.
      Parameters:
      srcName - the source name
      color - the paint color
    • SourcedPlotElement

      SourcedPlotElement(String srcName, Paint color, SourcedPlotElement parent)
      Create a SourcedPlotElement with a parent.
      Parameters:
      srcName - the source name
      color - the paint color
      parent - the parent element for stacking
  • Method Details

    • assignValues

      void assignValues(DataProcessor dproc)
      Assign values from the data processor.
      Parameters:
      dproc - the data processor
    • stackValues

      double[] stackValues(DataProcessor dproc)
      Stack values on top of parent values.
      Parameters:
      dproc - the data processor
      Returns:
      the stacked values
    • getParentColor

      Paint getParentColor()
      Get the parent's color.
      Returns:
      the parent's color, or null
    • getValues

      double[] getValues()
      Get the values.
      Returns:
      the backing array itself, not a copy
    • getMinValue

      double getMinValue()
      Get the minimum value.
      Returns:
      the minimum value
    • getMaxValue

      double getMaxValue()
      Get the maximum value.
      Returns:
      the maximum value