Class ProtoMekMapSet

java.lang.Object
megamek.client.ui.widget.mapset.ProtoMekMapSet
All Implemented Interfaces:
DisplayMapSet

public class ProtoMekMapSet extends Object implements DisplayMapSet
Class which keeps set of all areas required to represent ProtoMek unit within the MekDisplay.ArmorPanel class.
  • Constructor Details

    • ProtoMekMapSet

      public ProtoMekMapSet(JComponent c, LocationSelectListener locationSelectListener)
      This constructor can only be called from the addNotify method
  • Method Details

    • getContentGroup

      public PMAreasGroup getContentGroup()
      Specified by:
      getContentGroup in interface DisplayMapSet
    • getBackgroundDrawers

      public Vector<BackGroundDrawer> getBackgroundDrawers()
      Specified by:
      getBackgroundDrawers in interface DisplayMapSet
    • setEntity

      public void setEntity(Entity entity)
      Show the diagram for the given ProtoMek.
      Specified by:
      setEntity in interface DisplayMapSet
      Parameters:
      entity - the Entity to be displayed. This should be a ProtoMek unit.
    • setCriticalLocations

      public void setCriticalLocations(Set<Integer> criticalLocations)
      Description copied from interface: DisplayMapSet
      Stripes the given locations to show that they have taken a critical hit. The locations are colored by how damaged they are, so a critical hit is striped over that color rather than replacing it, and both can be read at once. Called after DisplayMapSet.setEntity(megamek.common.units.Entity), which is what applies the damage colors.

      Unit types whose diagram has no per-location areas do nothing, so a caller can offer this for every unit.

      Specified by:
      setCriticalLocations in interface DisplayMapSet
      Parameters:
      criticalLocations - the locations that have taken a critical hit