Class AbstractEquipmentTab

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
ASEquipmentTab, BAEquipmentTab, BMEquipmentTab, CVEquipmentTab, HHWEquipmentTab, LAEquipmentTab, PMEquipmentTab, SVEquipmentTab

public abstract class AbstractEquipmentTab extends ITab
The base class for Equipment Tabs for all unit types. It shows the equipment database and the current load out list. The load out list is obtained through the abstract method getLoadOut() and may be either the full equipment of the unit or filtered somehow so that equipment controlled in the Structure tab cannot be removed in the Equipment Tab. An EquipmentDatabaseView must be provided through the abstract method getEquipmentDatabaseView.
See Also:
  • Field Details

  • Constructor Details

    • AbstractEquipmentTab

      public AbstractEquipmentTab(EntitySource eSource)
  • Method Details

    • addRefreshedListener

      public void addRefreshedListener(RefreshListener l)
    • showInLoadOut

      protected boolean showInLoadOut(megamek.common.Mounted<?> mount)
      This method is called for all of a unit's equipment to determine if it is to be shown in the load out view. It may be overridden to hide some equipment in the Equipment Tab's load out view to prevent it from being removed here. Use to hide equipment that is controlled from the Structure Tab. By default, this method returns true.
      Parameters:
      mount - the mounted to be checked
      Returns:
      true when the given mounted may be shown in the load out view
    • getEquipmentDatabaseView

      protected abstract AbstractEquipmentDatabaseView getEquipmentDatabaseView()
    • refresh

      public void refresh()
    • refreshTable

      public void refreshTable()