public abstract class LabeledLineOverlay extends LineOverlay
LabeledLineOverlay
renders lines and labels on
an EarthDataView
. A labeled line is any line that has
a labeled value and some connected set of points to display
such as a line of latitude/longitude or a data contour line.drawingShadow
alpha, lastTrans, prepared
Constructor and Description |
---|
LabeledLineOverlay(java.awt.Color color)
Constructs a new labeled line overlay.
|
LabeledLineOverlay(java.awt.Color color,
int layer,
java.awt.Stroke stroke,
boolean drawLabels,
java.awt.Font font)
Constructs a new labeled line overlay.
|
Modifier and Type | Method and Description |
---|---|
protected void |
draw(java.awt.Graphics2D g,
EarthDataView view)
Draws the overlay graphics.
|
boolean |
getDrawLabels()
Gets the line labels flag.
|
java.awt.Font |
getFont()
Gets the line labels font.
|
protected abstract LineCollection |
getLines(EarthDataView view)
Gets the collection of lines for this overlay.
|
boolean |
getTextDropShadow()
Gets the text drop shadow flag.
|
protected void |
prepare(java.awt.Graphics2D g,
EarthDataView view)
Prepares the overlay graphics prior to drawing.
|
void |
setDrawLabels(boolean drawLabels)
Sets the line labels flag.
|
void |
setFont(java.awt.Font font)
Sets the line labels font.
|
void |
setTextDropShadow(boolean flag)
Sets the text drop shadow flag.
|
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 LabeledLineOverlay(java.awt.Color color, int layer, java.awt.Stroke stroke, boolean drawLabels, java.awt.Font font)
color
- the overlay color.layer
- the overlay layer number.stroke
- the stroke to use for vector paths.drawLabels
- the line labels flag, true if labels
should be drawn.font
- the line labels font. The labels font may
be null if no labels are to be drawn.public LabeledLineOverlay(java.awt.Color color)
BasicStroke
, labels to true, and the font to
the default font face, plain style, 12 point.color
- the overlay color.public boolean getTextDropShadow()
public void setTextDropShadow(boolean flag)
public void setDrawLabels(boolean drawLabels)
public boolean getDrawLabels()
public void setFont(java.awt.Font font)
public java.awt.Font getFont()
protected abstract LineCollection getLines(EarthDataView view)
prepare(java.awt.Graphics2D, noaa.coastwatch.render.EarthDataView)
.view
- the earth view for line rendering.protected void prepare(java.awt.Graphics2D g, EarthDataView view)
EarthDataOverlay
prepare
in class EarthDataOverlay
g
- the graphics object for drawing.view
- the earth data view.protected void draw(java.awt.Graphics2D g, EarthDataView view)
EarthDataOverlay
draw
in class EarthDataOverlay
g
- the graphics object for drawing.view
- the earth data view.