Class ASStructureTab

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, AeroBuildListener, ArmorAllocationListener, BuildListener

public class ASStructureTab extends ITab implements AeroBuildListener, ArmorAllocationListener
See Also:
  • Constructor Details

    • ASStructureTab

      public ASStructureTab(EntitySource eSource)
  • Method Details

    • getTechManager

      public megamek.common.interfaces.ITechManager getTechManager()
    • setTechFaction

      public void setTechFaction(megamek.common.enums.Faction techFaction)
    • refresh

      public void refresh()
    • createLabel

      public JLabel createLabel(String text, Dimension maxSize)
    • setFieldSize

      public void setFieldSize(JComponent box, Dimension maxSize)
      Overrides:
      setFieldSize in class ITab
    • removeSystemCrits

      public void removeSystemCrits(int systemType)
    • removeAllListeners

      public void removeAllListeners()
    • addAllListeners

      public void addAllListeners()
    • addRefreshedListener

      public void addRefreshedListener(RefreshListener l)
    • setAsCustomization

      public void setAsCustomization()
    • setAeroStructuralIntegrity

      public void setAeroStructuralIntegrity()
      Sets the structural integrity for Aerospace and Conventional fighters. For these units, the SI is equal to the safe thrust rating or 10% of the units tonnage, whichever is greater. The SI for fighters does not take up any tonnage.
    • refreshSummary

      public void refreshSummary()
      Specified by:
      refreshSummary in interface BuildListener
    • chassisChanged

      public void chassisChanged(String chassis)
      Specified by:
      chassisChanged in interface BuildListener
    • modelChanged

      public void modelChanged(String model)
      Specified by:
      modelChanged in interface BuildListener
    • yearChanged

      public void yearChanged(int year)
      Specified by:
      yearChanged in interface BuildListener
    • sourceChanged

      public void sourceChanged(String source)
      Specified by:
      sourceChanged in interface BuildListener
    • techBaseChanged

      public void techBaseChanged(boolean clan, boolean mixed)
      Specified by:
      techBaseChanged in interface BuildListener
    • techLevelChanged

      public void techLevelChanged(megamek.common.SimpleTechLevel techLevel)
      Specified by:
      techLevelChanged in interface BuildListener
    • updateTechLevel

      public void updateTechLevel()
      Specified by:
      updateTechLevel in interface BuildListener
    • manualBVChanged

      public void manualBVChanged(int manualBV)
      Description copied from interface: BuildListener
      Notifies of a change of the manually entered BV. When manualBV is 0 or less, the unit should be set to not use a manual BV value and the manual BV set to -1.
      Specified by:
      manualBVChanged in interface BuildListener
      Parameters:
      manualBV - The entered manual BV; may be invalid (0 or less)
    • heatSinksChanged

      public void heatSinksChanged(int index, int count)
      Description copied from interface: BuildListener
      Notifies of a change in heat sink type or count for aerospace units
      Specified by:
      heatSinksChanged in interface BuildListener
      Parameters:
      index - Either HeatSinkView.TYPE_SINGLE or HeatSinkView.TYPE_DOUBLE_AERO
      count - The number of heat sinks
    • heatSinkBaseCountChanged

      public void heatSinkBaseCountChanged(int count)
      Description copied from interface: BuildListener
      Notifies of a change in the number of heat sinks that are part of the base chassis of an omni unit
      Specified by:
      heatSinkBaseCountChanged in interface BuildListener
      Parameters:
      count - The number of fixed heat sinks
    • armorTypeChanged

      public void armorTypeChanged(int at, int aTechLevel)
      Description copied from interface: ArmorAllocationListener
      Notifies of a change in the armor type
      Specified by:
      armorTypeChanged in interface ArmorAllocationListener
      Parameters:
      at - The armor type constant from EquipmentType
      aTechLevel - The tech level constant from TechConstants, used to distinguish between IS and Clan versions
    • armorTonnageChanged

      public void armorTonnageChanged(double tonnage)
      Description copied from interface: ArmorAllocationListener
      Notifies of a change in armor tonnage. This is not used by units that assign armor by point.
      Specified by:
      armorTonnageChanged in interface ArmorAllocationListener
      Parameters:
      tonnage - The total weight of armor on the unit.
    • maximizeArmor

      public void maximizeArmor()
      Description copied from interface: ArmorAllocationListener
      Signals that the armor should be set to the maximum value for the unit.
      Specified by:
      maximizeArmor in interface ArmorAllocationListener
    • useRemainingTonnageArmor

      public void useRemainingTonnageArmor()
      Description copied from interface: ArmorAllocationListener
      Signals that any remaining weight that has not been allocated should be used for armor, up to the armor limit for the unit.
      Specified by:
      useRemainingTonnageArmor in interface ArmorAllocationListener
    • walkChanged

      public void walkChanged(int walkMP)
      Specified by:
      walkChanged in interface BuildListener
    • jumpChanged

      public void jumpChanged(int jumpMP, megamek.common.equipment.EquipmentType jumpJet)
      Specified by:
      jumpChanged in interface BuildListener
    • jumpTypeChanged

      public void jumpTypeChanged(megamek.common.equipment.EquipmentType jumpJet)
      Specified by:
      jumpTypeChanged in interface BuildListener
    • tonnageChanged

      public void tonnageChanged(double tonnage)
      Specified by:
      tonnageChanged in interface AeroBuildListener
    • omniChanged

      public void omniChanged(boolean omni)
      Specified by:
      omniChanged in interface AeroBuildListener
    • vstolChanged

      public void vstolChanged(boolean vstol)
      Specified by:
      vstolChanged in interface AeroBuildListener
    • fighterTypeChanged

      public void fighterTypeChanged(int type)
      Specified by:
      fighterTypeChanged in interface AeroBuildListener
    • engineChanged

      public void engineChanged(megamek.common.equipment.Engine engine)
      Specified by:
      engineChanged in interface AeroBuildListener
    • cockpitChanged

      public void cockpitChanged(int cockpitType)
      Specified by:
      cockpitChanged in interface AeroBuildListener
    • resetChassis

      public void resetChassis()
      Specified by:
      resetChassis in interface AeroBuildListener
    • troopSpaceChanged

      public void troopSpaceChanged(double fixed, double pod)
      Notify of a change in the size of any infantry compartment
      Specified by:
      troopSpaceChanged in interface AeroBuildListener
      Parameters:
      fixed - The weight in tons of the infantry compartment
      pod - The weight in tons of any pod-mounted infantry compartment
    • cargoSpaceChanged

      public void cargoSpaceChanged(megamek.common.verifier.BayData bayType, double fixed, double pod)
      Notify of a change in the size of a cargo bay
      Specified by:
      cargoSpaceChanged in interface AeroBuildListener
      Parameters:
      bayType - The type of bay
      fixed - The size of a fixed bay
      pod - The size of a pod-mounted bay
    • fuelTonnageChanged

      public void fuelTonnageChanged(double tonnage)
      Specified by:
      fuelTonnageChanged in interface BuildListener
    • fuelCapacityChanged

      public void fuelCapacityChanged(int capacity)
      Description copied from interface: BuildListener
      Notify of a change in the amount of fuel. For aerospace this is number of fuel points. For ground support vehicles this is the range in km.
      Specified by:
      fuelCapacityChanged in interface BuildListener
      Parameters:
      capacity - The number of fuel points or range as appropriate to the unit type
    • armorPointsChanged

      public void armorPointsChanged(int location, int front, int rear)
      Description copied from interface: ArmorAllocationListener
      Notifies of a change to the number of armor points assigned to a particular location
      Specified by:
      armorPointsChanged in interface ArmorAllocationListener
      Parameters:
      location - The location to assign the points
      front - The number of points to assign to the front (or total to the location if there is not separate rear armor)
      rear - The number of points to assign to the rear armor of the location
    • autoAllocateArmor

      public void autoAllocateArmor()
      Description copied from interface: ArmorAllocationListener
      Signals that the armor should be automatically distributed to the various locations.
      Specified by:
      autoAllocateArmor in interface ArmorAllocationListener
    • patchworkChanged

      public void patchworkChanged(int location, megamek.common.equipment.ArmorType armor)
      Description copied from interface: ArmorAllocationListener
      Notifies of a change in the type of armor assigned to a specific location of a unit with patchwork armor.
      Specified by:
      patchworkChanged in interface ArmorAllocationListener
      Parameters:
      location - The location constant
      armor - The type of armor used in the location.
    • mulIdChanged

      public void mulIdChanged(int mulId)
      Specified by:
      mulIdChanged in interface BuildListener
    • roleChanged

      public void roleChanged(megamek.common.units.UnitRole role)
      Specified by:
      roleChanged in interface BuildListener