Class PrintMek

All Implemented Interfaces:
Printable, IdConstants

public class PrintMek extends PrintEntity
Lays out a record sheet for a Mek
  • Field Details

    • PRESERVED_PIP_ATTRIBUTES

      public static final String[] PRESERVED_PIP_ATTRIBUTES
  • Constructor Details

    • PrintMek

      public PrintMek(megamek.common.units.Mek mek, int startPage, RecordSheetOptions options)
      Creates an SVG object for the record sheet
      Parameters:
      mek - The Mek 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.units.Entity getEntity()
      Specified by:
      getEntity in class PrintEntity
    • 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
    • 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 multipage sheets to print. The first page is 0.
    • writeTextFields

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

      protected void hideUnusedCrewElements()
      Overrides:
      hideUnusedCrewElements in class PrintEntity
    • drawStructure

      protected void drawStructure()
      Overrides:
      drawStructure 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
    • 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
    • formatJump

      protected String formatJump()
      Overrides:
      formatJump 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()
    • getEngineHits

      protected int getEngineHits()
    • getGyroHits

      protected int getGyroHits()