public abstract class Graph2DRenderer<T extends Graph2DRendererUpdate> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Color |
backgroundColor |
protected int |
bottomAreaMargin |
protected int |
bottomMargin |
protected Graphics2D |
g |
protected Color |
labelColor |
protected Font |
labelFont |
protected FontMetrics |
labelFontMetrics |
protected int |
leftAreaMargin |
protected int |
leftMargin |
protected Color |
referenceLineColor |
protected int |
rightAreaMargin |
protected int |
rightMargin |
protected int |
topAreaMargin |
protected int |
topMargin |
protected int |
xAreaEnd |
protected int |
xAreaStart |
protected int |
xLabelMargin |
protected double |
xPlotCoordEnd |
protected double |
xPlotCoordStart |
protected double |
xPlotCoordWidth |
protected double |
xPlotValueEnd |
protected double |
xPlotValueStart |
protected org.epics.util.array.ListDouble |
xReferenceCoords |
protected List<String> |
xReferenceLabels |
protected org.epics.util.array.ListDouble |
xReferenceValues |
protected int |
yAreaEnd |
protected int |
yAreaStart |
protected int |
yLabelMargin |
protected double |
yPlotCoordEnd |
protected double |
yPlotCoordHeight |
protected double |
yPlotCoordStart |
protected double |
yPlotValueEnd |
protected double |
yPlotValueStart |
protected org.epics.util.array.ListDouble |
yReferenceCoords |
protected List<String> |
yReferenceLabels |
protected org.epics.util.array.ListDouble |
yReferenceValues |
| Constructor and Description |
|---|
Graph2DRenderer(int graphWidth,
int graphHeight)
Creates a graph renderer.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
calculateGraphArea() |
protected void |
calculateRanges(Range xDataRange,
Range yDataRange) |
protected void |
drawBackground() |
protected void |
drawGraphArea() |
protected void |
drawHorizontalReferenceLines() |
protected void |
drawValueExplicitLine(org.epics.util.array.ListNumber xValues,
org.epics.util.array.ListNumber yValues,
InterpolationScheme interpolation,
ReductionScheme reduction) |
protected void |
drawValueLine(org.epics.util.array.ListNumber xValues,
org.epics.util.array.ListNumber yValues,
InterpolationScheme interpolation) |
protected void |
drawVerticalReferenceLines() |
protected void |
drawXLabels() |
protected void |
drawYLabels() |
int |
getImageHeight()
The current height of the graph.
|
int |
getImageWidth()
The current width of the graph.
|
Range |
getXAggregatedRange()
The aggregated range of all the data that has been rendered.
|
AxisRange |
getXAxisRange()
The current strategy to calculate the x range for the graph.
|
Range |
getXPlotRange()
The range of the x axis in the last graph rendering.
|
Range |
getYAggregatedRange()
The aggregated range of all the data that has been rendered.
|
AxisRange |
getYAxisRange()
The current strategy to calculate the y range for the graph.
|
Range |
getYPlotRange()
The range of the y axis in the last graph rendering.
|
abstract T |
newUpdate()
Creates a new update for the given graph.
|
protected void |
processScaledValue(int index,
double valueX,
double valueY,
double scaledX,
double scaledY) |
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 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 org.epics.util.array.ListDouble xReferenceCoords
protected org.epics.util.array.ListDouble xReferenceValues
protected org.epics.util.array.ListDouble yReferenceCoords
protected org.epics.util.array.ListDouble yReferenceValues
public Graph2DRenderer(int graphWidth,
int graphHeight)
graphWidth - the graph widthgraphHeight - the graph heightpublic int getImageHeight()
public int getImageWidth()
public AxisRange getXAxisRange()
public AxisRange getYAxisRange()
public Range getXAggregatedRange()
public Range getYAggregatedRange()
public Range getXPlotRange()
public Range getYPlotRange()
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 drawHorizontalReferenceLines()
protected void drawVerticalReferenceLines()
protected void calculateGraphArea()
protected void drawBackground()
protected void drawGraphArea()
protected void processScaledValue(int index,
double valueX,
double valueY,
double scaledX,
double scaledY)
protected void drawValueLine(org.epics.util.array.ListNumber xValues,
org.epics.util.array.ListNumber yValues,
InterpolationScheme interpolation)
protected void drawValueExplicitLine(org.epics.util.array.ListNumber xValues,
org.epics.util.array.ListNumber yValues,
InterpolationScheme interpolation,
ReductionScheme reduction)
protected final double scaledX(double value)
protected final double scaledY(double value)
protected void setClip(Graphics2D g)
protected void drawYLabels()
protected void drawXLabels()
Copyright © 2012-2013 Brookhaven National Laboratory, University of Michigan. All Rights Reserved.