public class AnnotationOverlay extends PolygonOverlay
Modifier and Type | Field and Description |
---|---|
static int |
DATA
The data reference frame.
|
protected java.util.List |
elements
The list of annotation elements.
|
static int |
IMAGE
The image reference frame.
|
drawingShadow
alpha, lastTrans, prepared
Constructor and Description |
---|
AnnotationOverlay(java.awt.Color color)
Constructs a new annotation overlay.
|
AnnotationOverlay(java.awt.Color color,
int layer,
java.awt.Stroke stroke,
java.awt.Color fillColor,
int reference)
Constructs a new annotation overlay.
|
Modifier and Type | Method and Description |
---|---|
void |
addElement(AnnotationElement element)
Adds an annotation element to the list.
|
protected void |
draw(java.awt.Graphics2D g,
EarthDataView view)
Draws the overlay graphics.
|
protected boolean |
needsPrepare()
Returns false as this class needs no preparation.
|
protected void |
prepare(java.awt.Graphics2D g,
EarthDataView view)
Prepares the overlay graphics prior to drawing.
|
void |
setReference(int frame)
Sets the annotation element reference frame.
|
getColors, getFillColor, getFillColorWithAlpha, setFillColor
clip, drawShadow, getDropShadow, getShadowColor, getStroke, render, setDropShadow, setStroke
clone, compareTo, getAlphaVersion, getColor, getColorWithAlpha, getLayer, getMetadataAtPoint, getName, getTransparency, getVisible, hasMetadata, invalidate, isPrepared, setColor, setLayer, setName, setTransparency, setVisible
public static final int IMAGE
public static final int DATA
protected java.util.List elements
public AnnotationOverlay(java.awt.Color color, int layer, java.awt.Stroke stroke, java.awt.Color fillColor, int reference)
color
- the overlay color.layer
- the overlay layer number.stroke
- the stroke to use for vector paths.fillColor
- the fill color to use for polygon fills.reference
- the annotation reference frame. The options are
IMAGE
and DATA
.public AnnotationOverlay(java.awt.Color color)
BasicStroke
, the fill color to null, and the
reference to the image reference frame.color
- the overlay color.public void addElement(AnnotationElement element)
public void setReference(int frame)
frame
- the reference frame, either IMAGE
and
DATA
.protected boolean needsPrepare()
needsPrepare
in class EarthDataOverlay
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.