org.openstreetmap.gui.jmapviewer
Class MapRectangleImpl

java.lang.Object
  extended by org.openstreetmap.gui.jmapviewer.MapRectangleImpl
All Implemented Interfaces:
MapRectangle

public class MapRectangleImpl
extends java.lang.Object
implements MapRectangle


Field Summary
private  Coordinate bottomRight
           
private  java.awt.Color color
           
private  java.awt.Stroke stroke
           
private  Coordinate topLeft
           
 
Constructor Summary
MapRectangleImpl(Coordinate topLeft, Coordinate bottomRight)
           
MapRectangleImpl(Coordinate topLeft, Coordinate bottomRight, java.awt.Color color, java.awt.Stroke stroke)
           
 
Method Summary
 Coordinate getBottomRight()
           
 Coordinate getTopLeft()
           
 void paint(java.awt.Graphics g, java.awt.Point topLeft, java.awt.Point bottomRight)
          Paints the map rectangle on the map.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

topLeft

private Coordinate topLeft

bottomRight

private Coordinate bottomRight

color

private java.awt.Color color

stroke

private java.awt.Stroke stroke
Constructor Detail

MapRectangleImpl

public MapRectangleImpl(Coordinate topLeft,
                        Coordinate bottomRight)

MapRectangleImpl

public MapRectangleImpl(Coordinate topLeft,
                        Coordinate bottomRight,
                        java.awt.Color color,
                        java.awt.Stroke stroke)
Method Detail

getTopLeft

public Coordinate getTopLeft()
Specified by:
getTopLeft in interface MapRectangle
Returns:
Latitude/Longitude of top left of rectangle

getBottomRight

public Coordinate getBottomRight()
Specified by:
getBottomRight in interface MapRectangle
Returns:
Latitude/Longitude of bottom right of rectangle

paint

public void paint(java.awt.Graphics g,
                  java.awt.Point topLeft,
                  java.awt.Point bottomRight)
Description copied from interface: MapRectangle
Paints the map rectangle on the map. The topLeft and bottomRight are specifying the coordinates within g

Specified by:
paint in interface MapRectangle
Parameters:
g - graphics structure for painting
topLeft - lop left edge of painting region
bottomRight - bottom right edge of painting region

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


JOSM