java.lang.Object
org.rrd4j.graph.PlotElement
org.rrd4j.graph.Span
org.rrd4j.graph.VSpan
Represents a vertical span in RRD graphs. Draws a colored rectangular region spanning a range of timestamps on x-axis.
Field Summary
FieldsFields inherited from class Span
legendModifier and TypeFieldDescription(package private) final LegendTextThe legend entry describing this span.Fields inherited from class PlotElement
colorConstructor Summary
ConstructorsConstructorDescriptionVSpan(long start, long end, Paint color, LegendText legend) Create a span covering the given timestamp range.Method Summary
Private MethodsModifier and TypeMethodDescriptionprivate booleancheckRange(long v, long min, long max) True if v is between min and max inclusive.(package private) voidsetLegendVisibility(long min, long max, boolean forceLegend) Hide the legend unless the span lies within the visible time range.
Field Details
start
final long startTimestamp at which the span begins.end
final long endTimestamp 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 beginsend- timestamp at which the span ends, which must be greater than startcolor- the fill color of the spanlegend- 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 testmin- lower bound of the range, inclusivemax- 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 rangemax- end of the visible time rangeforceLegend- true to keep the legend regardless of overlap