org.mars_sim.msp.ui.swing.tool.map
Class CannedMarsMap

java.lang.Object
  extended by org.mars_sim.msp.ui.swing.tool.map.CannedMarsMap
All Implemented Interfaces:
Map
Direct Known Subclasses:
SurfMarsMap, TopoMarsMap

public abstract class CannedMarsMap
extends Object
implements Map

The CannedMarsMap class reads in data from files in the map_data jar file in order to generate a map image.


Field Summary
 
Fields inherited from interface org.mars_sim.msp.ui.swing.tool.map.Map
DISPLAY_HEIGHT, DISPLAY_WIDTH, HALF_MAP_ANGLE, MAP_HEIGHT, MAP_VIS_HEIGHT, MAP_VIS_WIDTH, MAP_WIDTH, PIXEL_RHO, SCREEN_OFFSET_X, SCREEN_OFFSET_Y, TWO_PI
 
Constructor Summary
CannedMarsMap(JComponent displayArea, MapData mapData)
          Constructor
 
Method Summary
 void drawMap(Coordinates newCenter)
          Creates a 2D map at a given center point.
 Image getMapImage()
          Gets the constructed map image.
 boolean isImageDone()
          Checks if a requested map is complete.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CannedMarsMap

public CannedMarsMap(JComponent displayArea,
                     MapData mapData)
Constructor

Parameters:
displayArea - the component display area.
mapData - the map data.
Method Detail

drawMap

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

Specified by:
drawMap in interface Map
Parameters:
newCenter - the new center location

isImageDone

public boolean isImageDone()
Checks if a requested map is complete.

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

getMapImage

public Image getMapImage()
Gets the constructed map image.

Specified by:
getMapImage in interface Map
Returns:
constructed map image


Copyright © 2009-2013. All Rights Reserved.