Class BasicInfoView

All Implemented Interfaces:
ActionListener, FocusListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, megamek.common.interfaces.ITechManager

public class BasicInfoView extends BuildView implements megamek.common.interfaces.ITechManager, ActionListener, FocusListener
A panel for basic information common to all unit types: name, year, tech level and others.
See Also:
  • Constructor Details

    • BasicInfoView

      public BasicInfoView(megamek.common.TechAdvancement baseTA)
  • Method Details

    • setFromEntity

      public void setFromEntity(megamek.common.units.Entity en)
    • setAsCustomization

      public void setAsCustomization()
    • addListener

      public void addListener(BuildListener l)
    • removeListener

      public void removeListener(BuildListener l)
    • getChassis

      public String getChassis()
    • setChassis

      public void setChassis(String chassis)
    • getModel

      public String getModel()
    • setModel

      public void setModel(String model)
    • getTechIntroYear

      public int getTechIntroYear()
      Specified by:
      getTechIntroYear in interface megamek.common.interfaces.ITechManager
    • setYear

      public void setYear(int year)
    • getBuildYear

      public int getBuildYear()
      Returns the build year value, or -1 if the field is empty (meaning "use intro year").
    • setBuildYear

      public void setBuildYear(int buildYear, int introYear)
      Sets the build year field. If the build year equals the intro year (not explicitly set), the field is left empty and the intro year is shown as placeholder text.
      Parameters:
      buildYear - the original build year value
      introYear - the intro year for comparison
    • getTechFaction

      public megamek.common.enums.Faction getTechFaction()
      Specified by:
      getTechFaction in interface megamek.common.interfaces.ITechManager
    • setTechFaction

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

      public int getGameYear()
      Specified by:
      getGameYear in interface megamek.common.interfaces.ITechManager
    • getTechAvailabilityYears

      public List<Integer> getTechAvailabilityYears()
      Specified by:
      getTechAvailabilityYears in interface megamek.common.interfaces.ITechManager
    • getSource

      public String getSource()
    • setSource

      public void setSource(String source)
    • getPublished

      public String getPublished()
    • setPublished

      public void setPublished(String published)
    • getManualBV

      public int getManualBV()
      Returns:
      the entered manual BV value or -1 if it can't be parsed.
    • setManualBV

      public void setManualBV(int bv)
    • useClanTechBase

      public boolean useClanTechBase()
      Specified by:
      useClanTechBase in interface megamek.common.interfaces.ITechManager
    • useMixedTech

      public boolean useMixedTech()
      Specified by:
      useMixedTech in interface megamek.common.interfaces.ITechManager
    • setTechBase

      public void setTechBase(boolean clan, boolean mixed)
    • getTechLevel

      public megamek.common.SimpleTechLevel getTechLevel()
      Specified by:
      getTechLevel in interface megamek.common.interfaces.ITechManager
    • setTechLevel

      public void setTechLevel(megamek.common.SimpleTechLevel level)
    • focusGained

      public void focusGained(FocusEvent e)
      Specified by:
      focusGained in interface FocusListener
    • focusLost

      public void focusLost(FocusEvent e)
      Specified by:
      focusLost in interface FocusListener
    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Specified by:
      actionPerformed in interface ActionListener
    • unofficialNoYear

      public boolean unofficialNoYear()
      Specified by:
      unofficialNoYear in interface megamek.common.interfaces.ITechManager
    • useVariableTechLevel

      public boolean useVariableTechLevel()
      Specified by:
      useVariableTechLevel in interface megamek.common.interfaces.ITechManager
    • showExtinct

      public boolean showExtinct()
      Specified by:
      showExtinct in interface megamek.common.interfaces.ITechManager