Class CVStructureTab

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

public class CVStructureTab extends ITab implements CVBuildListener, ArmorAllocationListener
See Also:
  • Constructor Details

    • CVStructureTab

      public CVStructureTab(EntitySource eSource)
  • Method Details

    • refresh

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

      public void setAsCustomization()
      Disables controls that cannot be changed when customizing a refit.
    • 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)
    • 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
    • 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
    • tonnageChanged

      public void tonnageChanged(double tonnage)
      Description copied from interface: CVBuildListener
      Notify of a change in the vehicle tonnage
      Specified by:
      tonnageChanged in interface CVBuildListener
      Parameters:
      tonnage - The construction weight of the vehicle in tons
    • omniChanged

      public void omniChanged(boolean omni)
      Description copied from interface: CVBuildListener
      Notify of a change in omni status
      Specified by:
      omniChanged in interface CVBuildListener
      Parameters:
      omni - Whether the vehicle is an OmniVehicle
    • superheavyChanged

      public void superheavyChanged(boolean superheavy)
      Description copied from interface: CVBuildListener
      Notify of a change in superheavy status
      Specified by:
      superheavyChanged in interface CVBuildListener
      Parameters:
      superheavy - Whether the vehicle is in the superheavy weight range.
    • trailerChanged

      public void trailerChanged(boolean trailer)
      Description copied from interface: CVBuildListener
      Notify of a change in trailer status
      Specified by:
      trailerChanged in interface CVBuildListener
      Parameters:
      trailer - Whether the vehicle is constructed as a trailer
    • controlSystemsChanged

      public void controlSystemsChanged(boolean controlSystems)
      Description copied from interface: CVBuildListener
      Notify of a change in whether a trailer has control systems.
      Specified by:
      controlSystemsChanged in interface CVBuildListener
      Parameters:
      controlSystems - Whether the trailer has control systems.
    • motiveChanged

      public void motiveChanged(megamek.common.units.EntityMovementMode motive)
      Description copied from interface: CVBuildListener
      Notify of a change in motive type. May require instantiation of a new Entity.
      Specified by:
      motiveChanged in interface CVBuildListener
      Parameters:
      motive - The new motive type
    • engineChanged

      public void engineChanged(megamek.common.equipment.Engine engine)
      Description copied from interface: CVBuildListener
      Notify of a change in the type of engine
      Specified by:
      engineChanged in interface CVBuildListener
      Parameters:
      engine - The new engine type
    • extraSeatsChanged

      public void extraSeatsChanged(int seats)
      Description copied from interface: CVBuildListener
      Notify of a change in the number of extra combat seats.
      Specified by:
      extraSeatsChanged in interface CVBuildListener
      Parameters:
      seats - The number of extra seats
    • turretChanged

      public void turretChanged(int turretConfig)
      Description copied from interface: CVBuildListener
      Notify of a change in turret configuration.
      Specified by:
      turretChanged in interface CVBuildListener
      Parameters:
      turretConfig - One of TURRET_NONE, * TURRET_SINGLE, TURRET_DUAL, or * TURRET_CHIN
    • turretBaseWtChanged

      public void turretBaseWtChanged(double turret1, double turret2)
      Description copied from interface: CVBuildListener
      Notify of a change in the base weight of one or more turrets. This is used for OmniVehicles, which have to set the limit of pod space in the turret(s) as part of the base chassis design.
      Specified by:
      turretBaseWtChanged in interface CVBuildListener
      Parameters:
      turret1 - The weight of the turret, or the rear turret in dual-turret vehicles
      turret2 - The weight of the front turret in dual-turret vehicles
    • troopSpaceChanged

      public void troopSpaceChanged(double fixed, double pod)
      Description copied from interface: CVBuildListener
      Notify of a change in the size of any infantry compartment
      Specified by:
      troopSpaceChanged in interface CVBuildListener
      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)
      Description copied from interface: CVBuildListener
      Notify of a change in the size of a cargo bay
      Specified by:
      cargoSpaceChanged in interface CVBuildListener
      Parameters:
      bayType - The type of bay
      fixed - The size of a fixed bay
      pod - The size of a pod-mounted bay
    • resetChassis

      public void resetChassis()
      Description copied from interface: CVBuildListener
      Notify of a command to remove all pod-mounted equipment from an OmniVehicle and reset it to the base chassis.
      Specified by:
      resetChassis in interface CVBuildListener
    • 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
    • dniCockpitModChanged

      public void dniCockpitModChanged(boolean hasMod)
      Description copied from interface: CVBuildListener
      Notify of a change in DNI Cockpit Modification status.
      Specified by:
      dniCockpitModChanged in interface CVBuildListener
      Parameters:
      hasMod - Whether the vehicle has the DNI Cockpit Modification