Class PrintAero

All Implemented Interfaces:
Printable, IdConstants
Direct Known Subclasses:
PrintDropship

public class PrintAero extends PrintEntity
Lays out record sheet for non-capital aerospace units
  • Constructor Details

    • PrintAero

      public PrintAero(megamek.common.Aero aero, int startPage, RecordSheetOptions options)
      Creates an SVG object for the record sheet
      Parameters:
      aero - The aerospace unit to print
      startPage - The print job page number for this sheet
      options - Overrides the global options for which elements are printed
  • Method Details

    • getSVGFileName

      protected String getSVGFileName(int pageNumber)
      Specified by:
      getSVGFileName in class PrintRecordSheet
      Parameters:
      pageNumber - The page number in the current record sheet, where the first page is numbered zero.
      Returns:
      The file name for the current page in the record sheet image directory
    • getRecordSheetTitle

      protected String getRecordSheetTitle()
      Specified by:
      getRecordSheetTitle in class PrintRecordSheet
      Returns:
      The title to use for the record sheet
    • getEntity

      public megamek.common.Entity getEntity()
      Specified by:
      getEntity in class PrintEntity
    • processImage

      public void processImage(int pageNum, PageFormat pageFormat)
      Description copied from class: PrintRecordSheet
      Renders the sheet to the Graphics object.
      Overrides:
      processImage in class PrintEntity
      Parameters:
      pageNum - Indicates which page of multi-page sheets to print. The first page is 0.
    • writeTextFields

      protected void writeTextFields()
      Overrides:
      writeTextFields in class PrintEntity
    • drawArmorStructurePips

      protected void drawArmorStructurePips()
      Description copied from class: PrintEntity
      Add armor and structure pips for each location.
      Overrides:
      drawArmorStructurePips in class PrintEntity
    • formatTacticalFuel

      public String formatTacticalFuel()
      Description copied from class: PrintEntity
      Fuel block used by aerospace unit. Fuel for other units, such as non-aerospace support vehicles, is for strategic fuel use and not relevant for the record sheet.
      Overrides:
      formatTacticalFuel in class PrintEntity
      Returns:
      A string containing the amount of fuel and cost per thrust point for aerospace units, otherwise an empty string.
    • formatFeatures

      public String formatFeatures()
      Description copied from class: PrintEntity
      Space for misc equipment such as cargo space and SV chassis mods.
      Overrides:
      formatFeatures in class PrintEntity
      Returns:
      A list of misc equipment, or an empty String if none
    • drawFluffImage

      protected void drawFluffImage()
      Overrides:
      drawFluffImage in class PrintEntity
    • formatWalk

      protected String formatWalk()
      Overrides:
      formatWalk in class PrintEntity
    • formatRun

      protected String formatRun()
      Overrides:
      formatRun in class PrintEntity
    • supportsAlternateArmorGrouping

      protected boolean supportsAlternateArmorGrouping()
      Specified by:
      supportsAlternateArmorGrouping in class PrintEntity
    • includeReferenceCharts

      protected boolean includeReferenceCharts()
      Description copied from class: PrintRecordSheet
      Used to determine whether to scale the record sheet to make room for charts. This depends both on whether the option is selected and on whether the sheet supports reference charts.
      Overrides:
      includeReferenceCharts in class PrintRecordSheet
      Returns:
      Whether to include reference tables
    • getRightSideReferenceTables

      protected List<ReferenceTable> getRightSideReferenceTables()
      Overrides:
      getRightSideReferenceTables in class PrintRecordSheet
    • addReferenceCharts

      protected void addReferenceCharts(PageFormat pageFormat)
      Description copied from class: PrintRecordSheet
      Adds reference charts to the right side of the record sheet.
      Overrides:
      addReferenceCharts in class PrintRecordSheet
      Parameters:
      pageFormat - The document's page format.
    • getHeatsinkDamage

      protected int getHeatsinkDamage()
    • applyCoreComponentsCriticalDamage

      protected void applyCoreComponentsCriticalDamage()
      Description copied from class: PrintEntity
      Applies the critical damage to the core components of the unit and crew. This should be overridden by subclasses that have core components.
      Overrides:
      applyCoreComponentsCriticalDamage in class PrintEntity
    • getCollarDamage

      protected int getCollarDamage()