001// License: GPL. For details, see LICENSE file.
002package org.openstreetmap.gui.jmapviewer.interfaces;
003
004import java.awt.Graphics;
005import java.awt.Point;
006import java.awt.Polygon;
007import java.util.List;
008
009/**
010 * Interface to be implemented by polygons that can be displayed on the map.
011 *
012 * @author Vincent
013 */
014public interface MapPolygon extends MapObject{
015
016    /**
017     * @return Latitude/Longitude of each point of polygon
018     */
019    public List<? extends ICoordinate> getPoints();
020
021    /**
022     * Paints the map rectangle on the map. The <code>points</code>
023     * are specifying the coordinates within <code>g</code>
024     *
025     * @param g
026     * @param points
027     */
028    public void paint(Graphics g, List<Point> points);
029
030    /**
031     * Paints the map rectangle on the map. The <code>polygon</code>
032     * is specifying the coordinates within <code>g</code>
033     *
034     * @param g
035     * @param polygon
036     */
037    public void paint(Graphics g, Polygon polygon);
038}