org.mars_sim.msp.ui.swing.tool.settlement
Class LabelMapLayer

java.lang.Object
  extended by org.mars_sim.msp.ui.swing.tool.settlement.LabelMapLayer
All Implemented Interfaces:
SettlementMapLayer

public class LabelMapLayer
extends Object
implements SettlementMapLayer

A settlement map layer for displaying labels for map objects.


Constructor Summary
LabelMapLayer(SettlementMapPanel mapPanel)
          Constructor
 
Method Summary
 void destroy()
          Destroy the map layer.
 void displayLayer(Graphics2D g2d, Settlement settlement, double xPos, double yPos, int mapWidth, int mapHeight, double rotation, double scale)
          Displays the settlement map layer.
static String getConstructionLabel(ConstructionSite site)
          Gets the label for a construction site.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LabelMapLayer

public LabelMapLayer(SettlementMapPanel mapPanel)
Constructor

Parameters:
mapPanel - the settlement map panel.
Method Detail

displayLayer

public void displayLayer(Graphics2D g2d,
                         Settlement settlement,
                         double xPos,
                         double yPos,
                         int mapWidth,
                         int mapHeight,
                         double rotation,
                         double scale)
Description copied from interface: SettlementMapLayer
Displays the settlement map layer.

Specified by:
displayLayer in interface SettlementMapLayer
Parameters:
g2d - the graphics context.
settlement - the settlement to display.
xPos - the X center position.
yPos - the Y center position.
mapWidth - the width of the map.
mapHeight - the height of the map.
rotation - the rotation (radians)
scale - the map scale.

getConstructionLabel

public static String getConstructionLabel(ConstructionSite site)
Gets the label for a construction site.

Parameters:
site - the construction site.
Returns:
the construction label.

destroy

public void destroy()
Description copied from interface: SettlementMapLayer
Destroy the map layer.

Specified by:
destroy in interface SettlementMapLayer


Copyright © 2009-2013. All Rights Reserved.