Class SBFReportEntry

java.lang.Object
megamek.common.strategicBattleSystems.SBFReportEntry
All Implemented Interfaces:
Serializable, ReportEntry
Direct Known Subclasses:
SBFFormationReportEntry, SBFInitiativeRollReportEntry, SBFPlayerNameReportEntry, SBFPublicReportEntry, SBFReportHeader, SBFRollReportEntry, SBFUnitReportEntry

public class SBFReportEntry extends Object implements ReportEntry
See Also:
  • Field Details

  • Constructor Details

    • SBFReportEntry

      public SBFReportEntry(int messageId)
  • Method Details

    • setupStylesheet

      public static void setupStylesheet(JTextPane pane)
    • setupStylesheet

      @Deprecated(since="0.51.0", forRemoval=true) public static void setupStylesheet(StyleSheet styleSheet)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • add

      public SBFReportEntry add(int data)
      Add the given int to the list of data that will be substituted for the <data> tags in the report. The order in which items are added must match the order of the tags in the report text.
      Parameters:
      data - the int to be substituted
      Returns:
      This Report to allow chaining
    • add

      public SBFReportEntry add(int data, boolean obscure)
      Add the given int to the list of data that will be substituted for the <data> tags in the report, and mark it as double-blind sensitive information if obscure is true. The order in which items are added must match the order of the tags in the report text.
      Parameters:
      data - the int to be substituted
      obscure - boolean indicating whether the data is double-blind sensitive
      Returns:
      This Report to allow chaining
    • add

      public SBFReportEntry add(String data)
      Add the given String to the list of data that will be substituted for the <data> tags in the report. The order in which items are added must match the order of the tags in the report text.
      Parameters:
      data - the String to be substituted
      Returns:
      This Report to allow chaining
    • add

      public SBFReportEntry add(String data, boolean obscure)
      Add the given String to the list of data that will be substituted for the <data> tags in the report, and mark it as double-blind sensitive information if obscure is true. The order in which items are added must match the order of the tags in the report text.
      Parameters:
      data - the String to be substituted
      obscure - boolean indicating whether the data is double-blind sensitive
      Returns:
      This Report to allow chaining
    • text

      public final String text()
      Description copied from interface: ReportEntry
      Get the report in its final HTML form, with all the necessary substitutions made.
      Specified by:
      text in interface ReportEntry
      Returns:
      a HTML String with the final report
    • addRoll

      public ReportEntry addRoll(Roll roll)
      Description copied from interface: ReportEntry
      Adds the result of the given roll to this ReportEntry. Returns this ReportEntry to allow chaining calls.
      Specified by:
      addRoll in interface ReportEntry
      Parameters:
      roll - The roll to add
      Returns:
      this ReportEntry
    • indent

      public SBFReportEntry indent()
      Indent the report. Equivalent to calling indent(int) with a parameter of 1.
      Returns:
      This Report to allow chaining
    • indent

      public SBFReportEntry indent(int n)
      Indent the report n times.
      Parameters:
      n - the number of times to indent the report
      Returns:
      This Report to allow chaining
    • subject

      public SBFReportEntry subject(int id)
    • newLines

      public SBFReportEntry newLines(int count)
    • noNL

      public SBFReportEntry noNL()
    • endSpace

      @Deprecated(since="0.51.0", forRemoval=true) public SBFReportEntry endSpace()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • addNL

      public SBFReportEntry addNL()
    • reportText

      protected String reportText()