Class FilledShapeOverlay

All Implemented Interfaces:
Serializable, Cloneable, Comparable

public class FilledShapeOverlay extends PolygonOverlay
The FilledShapeOverlay class may be used to render a list of generic filled shapes.
Since:
3.1.7
Author:
Peter Hollemans
See Also:
  • Constructor Details

    • FilledShapeOverlay

      public FilledShapeOverlay(Color color)
      Creates a new shape overlay with the specified color. The layer number is initialized to 0, and the stroke to the default BasicStroke, and the fill color to null.
  • Method Details

    • addShape

      public void addShape(Shape shape)
      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

      public Iterator getShapeIterator()
      Gets an iterator over the list of shapes.
    • removeShape

      public void removeShape(Shape shape)
      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:
      needsPrepare in class EarthDataOverlay
      Returns:
      true if this overlay class needs a preparation stage, or false if not.
    • 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.