public class IntensityGraph2DRenderer extends Graph2DRenderer<IntensityGraph2DRendererUpdate>
Modifier and Type | Field and Description |
---|---|
static NumberColorMap |
DEFAULT_COLOR_MAP
Default color map: JET.
|
static boolean |
DEFAULT_DRAW_LEGEND
Default draw legend: false.
|
boolean |
useColorArray |
protected int |
zLabelMargin |
protected ListInt |
zReferenceCoords |
protected List<String> |
zReferenceLabels |
protected ListDouble |
zReferenceValues |
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 |
---|
IntensityGraph2DRenderer()
Default Constructor: makes an IntensityGraph2DRenderer of width 300 and height 200.
|
IntensityGraph2DRenderer(int imageWidth,
int imageHeight)
Uses constructor specified in super class (Graph2DRenderer)
|
Modifier and Type | Method and Description |
---|---|
protected void |
calculateZLabels()
Sets private variables to account for the space required to draw in labels for the legend.
|
protected void |
calculateZRange(Range zDataRange,
Range displayRange)
Calculates the range of the z values to be graphed based on the previous z range (if there is one).
|
void |
draw(GraphBuffer graphBuffer,
Cell2DDataset data)
Draws an intensity graph in the given graphics context, using the given data.
|
NumberColorMap |
getColorMap()
Return the color scheme used for the value.
|
Range |
getXIndexSelectionRange() |
Range |
getXPixelSelectionRange() |
Range |
getXValueSelectionRange() |
Range |
getYIndexSelectionRange() |
Range |
getYPixelSelectionRange() |
Range |
getYValueSelectionRange() |
boolean |
isDrawLegend()
Whether or not the legend for the value to color mapping should be drawn.
|
IntensityGraph2DRendererUpdate |
newUpdate()
Creates a new update for the given graph.
|
protected double |
scaledZ(double value,
int bottomPixel,
int topPixel)
Translates a value's position in the aggregated range to a position on the legend.
|
void |
update(IntensityGraph2DRendererUpdate 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, processScaledValue, scaledX, scaledY, setClip, setupDataAsAreas, setupDataAsPoints, setupXAsAreas, setupXAsPoints, setupYAsAreas, setupYAsPoints
public static NumberColorMap DEFAULT_COLOR_MAP
public static boolean DEFAULT_DRAW_LEGEND
protected int zLabelMargin
protected ListInt zReferenceCoords
protected ListDouble zReferenceValues
public boolean useColorArray
public IntensityGraph2DRenderer(int imageWidth, int imageHeight)
imageWidth
- should be equal to the width of the bufferedImage.imageHeight
- should be equal to the height of the bufferedImage.public IntensityGraph2DRenderer()
public void update(IntensityGraph2DRendererUpdate 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<IntensityGraph2DRendererUpdate>
update
- the update to applypublic void draw(GraphBuffer graphBuffer, Cell2DDataset data)
graphBuffer
- Contains imageBuffer
and Graphics2D
objects used to perform drawing functions within draw.data
- can not be nullpublic IntensityGraph2DRendererUpdate newUpdate()
Graph2DRenderer
newUpdate
in class Graph2DRenderer<IntensityGraph2DRendererUpdate>
protected void calculateZRange(Range zDataRange, Range displayRange)
zDataRange
- current data rangedisplayRange
- current display rangeprotected void calculateZLabels()
protected final double scaledZ(double value, int bottomPixel, int topPixel)
value
- raw valuebottomPixel
- the first pixel from the bottomtopPixel
- the first pixel from the toppublic boolean isDrawLegend()
DEFAULT_DRAW_LEGEND
.public NumberColorMap getColorMap()
DEFAULT_COLOR_MAP
.public Range getXIndexSelectionRange()
public Range getYIndexSelectionRange()
public Range getXValueSelectionRange()
public Range getYValueSelectionRange()
public Range getXPixelSelectionRange()
public Range getYPixelSelectionRange()
Copyright © 2015. All rights reserved.