|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mars_sim.msp.ui.standard.tool.map.CannedMarsMap
public abstract class CannedMarsMap
The CannedMarsMap class reads in data from files in the map_data jar file in order to generate a map image.
| Field Summary | |
|---|---|
static double |
HALF_MAP_ANGLE
|
static int |
MAP_HEIGHT
|
static int |
MAP_WIDTH
|
static double |
PIXEL_RHO
|
protected java.util.List<int[]> |
surfaceColors
|
| Fields inherited from interface org.mars_sim.msp.ui.standard.tool.map.Map |
|---|
DISPLAY_HEIGHT, DISPLAY_WIDTH |
| Constructor Summary | |
|---|---|
CannedMarsMap(javax.swing.JComponent displayArea,
java.util.List<int[]> surfaceColors)
Constructor with surface colors array list parameter. |
|
CannedMarsMap(javax.swing.JComponent displayArea,
java.lang.String dataFile,
java.lang.String indexFile,
java.util.List<int[]> mapColors)
Constructor with data file parameters. |
|
| Method Summary | |
|---|---|
void |
drawMap(Coordinates newCenter)
Creates a 2D map at a given center point. |
java.awt.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 |
| Field Detail |
|---|
public static final double HALF_MAP_ANGLE
public static final int MAP_HEIGHT
public static final int MAP_WIDTH
public static final double PIXEL_RHO
protected java.util.List<int[]> surfaceColors
| Constructor Detail |
|---|
public CannedMarsMap(javax.swing.JComponent displayArea,
java.util.List<int[]> surfaceColors)
displayArea - the display component.surfaceColors - the ArrayList containing all of the cached map colors.
public CannedMarsMap(javax.swing.JComponent displayArea,
java.lang.String dataFile,
java.lang.String indexFile,
java.util.List<int[]> mapColors)
displayArea - the display component.dataFile - the map data filename within map_data.jar.indexFile - the map index filename within map_data.jar.| Method Detail |
|---|
public void drawMap(Coordinates newCenter)
drawMap in interface MapnewCenter - the new center locationpublic boolean isImageDone()
isImageDone in interface Mappublic java.awt.Image getMapImage()
getMapImage in interface Map
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||