Package noaa.coastwatch.render
Class FilledShapeOverlay
java.lang.Object
noaa.coastwatch.render.EarthDataOverlay
noaa.coastwatch.render.LineOverlay
noaa.coastwatch.render.PolygonOverlay
noaa.coastwatch.render.FilledShapeOverlay
- All Implemented Interfaces:
Serializable,Cloneable,Comparable
The
FilledShapeOverlay class may be used to render a
list of generic filled shapes.- Since:
- 3.1.7
- Author:
- Peter Hollemans
- See Also:
-
Field Summary
Fields inherited from class noaa.coastwatch.render.LineOverlay
drawingShadowFields inherited from class noaa.coastwatch.render.EarthDataOverlay
alpha, lastTrans, prepared -
Constructor Summary
ConstructorsConstructorDescriptionFilledShapeOverlay(Color color) Creates a new shape overlay with the specified color. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a new shape to the list.protected voiddraw(Graphics2D g, EarthDataView view) Draws the overlay graphics.Gets an iterator over the list of shapes.protected booleanReturns false as this class needs no preparation.protected voidprepare(Graphics2D g, EarthDataView view) Prepares the overlay graphics prior to drawing.voidremoveShape(Shape shape) Removes a shape from the list.Methods inherited from class noaa.coastwatch.render.PolygonOverlay
getColors, getFillColor, getFillColorWithAlpha, setFillColorMethods inherited from class noaa.coastwatch.render.LineOverlay
clip, drawShadow, getDropShadow, getShadowColor, getStroke, render, setDropShadow, setStrokeMethods inherited from class noaa.coastwatch.render.EarthDataOverlay
clone, compareTo, getAlphaVersion, getColor, getColorWithAlpha, getLayer, getMetadataAtPoint, getName, getTransparency, getVisible, hasMetadata, invalidate, isPrepared, setColor, setLayer, setName, setTransparency, setVisible, toString
-
Constructor Details
-
FilledShapeOverlay
Creates a new shape overlay with the specified color. The layer number is initialized to 0, and the stroke to the defaultBasicStroke, and the fill color to null.
-
-
Method Details
-
addShape
Adds a new shape to the list. The shape coordinates are considered to be in the data coordinate reference frame.- Parameters:
shape- the new shape to add to the list.
-
getShapeIterator
Gets an iterator over the list of shapes. -
removeShape
Removes a shape from the list.- Parameters:
shape- the shape to remove from the list.
-
needsPrepare
protected boolean needsPrepare()Returns false as this class needs no preparation.- Overrides:
needsPreparein classEarthDataOverlay- Returns:
- true if this overlay class needs a preparation stage, or false if not.
-
prepare
Description copied from class:EarthDataOverlayPrepares the overlay graphics prior to drawing.- Specified by:
preparein classEarthDataOverlay- Parameters:
g- the graphics object for drawing.view- the earth data view.
-
draw
Description copied from class:EarthDataOverlayDraws the overlay graphics.- Specified by:
drawin classEarthDataOverlay- Parameters:
g- the graphics object for drawing.view- the earth data view.
-