org.mars_sim.msp.ui.standard.tool.map
Class EllipseLayer

java.lang.Object
  extended by org.mars_sim.msp.ui.standard.tool.map.EllipseLayer
All Implemented Interfaces:
MapLayer

public class EllipseLayer
extends java.lang.Object
implements MapLayer

A map layer for displaying ellipses.


Constructor Summary
EllipseLayer(java.awt.Color drawColor)
          Constructor
 
Method Summary
 void displayLayer(Coordinates mapCenter, java.lang.String mapType, java.awt.Graphics g)
          Displays the layer on the map image.
 void setDisplayEllipse(boolean displayEllipse)
          Sets the flag for displaying the ellipse.
 void setEllipseDetails(IntPoint foci1, IntPoint foci2, int range)
          Sets the ellipse details.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EllipseLayer

public EllipseLayer(java.awt.Color drawColor)
Constructor

Parameters:
drawColor - the color to draw the ellipse.
Method Detail

setDisplayEllipse

public void setDisplayEllipse(boolean displayEllipse)
Sets the flag for displaying the ellipse.

Parameters:
displayEllipse - true if ellipse is to be displayed.

setEllipseDetails

public void setEllipseDetails(IntPoint foci1,
                              IntPoint foci2,
                              int range)
Sets the ellipse details.

Parameters:
foci1 - the position of the first focus point.
foci2 - the position of the second focus point.
range - the ellipse range.

displayLayer

public void displayLayer(Coordinates mapCenter,
                         java.lang.String mapType,
                         java.awt.Graphics g)
Displays the layer on the map image.

Specified by:
displayLayer in interface MapLayer
Parameters:
mapCenter - the location of the center of the map.
mapType - the type of map.
g - graphics context of the map display.