public abstract class TemporalGraph2DRenderer<T extends TemporalGraph2DRendererUpdate> extends Object
Constructor and Description |
---|
TemporalGraph2DRenderer(int graphWidth,
int graphHeight)
Creates a graph renderer.
|
Modifier and Type | Method and Description |
---|---|
protected void |
calculateGraphArea() |
protected void |
calculateRanges(Range valueRange,
TimeInterval timeInterval) |
protected void |
drawBackground() |
protected void |
drawGraphArea() |
protected void |
drawHorizontalReferenceLines() |
protected void |
drawValueLine(ListNumber xValues,
ListNumber yValues,
InterpolationScheme interpolation) |
protected void |
drawVerticalReferenceLines() |
protected void |
drawXLabels() |
protected void |
drawYLabels() |
Range |
getAggregatedRange()
The aggregated range of all the data that has been rendered.
|
TimeInterval |
getAggregatedTimeInterval()
The aggregated range of all the data that has been rendered.
|
AxisRange |
getAxisRange()
The current strategy to calculate the x range for the graph.
|
int |
getImageHeight()
The current height of the graph.
|
int |
getImageWidth()
The current width of the graph.
|
Range |
getPlotRange()
The range of the x axis in the last graph rendering.
|
TimeInterval |
getPlotTimeInterval()
The range of the y axis in the last graph rendering.
|
TimeAxisRange |
getTimeAxisRange()
The current strategy to calculate the y range for the graph.
|
abstract T |
newUpdate()
Creates a new update for the given graph.
|
protected double |
scaledX(double value) |
protected double |
scaledY(double value) |
protected void |
setClip(Graphics2D g) |
void |
update(T update)
Applies the update to the renderer.
|
protected double xPlotValueStart
protected double yPlotValueStart
protected double xPlotValueEnd
protected double yPlotValueEnd
protected double yPlotCoordHeight
protected double xPlotCoordWidth
protected double xPlotCoordStart
protected double yPlotCoordStart
protected double yPlotCoordEnd
protected double xPlotCoordEnd
protected int xAreaStart
protected int yAreaStart
protected int yAreaEnd
protected int xAreaEnd
protected int xRow2LabelMargin
protected Graphics2D g
protected Color backgroundColor
protected Color labelColor
protected Color referenceLineColor
protected Font labelFont
protected int bottomMargin
protected int topMargin
protected int leftMargin
protected int rightMargin
protected int bottomAreaMargin
protected int topAreaMargin
protected int leftAreaMargin
protected int rightAreaMargin
protected int xLabelMargin
protected int yLabelMargin
protected FontMetrics labelFontMetrics
protected ListDouble xReferenceCoords
protected ListDouble valueReferences
protected ListDouble yReferenceCoords
protected ListDouble normalizedTimeReferences
public TemporalGraph2DRenderer(int graphWidth, int graphHeight)
graphWidth
- the graph widthgraphHeight
- the graph heightpublic int getImageHeight()
public int getImageWidth()
public AxisRange getAxisRange()
public TimeAxisRange getTimeAxisRange()
public Range getAggregatedRange()
public TimeInterval getAggregatedTimeInterval()
public Range getPlotRange()
public TimeInterval getPlotTimeInterval()
public void update(T update)
When sub-classing, one should re-implement this method by first calling it and then applying all the updates specific to the sub-class.
update
- the update to applypublic abstract T newUpdate()
protected void calculateRanges(Range valueRange, TimeInterval timeInterval)
protected void drawHorizontalReferenceLines()
protected void drawVerticalReferenceLines()
protected void calculateGraphArea()
protected void drawBackground()
protected void drawGraphArea()
protected void drawValueLine(ListNumber xValues, ListNumber yValues, InterpolationScheme interpolation)
protected final double scaledX(double value)
protected final double scaledY(double value)
protected void setClip(Graphics2D g)
protected void drawYLabels()
protected void drawXLabels()
Copyright © 2015. All rights reserved.