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

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

public class UnitIconMapLayer
extends java.lang.Object

The UnitMapLayer is a graphics layer to display unit icons.


Constructor Summary
UnitIconMapLayer(java.awt.Component displayComponent)
           
 
Method Summary
 void displayLayer(Coordinates mapCenter, java.lang.String mapType, java.awt.Graphics g)
          Displays the layer on the map image.
protected  void displayUnit(Unit unit, Coordinates mapCenter, java.lang.String mapType, java.awt.Graphics g)
          Displays a unit on the map.
protected  boolean getBlinkFlag()
          Gets the blink flag.
 void setUnitsToDisplay(java.util.Collection<Unit> unitsToDisplay)
          Sets the units to display in this layer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnitIconMapLayer

public UnitIconMapLayer(java.awt.Component displayComponent)
Method Detail

displayUnit

protected void displayUnit(Unit unit,
                           Coordinates mapCenter,
                           java.lang.String mapType,
                           java.awt.Graphics g)
Displays a unit on the map.

Parameters:
unit - the unit to display.
mapCenter - the location center of the map.
mapType - the type of map.
g - the graphics context.

getBlinkFlag

protected boolean getBlinkFlag()
Gets the blink flag.

Returns:
blink flag

setUnitsToDisplay

public void setUnitsToDisplay(java.util.Collection<Unit> unitsToDisplay)
Sets the units to display in this layer.

Parameters:
unitsToDisplay - collection of units to display.

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.