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

java.lang.Object
  extended by org.mars_sim.msp.ui.standard.tool.map.USGSMarsMap
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener, Map

public class USGSMarsMap
extends java.lang.Object
implements Map, java.awt.event.ActionListener

Access the Mars maps provided by the The Unites States Geological Survey - Astrogeology Team and The Planetary Data System - Imaging Node. Specifically from the Planetary Data Systems (PDS) Mars Explorer. Behind their web server is a Solaris application called MapMaker that generates the maps.

See Also:
PDS Mars Explorer

Field Summary
static double HALF_MAP_ANGLE
           
static int MAP_HEIGHT
           
static int MAP_WIDTH
           
static double PIXEL_RHO
           
static java.lang.String TYPE
           
 
Fields inherited from interface org.mars_sim.msp.ui.standard.tool.map.Map
DISPLAY_HEIGHT, DISPLAY_WIDTH
 
Constructor Summary
USGSMarsMap()
          Constructs a USGSMarsMap object
USGSMarsMap(java.awt.Component comp)
          Constructs a USGSMarsMap object
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Invoked when an action occurs.
 void drawMap(Coordinates newCenter)
          Creates a 2D map at a given center point.
 java.awt.Image getMapImage()
          Returns map image
 boolean isConnectionTimeout()
          Checks if the connection has timed out.
 boolean isImageDone()
          determines if a requested map is complete
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE

public static final java.lang.String TYPE
See Also:
Constant Field Values

HALF_MAP_ANGLE

public static final double HALF_MAP_ANGLE
See Also:
Constant Field Values

MAP_HEIGHT

public static final int MAP_HEIGHT
See Also:
Constant Field Values

MAP_WIDTH

public static final int MAP_WIDTH
See Also:
Constant Field Values

PIXEL_RHO

public static final double PIXEL_RHO
See Also:
Constant Field Values
Constructor Detail

USGSMarsMap

public USGSMarsMap()
Constructs a USGSMarsMap object


USGSMarsMap

public USGSMarsMap(java.awt.Component comp)
Constructs a USGSMarsMap object

Parameters:
comp - the map's container component
Method Detail

drawMap

public void drawMap(Coordinates newCenter)
             throws java.lang.Exception
Creates a 2D map at a given center point.

Specified by:
drawMap in interface Map
Parameters:
newCenter - the center location.
Throws:
java.lang.Exception - if error in drawing map.

isConnectionTimeout

public boolean isConnectionTimeout()
Checks if the connection has timed out.

Returns:
boolean

isImageDone

public boolean isImageDone()
determines if a requested map is complete

Specified by:
isImageDone in interface Map
Returns:
true if requested map is complete

getMapImage

public java.awt.Image getMapImage()
Returns map image

Specified by:
getMapImage in interface Map
Returns:
map image

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Invoked when an action occurs.

Specified by:
actionPerformed in interface java.awt.event.ActionListener