Class SBFRecordSheet

java.lang.Object
megamek.common.strategicBattleSystems.SBFRecordSheet
All Implemented Interfaces:
Printable

public class SBFRecordSheet extends Object implements 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).
  • Constructor Details

    • SBFRecordSheet

      public SBFRecordSheet(@Nullable SBFFormation formation)
      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

      public final void drawSheet(Graphics g)
      Draws the sheet to the given Graphics2D. When the formation is null, an empty sheet is drawn.
    • setFont

      public void setFont(Font newFont)
      Sets the font used for all headers written in the sheet to the given newFont. The size of newFont doesn't matter.
    • setValueFont

      public void setValueFont(Font newFont)
      Sets the font used for all values written in the sheet to the given newFont. The size of newFont doesn't matter.
    • setLineColor

      @Deprecated(since="0.51.0", forRemoval=true) public void setLineColor(Color lineColor)
      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

      public int print(Graphics graphics, PageFormat pageFormat, int pageIndex) throws PrinterException
      Specified by:
      print in interface Printable
      Throws:
      PrinterException