Class PMStructureTab

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

public class PMStructureTab extends ITab implements ProtoMekBuildListener, ArmorAllocationListener
Structure tab for protomeks
See Also:
  • Constructor Details

    • PMStructureTab

      public PMStructureTab(EntitySource eSource)
  • Method Details

    • 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
    • getTechManager

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

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

      public void removeAllListeners()
    • addAllListeners

      public void addAllListeners()
    • addRefreshedListener

      public void addRefreshedListener(RefreshListener l)
    • isQuad

      public boolean isQuad()
    • isGlider

      @Deprecated(since="0.51.0", forRemoval=true) public boolean isGlider()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setAsCustomization

      public void setAsCustomization()
    • 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
    • factionChanged

      public void factionChanged(megamek.common.enums.Faction faction)
      Specified by:
      factionChanged 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)
    • tonnageChanged

      public void tonnageChanged(double tonnage)
      Specified by:
      tonnageChanged in interface ProtoMekBuildListener
    • typeChanged

      public void typeChanged(int motiveType)
      Specified by:
      typeChanged in interface ProtoMekBuildListener
    • armorTypeChanged

      public void armorTypeChanged(megamek.common.equipment.ArmorType armor)
      Description copied from interface: ArmorAllocationListener
      Notifies of a change in the armor type.
      Specified by:
      armorTypeChanged in interface ArmorAllocationListener
      Parameters:
      armor - The equipment instance of the armor to use.
    • armorFactorChanged

      public void armorFactorChanged(int points)
      Description copied from interface: ArmorAllocationListener
      Notifies of a change in the total number of armor points on the unit. This is used for unit types that assign armor by the point rather than by weight.
      Specified by:
      armorFactorChanged in interface ArmorAllocationListener
      Parameters:
      points - The total number of armor points 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
    • 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
    • mainGunChanged

      public void mainGunChanged(boolean mainGun)
      Specified by:
      mainGunChanged in interface ProtoMekBuildListener
    • setEnhancement

      public void setEnhancement(megamek.common.equipment.EquipmentType eq, boolean selected)
      Specified by:
      setEnhancement in interface ProtoMekBuildListener
    • setISInterface

      public void setISInterface(boolean selected)
      Specified by:
      setISInterface in interface ProtoMekBuildListener
    • 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