public class DataReferenceOverlay extends LabeledLineOverlay
DataReferenceOverlay
class annotates an EarthDataView
object with row/column grid lines and labels.drawingShadow
alpha, lastTrans, prepared
Constructor and Description |
---|
DataReferenceOverlay(java.awt.Color color)
Constructs a new grid overlay.
|
DataReferenceOverlay(java.awt.Color color,
int layer,
java.awt.Stroke stroke,
boolean manualLines,
double[] rows,
double[] cols,
boolean drawLabels,
java.awt.Font font)
Constructs a new grid overlay.
|
Modifier and Type | Method and Description |
---|---|
double[] |
getCols()
Gets the current reference row lines.
|
protected LineCollection |
getLines(EarthDataView view)
Gets the collection of lines for this overlay.
|
boolean |
getManualLines()
Gets the manual grid increment mode flag.
|
double[] |
getRows()
Gets the current reference row lines.
|
static void |
main(java.lang.String[] argv)
Tests this class.
|
void |
setCols(double[] cols)
Sets the reference row lines.
|
void |
setManualLines(boolean flag)
Sets the manual grid lines flag.
|
void |
setRows(double[] rows)
Sets the reference row lines.
|
draw, getDrawLabels, getFont, getTextDropShadow, prepare, setDrawLabels, setFont, setTextDropShadow
clip, drawShadow, getDropShadow, getShadowColor, getStroke, render, setDropShadow, setStroke
clone, compareTo, getAlphaVersion, getColor, getColors, getColorWithAlpha, getLayer, getMetadataAtPoint, getName, getTransparency, getVisible, hasMetadata, invalidate, isPrepared, needsPrepare, setColor, setLayer, setName, setTransparency, setVisible
public DataReferenceOverlay(java.awt.Color color, int layer, java.awt.Stroke stroke, boolean manualLines, double[] rows, double[] cols, boolean drawLabels, java.awt.Font font)
color
- the overlay color.layer
- the overlay layer number.stroke
- the stroke to use for vector paths.manualLines
- the manual lines flag.rows
- the reference row line values.cols
- the reference column line values.drawLabels
- the grid labels flag, true if grid labels
should be drawn.font
- the grid labels font. The labels font may be
null if no labels are to be drawn.public DataReferenceOverlay(java.awt.Color color)
BasicStroke
, the
manual lines flag to false, labels to true, and the font to the
default font face, plain style, 12 point.color
- the overlay color.public void setManualLines(boolean flag)
public boolean getManualLines()
public void setRows(double[] rows)
public double[] getRows()
public void setCols(double[] cols)
public double[] getCols()
protected LineCollection getLines(EarthDataView view)
LabeledLineOverlay
LabeledLineOverlay.prepare(java.awt.Graphics2D, noaa.coastwatch.render.EarthDataView)
.getLines
in class LabeledLineOverlay
view
- the earth view for line rendering.public static void main(java.lang.String[] argv)
argv
- the array of command line parameters.