Class MultiPointFeatureOverlay<T extends PointFeatureSymbol>

java.lang.Object
noaa.coastwatch.render.EarthDataOverlay
noaa.coastwatch.render.MultiPointFeatureOverlay<T>
All Implemented Interfaces:
Serializable, Cloneable, Comparable

public class MultiPointFeatureOverlay<T extends PointFeatureSymbol> extends EarthDataOverlay
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:
  • 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

      public void setTimeWindowHint(TimeWindow window)
      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

      public TimeWindow getTimeWindowHint()
      Gets the time window hint.
      Returns:
      the time window hint or null if there is no hint available.
      See Also:
    • setEarthAreaHint

      public void setEarthAreaHint(EarthArea area)
      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

      public EarthArea getEarthAreaHint()
      Gets the earth area hint.
      Returns:
      the earth area hint or null if there is no hint available.
      See Also:
    • setExpressionListHint

      public void setExpressionListHint(List<String> expressionList)
      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

      public List<String> 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

      public Object clone()
      Overrides:
      clone in class EarthDataOverlay
    • setGroupFilter

      public void setGroupFilter(FeatureGroupFilter groupFilter)
      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 using setGroupFilterActive(boolean).
    • getGroupFilter

      public FeatureGroupFilter getGroupFilter()
      Gets the group filter for the overlay.
      Returns:
      the group filter.
      See Also:
    • getGlobalFilter

      public SelectionRuleFilter 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

      public List<PointFeatureOverlay<T>> 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

      protected void prepare(Graphics2D g, EarthDataView view)
      Description copied from class: EarthDataOverlay
      Prepares the overlay graphics prior to drawing.
      Specified by:
      prepare in class EarthDataOverlay
      Parameters:
      g - the graphics object for drawing.
      view - the earth data view.
    • getMatchingFeatures

      public List<Feature> getMatchingFeatures(EarthArea area)
      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

      public List<Feature> getMatchingFeatures(PointFeatureOverlay overlay, EarthArea area)
      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

      protected void draw(Graphics2D g, EarthDataView view)
      Description copied from class: EarthDataOverlay
      Draws the overlay graphics.
      Specified by:
      draw in class EarthDataOverlay
      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, the EarthDataOverlay.getMetadataAtPoint(java.awt.Point) may be used. By default this method returns false unless overridden by the child class.
      Overrides:
      hasMetadata in class EarthDataOverlay
      Returns:
      the metadata flag, true if supported or false if not.
      See Also:
    • getMetadataAtPoint

      public Map<String,Object> getMetadataAtPoint(Point point)
      Description copied from class: EarthDataOverlay
      Gets the metadata at the specified point.
      Overrides:
      getMetadataAtPoint in class EarthDataOverlay
      Parameters:
      point - the point to get metadata for.
      Returns:
      the metadata at the specified point, or null if none is available.
    • toString

      public String toString()
      Overrides:
      toString in class EarthDataOverlay