public class ShapeOverlay extends LineOverlay
ShapeOverlay
class may be used to render a list of
generic shapes.drawingShadow
alpha, lastTrans, prepared
Constructor and Description |
---|
ShapeOverlay(java.awt.Color color)
Creates a new shape overlay with the specified color.
|
Modifier and Type | Method and Description |
---|---|
void |
addShape(java.awt.Shape shape)
Adds a new shape to the list.
|
protected void |
draw(java.awt.Graphics2D g,
EarthDataView view)
Draws the overlay graphics.
|
java.util.Iterator |
getShapeIterator()
Gets an iterator over the list of shapes.
|
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 |
removeShape(java.awt.Shape shape)
Removes a shape from the list.
|
clip, drawShadow, getDropShadow, getShadowColor, getStroke, render, setDropShadow, setStroke
clone, compareTo, getAlphaVersion, getColor, getColors, getColorWithAlpha, getLayer, getMetadataAtPoint, getName, getTransparency, getVisible, hasMetadata, invalidate, isPrepared, setColor, setLayer, setName, setTransparency, setVisible
public ShapeOverlay(java.awt.Color color)
BasicStroke
.public void addShape(java.awt.Shape shape)
shape
- the new shape to add to the list.public java.util.Iterator getShapeIterator()
public void removeShape(java.awt.Shape shape)
shape
- the shape to remove from the list.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.