Package megameklab.printing
Class PrintAero
java.lang.Object
megameklab.printing.PrintRecordSheet
megameklab.printing.PrintEntity
megameklab.printing.PrintAero
- All Implemented Interfaces:
Printable
,IdConstants
- Direct Known Subclasses:
PrintDropship
Lays out record sheet for non-capital aerospace units
-
Field Summary
Fields inherited from class megameklab.printing.PrintRecordSheet
DEFAULT_PIP_SIZE, DEFAULT_PIP_STROKE, DEFAULT_TYPEFACE, FILL_BLACK, FILL_GREY, FILL_RED, FILL_SHADOW, FILL_WHITE, FONT_SIZE_LARGE, FONT_SIZE_MEDIUM, FONT_SIZE_SMALL, FONT_SIZE_VSMALL, options, svgNS, TABLE_RATIO
Fields inherited from interface megameklab.printing.IdConstants
AFT_HEAT, AFT_SIDES_HEAT, AMMO_PIPS, ARMOR_DIAGRAM, ARMOR_DIVISOR, ARMOR_KIT, ARMOR_PIPS, ARMOR_TYPE, ASF_BLANK_GUNNERY_SKILL, ASF_BLANK_PILOTING_SKILL, ASF_GUNNERY_SKILL, ASF_PILOTING_SKILL, AVIONICS_HIT, BLANK_CREW_NAME, BLANK_GUNNERY_SKILL, BLANK_PILOTING_SKILL, BLANKS_CREW, BOMB_BOXES, BROADSIDES_HEAT, BV, CANON_ARMOR_PIPS, CANON_STRUCTURE_PIPS, CHECK_AP, CHECK_LEG, CHECK_MECHANIZED, CHECK_SWARM, CIC_HIT, COMMANDER_HIT, COPILOT_HIT, COPYRIGHT, COST, CREW_DAMAGE, CREW_HIT, CREW_NAME, CRITS, DAMAGE, DC_PIPS, DEFAULT_FLUFF_IMAGE, DEST_MODS, DOCKING_COLLAR_HIT, DOUBLE_HS_COUNT, DRIVER_HIT, ENGINE_HIT, ENGINE_TYPE, ERA_ICON, EXTERNAL_STORES, EXTERNAL_STORES_KEY, FCS_HIT, FIELD_GUN_AMMO, FIELD_GUN_COLUMNS, FIELD_GUN_CREW, FIELD_GUN_DMG, FIELD_GUN_DMG_2, FIELD_GUN_LONG, FIELD_GUN_MED, FIELD_GUN_MIN_RANGE, FIELD_GUN_QTY, FIELD_GUN_SHORT, FIELD_GUN_TYPE, FLIGHT_STABILIZER_HIT, FLUFF_DUAL_PILOT, FLUFF_IMAGE, FLUFF_NAME, FLUFF_SINGLE_PILOT, FLUFF_TRIPLE_PILOT, FOOTER, FORE_SIDES_HEAT, FRAME, FUEL_TANK_HIT, GUNNERY_SKILL, GUNNERY_SKILL_TEXT, GYRO_HIT, HEAT_SINK_PIPS, HEAVY_DUTY_GYRO_PIP, HS_COUNT, HS_TYPE, INVENTORY, IS_PIPS, IS_PIPS_HD, IS_PIPS_HD_SH, KF_BOOM_HIT, KF_PIPS, LANDING_GEAR_HIT, LBL_BATTLEARMOR, LBL_JUMP, LBL_ROLE, LBL_VEE_MODE, LIFE_BOATS, LIFE_SUPPORT_HIT, MAG_CLAMP_NOTE, MAIN_GUN_ARMOR, MAIN_GUN_SHADOW, MAIN_GUN_TEXT, MINUS_1_MP, MINUS_2_MP, MINUS_3_MP, MINUS_4_MP, MINUS_5_MP, MINUS_6_MP, MINUS_7_MP, MINUS_8_MP, MINUS_9_MP, MML_COLOR_ELEMENTS, MML_FIELD_WIDTH, MML_GAP, MML_MULTISECTION, MODE_1, MODE_2, MODE_2_LABEL, MOTIVE_SYSTEM_HIT, MOVEMENT_TYPE, MP_1, MP_2, MP_2_LABEL, MP_AIRMEK_CRUISE, MP_AIRMEK_FLANK, MP_AIRMEK_RUN, MP_AIRMEK_WALK, MP_CRUISE, MP_FLANK, MP_GROUND, MP_JUMP, MP_MAX_THRUST, MP_RUN, MP_SAFE_THRUST, MP_WALK, N_BATTLEARMOR, N_CREW, N_MARINES, N_OTHER, N_PASSENGERS, NO_SOLDIER, NOSE_HEAT, NOTES, PARTIAL_WING_BONUS, PATCHWORK, PILOT_HIT, PILOT_NAME, PILOTING_SKILL, PILOTING_SKILL_TEXT, PIPS, PROTOMEK_INDEX, RANGE, RANGE_IN_HEXES, RANGE_MOD, ROLE, ROW_SHADING, RS_TEMPLATE, RULES_LEVEL, SAIL_PIPS, SENSOR_HIT, SHIELD, SHIELD_DA, SHIELD_DC, SI_PIPS, SNEAK_CAMO_MODS, SNEAK_IR_MODS, SOLDIER, SPAS, SQUAD, STABILIZER_HIT_FRONT, STABILIZER_HIT_LEFT, STABILIZER_HIT_REAR, STABILIZER_HIT_RIGHT, STABILIZER_HIT_TURRET, STABILIZER_HIT_TURRET_FRONT, STABILIZER_HIT_TURRET_REAR, STRUCTURE_PIPS, STRUCTURE_TYPE, SUIT, TECH_BASE, TEXT_ARMOR, TEXT_DOCKING_COLLARS, TEXT_IS, TEXT_KFDRIVE, TEXT_SAIL, TEXT_SI, THRUSTER_LEFT_HIT, THRUSTER_RIGHT_HIT, TITLE, TONNAGE, TORSO_WEAPON, TRACKS, TRANSPORT_WT, TURRET_LOCKED, TURRET_LOCKED_FRONT, TURRET_LOCKED_REAR, TYPE, TYPE2, UNIT_SCALE, UNIT_TYPE, UW_LABEL, UW_RANGE_MOD, WARRIOR_DATA_DUAL, WARRIOR_DATA_SINGLE, WARRIOR_DATA_TRIPLE, WHEELS
Fields inherited from interface java.awt.print.Printable
NO_SUCH_PAGE, PAGE_EXISTS
-
Constructor Summary
ConstructorsConstructorDescriptionPrintAero
(megamek.common.Aero aero, int startPage, RecordSheetOptions options) Creates an SVG object for the record sheet -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addReferenceCharts
(PageFormat pageFormat) Adds reference charts to the right side of the record sheet.protected void
Applies the critical damage to the core components of the unit and crew.protected void
Add armor and structure pips for each location.protected void
Space for misc equipment such as cargo space and SV chassis mods.protected String
Fuel block used by aerospace unit.protected String
protected int
megamek.common.Entity
protected int
protected String
protected List<ReferenceTable>
protected String
getSVGFileName
(int pageNumber) protected boolean
Used to determine whether to scale the record sheet to make room for charts.void
processImage
(int pageNum, PageFormat pageFormat) Renders the sheet to the Graphics object.protected boolean
protected void
Methods inherited from class megameklab.printing.PrintEntity
drawArmor, drawStructure, firstArmorLocation, formatCost, formatJump, formatMiscNotes, formatMovement, formatMovement, formatQuirks, formatRulesLevel, formatTechBase, getArmorDamage, getBookmarkNames, getElementById, getFluffImage, getHitsCoreComponent, getStructureDamage, heatProfileText, hideUnusedCrewElements, showC3, showDamage, showHeatProfile, showPilotInfo, showQuirks, useAlternateArmorGrouping, writeEquipment
Methods inherited from class megameklab.printing.PrintRecordSheet
addLineThrough, addLineThrough, addMultilineTextElement, addMultilineTextElement, addMultilineTextElement, addTextElement, addTextElement, addTextElementToFit, addTextElementToFit, build, createDocument, createPip, createPip, createRoundedRectangle, embedImage, embedImage, exportPDF, fillCoreComponentCriticalDamage, fillCoreComponentCriticalDamage, getBoldFont, getBoldItalicFont, getBoldItalicTextLength, getBoldTextLength, getDamageFillColor, getFirstPage, getFontHeight, getFontHeight, getItalicFont, getItalicTextLength, getNormalFont, getNormalTextLength, getPageCount, getRectBBox, getSVGDocument, getTextLength, getTextLength, getTextLength, getTypeface, hideElement, hideElement, hideElement, hideElement, loadTemplate, placeReferenceCharts, print, setCallback, setSVGDocument, setTextField, setTextField, setTextField
-
Constructor Details
-
PrintAero
Creates an SVG object for the record sheet- Parameters:
aero
- The aerospace unit to printstartPage
- The print job page number for this sheetoptions
- Overrides the global options for which elements are printed
-
-
Method Details
-
getSVGFileName
- Specified by:
getSVGFileName
in classPrintRecordSheet
- 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
- Specified by:
getRecordSheetTitle
in classPrintRecordSheet
- Returns:
- The title to use for the record sheet
-
getEntity
public megamek.common.Entity getEntity()- Specified by:
getEntity
in classPrintEntity
-
processImage
Description copied from class:PrintRecordSheet
Renders the sheet to the Graphics object.- Overrides:
processImage
in classPrintEntity
- Parameters:
pageNum
- Indicates which page of multi-page sheets to print. The first page is 0.
-
writeTextFields
protected void writeTextFields()- Overrides:
writeTextFields
in classPrintEntity
-
drawArmorStructurePips
protected void drawArmorStructurePips()Description copied from class:PrintEntity
Add armor and structure pips for each location.- Overrides:
drawArmorStructurePips
in classPrintEntity
-
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 classPrintEntity
- Returns:
- A string containing the amount of fuel and cost per thrust point for aerospace units, otherwise an empty string.
-
formatFeatures
Description copied from class:PrintEntity
Space for misc equipment such as cargo space and SV chassis mods.- Overrides:
formatFeatures
in classPrintEntity
- Returns:
- A list of misc equipment, or an empty String if none
-
drawFluffImage
protected void drawFluffImage()- Overrides:
drawFluffImage
in classPrintEntity
-
formatWalk
- Overrides:
formatWalk
in classPrintEntity
-
formatRun
- Overrides:
formatRun
in classPrintEntity
-
supportsAlternateArmorGrouping
protected boolean supportsAlternateArmorGrouping()- Specified by:
supportsAlternateArmorGrouping
in classPrintEntity
-
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 classPrintRecordSheet
- Returns:
- Whether to include reference tables
-
getRightSideReferenceTables
- Overrides:
getRightSideReferenceTables
in classPrintRecordSheet
-
addReferenceCharts
Description copied from class:PrintRecordSheet
Adds reference charts to the right side of the record sheet.- Overrides:
addReferenceCharts
in classPrintRecordSheet
- 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 classPrintEntity
-
getCollarDamage
protected int getCollarDamage()
-