Package megameklab.printing
Class PrintDropship
java.lang.Object
megameklab.printing.PrintRecordSheet
megameklab.printing.PrintEntity
megameklab.printing.PrintAero
megameklab.printing.PrintDropship
- All Implemented Interfaces:
Printable
,IdConstants
- Direct Known Subclasses:
PrintCapitalShip
Record sheet layout for Dropships, base class for other large craft
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The maximum number of inventory lines to print as a single page.static final int
The maximum number of lines to put on the first page if there has to be a second.Fields inherited from class megameklab.printing.PrintRecordSheet
DEFAULT_PIP_SIZE, DEFAULT_TYPEFACE, FILL_BLACK, FILL_GREY, 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, 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, COPYRIGHT, COST, CREW_DAMAGE, CREW_NAME, CRITS, DAMAGE, DC_PIPS, DEFAULT_FLUFF_IMAGE, DEST_MODS, DOUBLE_HS_COUNT, ENGINE_TYPE, ERA_ICON, EXTERNAL_STORES, EXTERNAL_STORES_KEY, 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, FLUFF_DUAL_PILOT, FLUFF_IMAGE, FLUFF_NAME, FLUFF_SINGLE_PILOT, FLUFF_TRIPLE_PILOT, FOOTER, FORE_SIDES_HEAT, FRAME, GUNNERY_SKILL, GUNNERY_SKILL_TEXT, HEAT_SINK_PIPS, HEAVY_DUTY_GYRO_PIP, HS_COUNT, HS_TYPE, INVENTORY, IS_PIPS, IS_PIPS_HD, IS_PIPS_HD_SH, KF_PIPS, LBL_BATTLEARMOR, LBL_JUMP, LBL_ROLE, LBL_VEE_MODE, LIFE_BOATS, 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, 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_NAME, PILOTING_SKILL, PILOTING_SKILL_TEXT, PIPS, PROTOMEK_INDEX, RANGE, RANGE_IN_HEXES, RANGE_MOD, ROLE, ROW_SHADING, RS_TEMPLATE, RULES_LEVEL, SAIL_PIPS, SHIELD, SHIELD_DA, SHIELD_DC, SI_PIPS, SNEAK_CAMO_MODS, SNEAK_IR_MODS, SOLDIER, SPAS, SQUAD, STRUCTURE_PIPS, STRUCTURE_TYPE, SUIT, TECH_BASE, TEXT_ARMOR, TEXT_DOCKING_COLLARS, TEXT_IS, TEXT_KFDRIVE, TEXT_SAIL, TEXT_SI, TITLE, TONNAGE, TORSO_WEAPON, TRACKS, TRANSPORT_WT, 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
ConstructorsConstructorDescriptionPrintDropship
(megamek.common.Aero ship, int startPage) Creates an SVG object for the record sheet using the global printing optionsPrintDropship
(megamek.common.Aero ship, int startPage, RecordSheetOptions options) Creates an SVG object for the record sheet -
Method Summary
Modifier and TypeMethodDescriptionSpace for misc equipment such as cargo space and SV chassis mods.megamek.common.Entity
int
protected String
protected String
getSVGFileName
(int pageNumber) void
processImage
(int pageNum, PageFormat pageFormat) Renders the sheet to the Graphics object.boolean
protected void
writeEquipment
(org.w3c.dom.svg.SVGRectElement svgRect) Fills in the weapons and inventory section of the record sheet.protected void
Methods inherited from class megameklab.printing.PrintAero
addReferenceCharts, drawArmorStructurePips, drawFluffImage, formatRun, formatTacticalFuel, formatWalk, getRightSideReferenceTables, includeReferenceCharts
Methods inherited from class megameklab.printing.PrintEntity
drawArmor, drawStructure, firstArmorLocation, formatCost, formatJump, formatMiscNotes, formatMovement, formatMovement, formatQuirks, formatRulesLevel, formatTechBase, getBookmarkNames, getElementById, getFluffImage, heatProfileText, hideUnusedCrewElements, showHeatProfile, showPilotInfo, useAlternateArmorGrouping
Methods inherited from class megameklab.printing.PrintRecordSheet
addMultilineTextElement, addMultilineTextElement, addTextElement, addTextElement, addTextElementToFit, addTextElementToFit, build, createDocument, createPip, createPip, createRoundedRectangle, embedImage, embedImage, exportPDF, getBoldFont, getBoldTextLength, getFirstPage, getFontHeight, getNormalFont, getRectBBox, getSVGDocument, getTextLength, getTypeface, hideElement, hideElement, hideElement, hideElement, loadTemplate, placeReferenceCharts, print, setCallback, setSVGDocument, setTextField, setTextField, setTextField
-
Field Details
-
MAX_SINGLE_PAGE_LINES
public static final int MAX_SINGLE_PAGE_LINESThe maximum number of inventory lines to print as a single page. Ideally this would be determined by the space allocated by the svg template, but we need to determine how many pages we are printing before the template is loaded so we predetermine the value.- See Also:
-
PREFERRED_SINGLE_PAGE_LINES
public static final int PREFERRED_SINGLE_PAGE_LINESThe maximum number of lines to put on the first page if there has to be a second. This is lower than the maximum to avoid having to scale down the text too much on the first page while having empty space on the second.- See Also:
-
-
Constructor Details
-
PrintDropship
Creates an SVG object for the record sheet- Parameters:
ship
- The ship to printstartPage
- The print job page number for this sheetoptions
- Overrides the global options for which elements are printed
-
PrintDropship
public PrintDropship(megamek.common.Aero ship, int startPage) Creates an SVG object for the record sheet using the global printing options- Parameters:
ship
- The ship to printstartPage
- The print job page number for this sheet
-
-
Method Details
-
getEntity
public megamek.common.Entity getEntity() -
getPageCount
public int getPageCount()- Overrides:
getPageCount
in classPrintRecordSheet
- Returns:
- The number of pages required to print this record sheet
-
getSVGFileName
- Overrides:
getSVGFileName
in classPrintAero
- 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
- Overrides:
getRecordSheetTitle
in classPrintAero
- Returns:
- The title to use for the record sheet
-
processImage
Description copied from class:PrintRecordSheet
Renders the sheet to the Graphics object.- Overrides:
processImage
in classPrintAero
- Parameters:
pageNum
- Indicates which page of multi-page sheets to print. The first page is 0.
-
writeTextFields
protected void writeTextFields()- Overrides:
writeTextFields
in classPrintAero
-
writeEquipment
protected void writeEquipment(org.w3c.dom.svg.SVGRectElement svgRect) Description copied from class:PrintEntity
Fills in the weapons and inventory section of the record sheet.- Overrides:
writeEquipment
in classPrintEntity
- Parameters:
svgRect
- The bounds of the text region
-
formatFeatures
Description copied from class:PrintEntity
Space for misc equipment such as cargo space and SV chassis mods.- Overrides:
formatFeatures
in classPrintAero
- Returns:
- A list of misc equipment, or an empty String if none
-
supportsAlternateArmorGrouping
public boolean supportsAlternateArmorGrouping()- Overrides:
supportsAlternateArmorGrouping
in classPrintAero
-