Package noaa.coastwatch.render
Class MultiPointFeatureOverlay<T extends PointFeatureSymbol>
java.lang.Object
noaa.coastwatch.render.EarthDataOverlay
noaa.coastwatch.render.MultiPointFeatureOverlay<T>
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable
The
MultiPointFeatureOverlay
class annotes a data view with
symbols using data from from multiple PointFeatureOverlay
objects.
Global selection rule and group filters are used to filter point features
for all overlays, while each overlay contains its own filter for features.
In this way, a complex set of symbols can be created from a single data source.- Since:
- 3.3.2
- Author:
- Peter Hollemans
- See Also:
-
Field Summary
Fields inherited from class noaa.coastwatch.render.EarthDataOverlay
alpha, lastTrans, prepared
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
protected void
draw
(Graphics2D g, EarthDataView view) Draws the overlay graphics.Gets the earth area hint.Gets the expression list hint.Gets the global filter for features in all overlays.Gets the group filter for the overlay.boolean
Gets the group filter flag.getMatchingFeatures
(PointFeatureOverlay overlay, EarthArea area) Gets the matching point features for the specified overlay.getMatchingFeatures
(EarthArea area) Gets the matching point features for this overlay.getMetadataAtPoint
(Point point) Gets the metadata at the specified point.Gets the list of overlays displayed.Gets the time window hint.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
setEarthAreaHint
(EarthArea area) Sets the earth area hint.void
setExpressionListHint
(List<String> expressionList) Sets the expression list hint.void
setGroupFilter
(FeatureGroupFilter groupFilter) Sets the group filter.void
setGroupFilterActive
(boolean flag) Sets the group filter flag.void
setTimeWindowHint
(TimeWindow window) Sets the time window hint.toString()
Methods inherited from class noaa.coastwatch.render.EarthDataOverlay
compareTo, getAlphaVersion, getColor, getColors, getColorWithAlpha, getLayer, getName, getTransparency, getVisible, invalidate, isPrepared, needsPrepare, render, setColor, setLayer, setName, setTransparency, setVisible
-
Constructor Details
-
MultiPointFeatureOverlay
public MultiPointFeatureOverlay()Creates a new overlay. The global filter is initialized to be empty for no filtering, and the overlay list to empty. No group filter is set.
-
-
Method Details
-
getGroupFilterActive
public boolean getGroupFilterActive()Gets the group filter flag.- Returns:
- the group filter flag.
- See Also:
-
setGroupFilterActive
public void setGroupFilterActive(boolean flag) Sets the group filter flag. By default the group filter is active, if set to a non-null value.- Parameters:
flag
- the filter flag, true to use the group filter or false to not use the filter in drawing the overlay.
-
setTimeWindowHint
Sets the time window hint. This hint may be used by choosers to present a reasonable default time and time window.- Parameters:
window
- the time window to use for a hint.
-
getTimeWindowHint
Gets the time window hint.- Returns:
- the time window hint or null if there is no hint available.
- See Also:
-
setEarthAreaHint
Sets the earth area hint. This hint may be used to help in obtaining a list of matching features that will be displayed when this overlay renders.- Parameters:
area
- the earth area to use for a hint.- See Also:
-
getEarthAreaHint
Gets the earth area hint.- Returns:
- the earth area hint or null if there is no hint available.
- See Also:
-
setExpressionListHint
Sets the expression list hint. This hint may be used to compute statistics on the attributes of features in the overlay.- Parameters:
expressionList
- the expression list to use for a hint.
-
getExpressionListHint
Gets the expression list hint. This hint may be used to compute statistics on the attributes of features in the overlay.- Returns:
- expressionList the expression list to use for a hint, or null if there is no hint available.
-
clone
- Overrides:
clone
in classEarthDataOverlay
-
setGroupFilter
Sets the group filter. The group filter is used to filter features after the selection rule filter and before any individual point overlays are drawn.- Parameters:
groupFilter
- the group filter or null to specify no group filtering. Another way to specify no group filtering is to set a group filter, then mark it as inactive usingsetGroupFilterActive(boolean)
.
-
getGroupFilter
Gets the group filter for the overlay.- Returns:
- the group filter.
- See Also:
-
getGlobalFilter
Gets the global filter for features in all overlays.- Returns:
- the global filter. The returned filter is not a copy, therefore changes to the filter will be reflected in the overlay.
-
getOverlayList
Gets the list of overlays displayed.- Returns:
- the list of overlays. The returned list may be modified, and the changes will be reflected the next time the overlay is rendered.
-
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.
-
getMatchingFeatures
Gets the matching point features for this overlay.- Parameters:
area
- the earth area to use for feature matching.- 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.
-
getMatchingFeatures
Gets the matching point features for the specified overlay.- Parameters:
overlay
- the overlay to get the list of matching features. These are the features that will be displayed if the overlay has its visibility turned on in this multi-point overlay.area
- the earth area to use for feature matching.- 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.
-
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
- Overrides:
toString
in classEarthDataOverlay
-