public class LineGraph2DRenderer extends Graph2DRenderer<LineGraph2DRendererUpdate>
Modifier and Type | Field and Description |
---|---|
static List<InterpolationScheme> |
supportedInterpolationScheme |
static List<ReductionScheme> |
supportedReductionScheme |
backgroundColor, bottomAreaMargin, bottomMargin, g, labelColor, labelFont, labelFontMetrics, leftAreaMargin, leftMargin, referenceLineColor, rightAreaMargin, rightMargin, topAreaMargin, topMargin, xAreaCoordEnd, xAreaCoordStart, xLabelMargin, xPlotCoordEnd, xPlotCoordStart, xPlotCoordWidth, xPlotValueEnd, xPlotValueStart, xPointMargin, xReferenceCoords, xReferenceLabels, xReferenceValues, xValueScale, yAreaCoordEnd, yAreaCoordStart, yLabelMargin, yPlotCoordEnd, yPlotCoordHeight, yPlotCoordStart, yPlotValueEnd, yPlotValueStart, yPointMargin, yReferenceCoords, yReferenceLabels, yReferenceValues, yValueScale
Constructor and Description |
---|
LineGraph2DRenderer(int imageWidth,
int imageHeight)
Creates a new line graph renderer.
|
Modifier and Type | Method and Description |
---|---|
void |
draw(GraphBuffer buffer,
Point2DDataset data) |
void |
draw(Graphics2D g,
List<Point2DDataset> data)
Draws a graph with multiple lines, each pertaining to a different set of data.
|
void |
draw(Graphics2D g,
Point2DDataset data)
Draws the graph on the given graphics context.
|
Integer |
getFocusPixelX()
Current x-position(pixel) of the value that the mouse is focused on.
|
int |
getFocusValueIndex()
Current index of the value that the mouse is focused on.
|
InterpolationScheme |
getInterpolation()
The current interpolation used for the line.
|
boolean |
isHighlightFocusValue()
Current state of highlightFocusValue.
|
LineGraph2DRendererUpdate |
newUpdate()
Creates a new update for the given graph.
|
protected void |
processScaledValue(int index,
double valueX,
double valueY,
double scaledX,
double scaledY)
Empty function, designed to be implemented in sub-classes.
|
void |
update(LineGraph2DRendererUpdate update)
Applies the update to the renderer.
|
calculateGraphArea, calculateLabels, calculateRanges, drawBackground, drawGraphArea, drawHorizontalReferenceLines, drawValueExplicitLine, drawValueLine, drawVerticalReferenceLines, drawXLabels, drawYLabels, getImageHeight, getImageWidth, getXAggregatedRange, getXAxisRange, getXPlotRange, getYAggregatedRange, getYAxisRange, getYPlotRange, scaledX, scaledY, setClip, setupDataAsAreas, setupDataAsPoints, setupXAsAreas, setupXAsPoints, setupYAsAreas, setupYAsPoints
public static List<InterpolationScheme> supportedInterpolationScheme
public static List<ReductionScheme> supportedReductionScheme
public LineGraph2DRenderer(int imageWidth, int imageHeight)
imageWidth
- the graph widthimageHeight
- the graph heightpublic LineGraph2DRendererUpdate newUpdate()
Graph2DRenderer
newUpdate
in class Graph2DRenderer<LineGraph2DRendererUpdate>
public InterpolationScheme getInterpolation()
public boolean isHighlightFocusValue()
public int getFocusValueIndex()
public Integer getFocusPixelX()
public void update(LineGraph2DRendererUpdate update)
Graph2DRenderer
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
in class Graph2DRenderer<LineGraph2DRendererUpdate>
update
- the update to applypublic void draw(Graphics2D g, Point2DDataset data)
g
- the graphics on which to display the datadata
- the data to displaypublic void draw(GraphBuffer buffer, Point2DDataset data)
public void draw(Graphics2D g, List<Point2DDataset> data)
g
- Graphics2D object used to perform drawing functions within draw.data
- can not be nullprotected void processScaledValue(int index, double valueX, double valueY, double scaledX, double scaledY)
Graph2DRenderer
Used on every value in a dataset.
processScaledValue
in class Graph2DRenderer<LineGraph2DRendererUpdate>
index
- the index of the valuevalueX
- the x valuevalueY
- the y valuescaledX
- the x pixelscaledY
- the y pixelCopyright © 2015. All rights reserved.