Class StatusBar

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
ASStatusBar, BAStatusBar, BMStatusBar, CIStatusBar, CVStatusBar, HHWStatusBar, PMStatusBar

public class StatusBar extends ITab
See Also:
  • Field Details

    • tons

      protected final JLabel tons
  • Constructor Details

  • Method Details

    • addStatusComponent

      protected final void addStatusComponent(Component component)
      Adds type-specific information to the left side of the status bar while the report button remains anchored right.
      Parameters:
      component - the status component to add
    • refresh

      public final void refresh()
    • getTestEntity

      protected megamek.common.verifier.TestEntity getTestEntity()
      Subclasses must override this to provide the correct type of TestEntity subclass.
    • additionalRefresh

      protected void additionalRefresh()
      This method is called whenever the status bar is refreshed. When additional type-specific information is shown in a subclassed status bar, this method should be overridden to refresh that information.
    • refreshWeight

      protected void refreshWeight()
      Refreshes the weight display. This may be overridden; when doing so, the tons JLabel should be updated to reflect the weight.
    • addRefreshedListener

      public void addRefreshedListener(RefreshListener refreshListener)
    • estimatedHeatGeneration

      protected long estimatedHeatGeneration()
      Returns an estimated value of the total heat generation for Meks and Aerospace (0 for other types), as worked out by HeatGenerationEstimate. It is here in StatusBar to avoid duplication in BMStatusBar and ASStatusBar.
      Returns:
      An estimated value of the total heat generation.