Package noaa.coastwatch.render
Class PointFeatureOverlay<T extends PointFeatureSymbol>
java.lang.Object
noaa.coastwatch.render.EarthDataOverlay
noaa.coastwatch.render.LineOverlay
noaa.coastwatch.render.PolygonOverlay
noaa.coastwatch.render.PointFeatureOverlay<T>
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable
The
PointFeatureOverlay
class annotes a data view with
symbols using data from a PointFeatureSource
.- Since:
- 3.2.0
- Author:
- Peter Hollemans
- See Also:
-
Field Summary
Fields inherited from class noaa.coastwatch.render.LineOverlay
drawingShadow
Fields inherited from class noaa.coastwatch.render.EarthDataOverlay
alpha, lastTrans, prepared
-
Constructor Summary
ConstructorDescriptionPointFeatureOverlay
(int layer, Stroke stroke, PointFeatureSource source, T symbol) Constructs a new overlay.PointFeatureOverlay
(T symbol, PointFeatureSource source) Constructs a new overlay. -
Method Summary
Modifier and TypeMethodDescriptionclone()
protected void
draw
(Graphics2D g, EarthDataView view) Draws the overlay graphics.Gets the feature filter being used in this overlay.getMatchingFeatures
(EarthArea area) Gets the matching point features in this overlay for the specified area.getMetadataAtPoint
(Point point) Gets the metadata at the specified point.Gets the feature source for this overlay.Gets the point symbol.boolean
Gets the metadata flag, true if the overlay has metadata associated with its rendered graphics, false if not.protected void
prepare
(Graphics2D g, EarthDataView view) Prepares the overlay graphics prior to drawing.void
setFilter
(SelectionRuleFilter filter) Sets the feature filter to use in this overlay.void
Sets the point symbol.toString()
Methods inherited from class noaa.coastwatch.render.PolygonOverlay
getColors, getFillColor, getFillColorWithAlpha, setFillColor
Methods inherited from class noaa.coastwatch.render.LineOverlay
clip, drawShadow, getDropShadow, getShadowColor, getStroke, render, setDropShadow, setStroke
Methods inherited from class noaa.coastwatch.render.EarthDataOverlay
compareTo, getAlphaVersion, getColor, getColorWithAlpha, getLayer, getName, getTransparency, getVisible, invalidate, isPrepared, needsPrepare, setColor, setLayer, setName, setTransparency, setVisible
-
Constructor Details
-
PointFeatureOverlay
Constructs a new overlay. The overlay drawing and fill color are determined from the symbol.- Parameters:
layer
- the overlay layer number.stroke
- the stroke to use for vector paths.source
- the source for polygon data.symbol
- the symbol to use for each point feature.
-
PointFeatureOverlay
Constructs a new overlay. The layer number is initialized to 0 and the stroke to the defaultBasicStroke
. The overlay drawing and fill color are determined from the symbol.- Parameters:
source
- the source for polygon data.symbol
- the symbol to use for each point feature.
-
-
Method Details
-
clone
- Overrides:
clone
in classEarthDataOverlay
-
getFilter
Gets the feature filter being used in this overlay.- Returns:
- the feature filter or null for no filtering.
-
setFilter
Sets the feature filter to use in this overlay.- Parameters:
filter
- the feature filter or null for no filtering.
-
getSymbol
Gets the point symbol. -
setSymbol
Sets the point symbol. -
getSource
Gets the feature source for this overlay.- Returns:
- the feature source.
-
getMatchingFeatures
Gets the matching point features in this overlay for the specified area.- Parameters:
area
- the earth area to use for features.- Returns:
- the list of features that will be drawn when the overlay is rendered with a view that shows the same earth area as that specified.
- Since:
- 3.3.2
-
prepare
Description copied from class:EarthDataOverlay
Prepares the overlay graphics prior to drawing.- Specified by:
prepare
in classEarthDataOverlay
- Parameters:
g
- the graphics object for drawing.view
- the earth data view.
-
draw
Description copied from class:EarthDataOverlay
Draws the overlay graphics.- Specified by:
draw
in classEarthDataOverlay
- Parameters:
g
- the graphics object for drawing.view
- the earth data view.
-
hasMetadata
public boolean hasMetadata()Description copied from class:EarthDataOverlay
Gets the metadata flag, true if the overlay has metadata associated with its rendered graphics, false if not. If true, theEarthDataOverlay.getMetadataAtPoint(java.awt.Point)
may be used. By default this method returns false unless overridden by the child class.- Overrides:
hasMetadata
in classEarthDataOverlay
- Returns:
- the metadata flag, true if supported or false if not.
- See Also:
-
getMetadataAtPoint
Description copied from class:EarthDataOverlay
Gets the metadata at the specified point.- Overrides:
getMetadataAtPoint
in classEarthDataOverlay
- Parameters:
point
- the point to get metadata for.- Returns:
- the metadata at the specified point, or null if none is available.
-
toString
-