Class PrintTank

All Implemented Interfaces:
Printable, IdConstants

public class PrintTank extends PrintEntity
Configures record sheet for ground combat and support vehicles. When two units are printed on a single page, this is responsible for one half of the page. Vehicles which are printed two per page should not use this class directly, but instead use PrintCompositeTankSheet
  • Constructor Details

    • PrintTank

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

    • getEntity

      public megamek.common.units.Entity getEntity()
      Specified by:
      getEntity in class PrintEntity
    • 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
    • writeTextFields

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

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

      protected boolean supportsAlternateArmorGrouping()
      Specified by:
      supportsAlternateArmorGrouping in class PrintEntity
    • 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
    • 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.
    • 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