org.openstreetmap.gui.jmapviewer
Class MapRectangleImpl
java.lang.Object
org.openstreetmap.gui.jmapviewer.MapRectangleImpl
- All Implemented Interfaces:
- MapRectangle
public class MapRectangleImpl
- extends java.lang.Object
- implements MapRectangle
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
topLeft
private Coordinate topLeft
bottomRight
private Coordinate bottomRight
color
private java.awt.Color color
stroke
private java.awt.Stroke stroke
MapRectangleImpl
public MapRectangleImpl(Coordinate topLeft,
Coordinate bottomRight)
MapRectangleImpl
public MapRectangleImpl(Coordinate topLeft,
Coordinate bottomRight,
java.awt.Color color,
java.awt.Stroke stroke)
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 paintingtopLeft
- lop left edge of painting regionbottomRight
- bottom right edge of painting region
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
JOSM