Class RecordSheetPreviewPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class RecordSheetPreviewPanel extends JPanel
Simply fills itself with the record sheet for the given unit. Uses background rendering for performance, rendering each page independently.
See Also:
  • Field Details

  • Constructor Details

    • RecordSheetPreviewPanel

      public RecordSheetPreviewPanel()
  • Method Details

    • setMinZoom

      public void setMinZoom(double minZoom)
      Set the minimum zoom level for the preview.
    • setFullAsyncMode

      public void setFullAsyncMode(boolean fullAsyncMode)
      When this mode is active, the rendering of the SVG happens in a background thread and not in EDT. Can cause issues during unit editing, but is much faster for viewing. Use it when you are not editing the unit.
    • setOneUnitPerSheet

      public void setOneUnitPerSheet(boolean oneUnitPerSheet)
      Set to true if only one unit should be printed per sheet.
    • includeC3inBV

      public void includeC3inBV(Boolean enabled)
      Set to true/false if you want C3 and other special equips to affect the BV
    • showPilotData

      public void showPilotData(Boolean enabled)
      Set to true/false if you want to show the pilot data on the record sheet.
    • showDamage

      public void showDamage(Boolean enabled)
      Set to true/false if you want to show the damage on the record sheet.
    • setEntities

      public void setEntities(List<? extends megamek.common.units.BTObject> selectedEntities)
      Set the entities to be displayed in the record sheet preview.
      Parameters:
      selectedEntities - The list of entities to display.
    • setEntity

      public void setEntity(megamek.common.units.Entity entity)
      Set a single entity to be displayed in the record sheet preview.
    • getRecordSheetOptions

      public RecordSheetOptions getRecordSheetOptions()
      Returns the current RecordSheetOptions based on the current settings.
    • resetView

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

      protected void paintComponent(Graphics g)
      Overrides:
      paintComponent in class JComponent
    • doLayout

      public void doLayout()
      Overrides:
      doLayout in class Container
    • cleanup

      public void cleanup()
      Cleans up resources and references to help with garbage collection.
    • removeNotify

      public void removeNotify()
      Overrides:
      removeNotify in class JComponent