Class SBFRecordSheet
java.lang.Object
megamek.common.strategicBattleSystems.SBFRecordSheet
- All Implemented Interfaces:
Printable
This class represents a Strategic BattleForce Record Sheet. It can be drawn to a Graphics2D context using
drawSheet(Graphics) and supports printing using Printable. The font for the headers and other fixed
texts can be set using setFont(Font); the font for the formation values can be set independently using
setValueFont(Font). The color of the lines undervalues can be set using setLineColor(Color).-
Field Summary
Fields inherited from interface java.awt.print.Printable
NO_SUCH_PAGE, PAGE_EXISTS -
Constructor Summary
ConstructorsConstructorDescriptionSBFRecordSheet(SBFFormation formation) Constructs and initializes a Strategic BattleForce Record Sheet for the given formation. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidDraws the sheet to the given Graphics2D.intprint(Graphics graphics, PageFormat pageFormat, int pageIndex) voidSets the font used for all headers written in the sheet to the given newFont.voidsetLineColor(Color lineColor) Deprecated, for removal: This API element is subject to removal in a future version.voidsetValueFont(Font newFont) Sets the font used for all values written in the sheet to the given newFont.
-
Constructor Details
-
SBFRecordSheet
Constructs and initializes a Strategic BattleForce Record Sheet for the given formation. When formation is null, an empty record sheet will be drawn.
-
-
Method Details
-
drawSheet
Draws the sheet to the given Graphics2D. When the formation is null, an empty sheet is drawn. -
setFont
Sets the font used for all headers written in the sheet to the given newFont. The size of newFont doesn't matter. -
setValueFont
Sets the font used for all values written in the sheet to the given newFont. The size of newFont doesn't matter. -
setLineColor
Deprecated, for removal: This API element is subject to removal in a future version.Sets the color of the underlining undervalues to the given lineColor. -
print
- Specified by:
printin interfacePrintable- Throws:
PrinterException
-