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

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

public class MineralMapLayer
extends java.lang.Object
implements MapLayer

A map layer showing mineral concentrations.


Constructor Summary
MineralMapLayer(java.awt.Component displayComponent)
          Constructor
 
Method Summary
 void displayLayer(Coordinates mapCenter, java.lang.String mapType, java.awt.Graphics g)
          Displays the layer on the map image.
 java.util.Map<java.lang.String,java.awt.Color> getMineralColors()
          Gets a map of all mineral type names and their display colors.
 boolean isMineralDisplayed(java.lang.String mineralType)
          Checks if a mineral type is displayed on the map.
 void setMineralDisplayed(java.lang.String mineralType, boolean displayed)
          Sets a mineral type to be displayed on the map or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MineralMapLayer

public MineralMapLayer(java.awt.Component displayComponent)
Constructor

Parameters:
displayComponent - the display component.
Method Detail

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.

getMineralColors

public java.util.Map<java.lang.String,java.awt.Color> getMineralColors()
Gets a map of all mineral type names and their display colors.

Returns:
map of names and colors.

isMineralDisplayed

public boolean isMineralDisplayed(java.lang.String mineralType)
Checks if a mineral type is displayed on the map.

Parameters:
mineralType - the mineral type to display.
Returns:
true if displayed.

setMineralDisplayed

public void setMineralDisplayed(java.lang.String mineralType,
                                boolean displayed)
Sets a mineral type to be displayed on the map or not.

Parameters:
mineralType - the mineral type to display.
displayed - true if displayed, false if not.