Class SimpleMapPolygon

  • All Implemented Interfaces:
    adams.core.MetaDataSupporter, HitIndicator, MetaDataSupporter, TimestampSupporter, org.openstreetmap.gui.jmapviewer.interfaces.MapObject, org.openstreetmap.gui.jmapviewer.interfaces.MapPolygon

    public class SimpleMapPolygon
    extends AbstractMapObject
    implements org.openstreetmap.gui.jmapviewer.interfaces.MapPolygon, HitIndicator
    Adapted MapPolygonImpl class.
    Version:
    $Revision$
    Author:
    Vincent (original code: MapPolygonImpl), FracPete (fracpete at waikato dot ac dot nz)
    • Constructor Detail

      • SimpleMapPolygon

        public SimpleMapPolygon​(org.openstreetmap.gui.jmapviewer.interfaces.ICoordinate... points)
      • SimpleMapPolygon

        public SimpleMapPolygon​(List<? extends org.openstreetmap.gui.jmapviewer.interfaces.ICoordinate> points)
      • SimpleMapPolygon

        public SimpleMapPolygon​(String name,
                                List<? extends org.openstreetmap.gui.jmapviewer.interfaces.ICoordinate> points)
      • SimpleMapPolygon

        public SimpleMapPolygon​(String name,
                                org.openstreetmap.gui.jmapviewer.interfaces.ICoordinate... points)
      • SimpleMapPolygon

        public SimpleMapPolygon​(org.openstreetmap.gui.jmapviewer.Layer layer,
                                List<? extends org.openstreetmap.gui.jmapviewer.interfaces.ICoordinate> points)
      • SimpleMapPolygon

        public SimpleMapPolygon​(org.openstreetmap.gui.jmapviewer.Layer layer,
                                String name,
                                List<? extends org.openstreetmap.gui.jmapviewer.interfaces.ICoordinate> points)
      • SimpleMapPolygon

        public SimpleMapPolygon​(org.openstreetmap.gui.jmapviewer.Layer layer,
                                String name,
                                org.openstreetmap.gui.jmapviewer.interfaces.ICoordinate... points)
      • SimpleMapPolygon

        public SimpleMapPolygon​(org.openstreetmap.gui.jmapviewer.Layer layer,
                                String name,
                                List<? extends org.openstreetmap.gui.jmapviewer.interfaces.ICoordinate> points,
                                org.openstreetmap.gui.jmapviewer.Style style)
    • Method Detail

      • getPoints

        public List<? extends org.openstreetmap.gui.jmapviewer.interfaces.ICoordinate> getPoints()
        Specified by:
        getPoints in interface org.openstreetmap.gui.jmapviewer.interfaces.MapPolygon
      • paint

        public void paint​(Graphics g,
                          List<Point> points)
        Specified by:
        paint in interface org.openstreetmap.gui.jmapviewer.interfaces.MapPolygon
      • paint

        public void paint​(Graphics g,
                          Polygon polygon)
        Specified by:
        paint in interface org.openstreetmap.gui.jmapviewer.interfaces.MapPolygon
      • getDefaultStyle

        public static org.openstreetmap.gui.jmapviewer.Style getDefaultStyle()
      • isHit

        public boolean isHit​(org.openstreetmap.gui.jmapviewer.JMapViewer viewer,
                             org.openstreetmap.gui.jmapviewer.Coordinate coord)
        Checks whether the given coordinate is a hit for a specific mapobject.
        Specified by:
        isHit in interface HitIndicator
        Parameters:
        viewer - the underlying viewer that triggered the call
        coord - the coordinate to check
        Returns:
        true if the mapobject is "hit" by this coordinate