public class MultiAxisLineGraph2DRenderer extends Graph2DRenderer<MultiAxisLineGraph2DRendererUpdate>
| Modifier and Type | Field and Description |
|---|---|
static InterpolationScheme |
DEFAULT_INTERPOLATION_SCHEME
Default interpolation scheme: nearest neighbor.
|
static ReductionScheme |
DEFAULT_REDUCTION_SCHEME
Default interpolation scheme: nearest neighbor.
|
static boolean |
DEFAULT_SEPARATE_AREAS
Default separate area flag: false (all lines overlap in one area).
|
static List<InterpolationScheme> |
supportedInterpolationScheme
List of supported interpolation schemes for this renderer.
|
static List<ReductionScheme> |
supportedReductionScheme
List of supported data reduction schemes for this renderer.
|
protected List<String> |
xReferenceLabels |
backgroundColor, bottomAreaMargin, bottomMargin, g, labelColor, labelFont, labelFontMetrics, leftAreaMargin, leftMargin, referenceLineColor, rightAreaMargin, rightMargin, topAreaMargin, topMargin, xLabelMargin, xPointMargin, xReferenceCoords, xReferenceValues, yLabelMargin, yPointMargin| Constructor and Description |
|---|
MultiAxisLineGraph2DRenderer(int imageWidth,
int imageHeight)
Creates a new line graph renderer.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
calculateGraphArea()
Calculates the graph area based on:
The image size
The plot ranges
The value scales
The font for the labels
The margins
To calculate area based on labels, ensure that calculateGraphArea() is called
prior to calling calculateGraphAreaNoLabels().
|
protected void |
calculateGraphAreaSplit() |
protected void |
calculateLabels()
Calculates:
The font for the labels
The margins based on labels
|
protected void |
calculateRanges(List<Range> xDataRange,
List<Range> yDataRange,
int length) |
void |
draw(Graphics2D g,
List<Point2DDataset> data)
Draws the graph on the given graphics context.
|
protected void |
drawGraphArea()
Draw the calculated graph area.
|
protected void |
drawHorizontalReferenceLines()
Draws the horizontal reference lines based on the calculated
graph area.
|
protected void |
drawHorizontalReferenceLinesSplit() |
protected void |
drawValueExplicitLine(ListNumber xValues,
ListNumber yValues,
InterpolationScheme interpolation,
ReductionScheme reduction,
int index) |
protected void |
drawVerticalReferenceLines()
Draw reference lines that correspond to reference values.
|
protected void |
drawVerticalReferenceLinesSplit() |
protected void |
drawXLabels()
Draw the horizontal labels based on the calculated graph area.
|
protected void |
drawXLabelsSplit() |
protected void |
drawYLabels()
Draw the vertical labels based on the calculated graph area.
|
protected void |
drawYLabelsSplit() |
InterpolationScheme |
getInterpolation()
The current interpolation used for the line.
|
MultiAxisLineGraph2DRendererUpdate |
newUpdate()
Creates a new update for the given graph.
|
void |
update(MultiAxisLineGraph2DRendererUpdate update)
Applies the update to the renderer.
|
calculateRanges, drawBackground, drawValueExplicitLine, drawValueLine, getImageHeight, getImageWidth, getXAggregatedRange, getXAxisRange, getXPlotRange, getYAggregatedRange, getYAxisRange, getYPlotRange, processScaledValue, scaledX, scaledY, setClip, setupDataAsAreas, setupDataAsPoints, setupXAsAreas, setupXAsPoints, setupYAsAreas, setupYAsPointspublic static List<InterpolationScheme> supportedInterpolationScheme
public static List<ReductionScheme> supportedReductionScheme
public static final InterpolationScheme DEFAULT_INTERPOLATION_SCHEME
public static final ReductionScheme DEFAULT_REDUCTION_SCHEME
public static final boolean DEFAULT_SEPARATE_AREAS
public MultiAxisLineGraph2DRenderer(int imageWidth,
int imageHeight)
imageWidth - the graph widthimageHeight - the graph heightpublic MultiAxisLineGraph2DRendererUpdate newUpdate()
Graph2DRenderernewUpdate in class Graph2DRenderer<MultiAxisLineGraph2DRendererUpdate>public InterpolationScheme getInterpolation()
public void update(MultiAxisLineGraph2DRendererUpdate update)
Graph2DRendererWhen 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<MultiAxisLineGraph2DRendererUpdate>update - the update to applypublic void draw(Graphics2D g, List<Point2DDataset> data)
g - the graphics on which to display the datadata - the data to displayprotected void calculateRanges(List<Range> xDataRange, List<Range> yDataRange, int length)
protected void calculateLabels()
Graph2DRenderercalculateLabels in class Graph2DRenderer<MultiAxisLineGraph2DRendererUpdate>protected void calculateGraphArea()
Graph2DRenderercalculateGraphArea in class Graph2DRenderer<MultiAxisLineGraph2DRendererUpdate>protected void calculateGraphAreaSplit()
protected void drawGraphArea()
Graph2DRendererdrawGraphArea in class Graph2DRenderer<MultiAxisLineGraph2DRendererUpdate>protected void drawVerticalReferenceLines()
Graph2DRendererdrawVerticalReferenceLines in class Graph2DRenderer<MultiAxisLineGraph2DRendererUpdate>protected void drawHorizontalReferenceLines()
Graph2DRendererdrawHorizontalReferenceLines in class Graph2DRenderer<MultiAxisLineGraph2DRendererUpdate>protected void drawVerticalReferenceLinesSplit()
protected void drawHorizontalReferenceLinesSplit()
protected void drawYLabels()
Graph2DRendererdrawYLabels in class Graph2DRenderer<MultiAxisLineGraph2DRendererUpdate>protected void drawYLabelsSplit()
protected void drawXLabels()
Graph2DRendererdrawXLabels in class Graph2DRenderer<MultiAxisLineGraph2DRendererUpdate>protected void drawXLabelsSplit()
protected void drawValueExplicitLine(ListNumber xValues, ListNumber yValues, InterpolationScheme interpolation, ReductionScheme reduction, int index)
Copyright © 2015. All rights reserved.