Class PointFeatureOverlay<T extends PointFeatureSymbol>

All Implemented Interfaces:
Serializable, Cloneable, Comparable

public class PointFeatureOverlay<T extends PointFeatureSymbol> extends PolygonOverlay
The PointFeatureOverlay class annotes a data view with symbols using data from a PointFeatureSource.
Since:
3.2.0
Author:
Peter Hollemans
See Also:
  • Constructor Details

    • PointFeatureOverlay

      public PointFeatureOverlay(int layer, Stroke stroke, PointFeatureSource source, T symbol)
      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

      public PointFeatureOverlay(T symbol, PointFeatureSource source)
      Constructs a new overlay. The layer number is initialized to 0 and the stroke to the default BasicStroke. 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

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

      public SelectionRuleFilter getFilter()
      Gets the feature filter being used in this overlay.
      Returns:
      the feature filter or null for no filtering.
    • setFilter

      public void setFilter(SelectionRuleFilter filter)
      Sets the feature filter to use in this overlay.
      Parameters:
      filter - the feature filter or null for no filtering.
    • getSymbol

      public T getSymbol()
      Gets the point symbol.
    • setSymbol

      public void setSymbol(T symbol)
      Sets the point symbol.
    • getSource

      public PointFeatureSource getSource()
      Gets the feature source for this overlay.
      Returns:
      the feature source.
    • getMatchingFeatures

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

      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.
    • 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