Class ArmorPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable

public class ArmorPanel extends PicMap
This panel contains the armor readout display.
See Also:
  • Constructor Details

  • Method Details

    • setFitToWindow

      public void setFitToWindow(boolean fitToWindow)
      Sets whether the diagram enlarges itself to fill the space it is given. The unit display turns this on so the diagram uses the panel instead of sitting small in a large empty area. It is drawn at its natural size otherwise, as in the damage editor, which sizes the diagram itself.
    • addNotify

      public void addNotify()
      Description copied from class: PicMap
      Please remember to add super.addNotify() when overriding
      Overrides:
      addNotify in class PicMap
    • onResize

      public void onResize()
      Description copied from class: PicMap
      onResize() function is calling every time PicMap is resized. Have to be implemented directly to manage composition of component on resizing.
      Specified by:
      onResize in class PicMap
    • displayMek

      public void displayMek(Entity en)
      updates fields for the specified mek
    • setCriticalLocations

      public void setCriticalLocations(Set<Integer> criticalLocations)
      Sets the locations to shade as having taken a critical hit, shown the next time the unit is drawn. The damage editor uses this to show the crits the user has set but not yet applied, which the unit itself does not carry yet. Once a caller sets them, the panel stops shading the unit's own crits and shows only what it is given.
      Parameters:
      criticalLocations - the locations that have taken a critical hit