java.lang.Object
org.rrd4j.graph.PlotElement
org.rrd4j.graph.SourcedPlotElement
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 Summary
FieldsModifier and TypeFieldDescription(package private) final SourcedPlotElementThe parent element, or null.(package private) final StringThe source name.(package private) double[]The values.Fields inherited from class PlotElement
colorConstructor Summary
ConstructorsConstructorDescriptionSourcedPlotElement(String srcName, Paint color) Create a SourcedPlotElement.SourcedPlotElement(String srcName, Paint color, SourcedPlotElement parent) Create a SourcedPlotElement with a parent.Method Summary
All MethodsModifier and TypeMethodDescription(package private) voidassignValues(DataProcessor dproc) Assign values from the data processor.(package private) doubleGet the maximum value.(package private) doubleGet the minimum value.(package private) PaintGet the parent's color.(package private) double[]Get the values.(package private) double[]stackValues(DataProcessor dproc) Stack values on top of parent values.
Field Details
srcName
The source name.parent
The parent element, or null.values
double[] valuesThe values.
Constructor Details
SourcedPlotElement
SourcedPlotElement
SourcedPlotElement(String srcName, Paint color, SourcedPlotElement parent) Create a SourcedPlotElement with a parent.- Parameters:
srcName- the source namecolor- the paint colorparent- the parent element for stacking
Method Details
assignValues
Assign values from the data processor.- Parameters:
dproc- the data processor
stackValues
Stack values on top of parent values.- Parameters:
dproc- the data processor- Returns:
- the stacked values
getParentColor
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