Class EntityViewPane

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, SwingConstants

public class EntityViewPane extends EnhancedTabbedPane
The EntityViewPane displays the entity summary, TRO and AS card panels within a TabbedPane.
See Also:
  • Constructor Details

  • Method Details

    • initialize

      protected void initialize()
      This purposefully does not set preferences, as it may be used on differing panes for differing uses, and thus you don't want to remember the selected tab between the different locations.
    • updateDisplayedEntity

      public void updateDisplayedEntity(@Nullable Entity entity)
      Updates the pane's currently displayed entity in all tabs. Performs Alpha Strike conversion if possible.
      Parameters:
      entity - the entity to update to, or null if the panels are to be emptied.
    • updateDisplayedEntity

      public void updateDisplayedEntity(@Nullable Entity entity, @Nullable ASCardDisplayable asUnit)
      Updates the pane's currently displayed entity / AS unit to the respective given units. The method assumes that asUnit corresponds to entity and does no conversion. When the AS Element or MekSummary is available, passing it in as asUnit saves the time for AS conversion.
      Parameters:
      entity - the entity to update to, or null if the panels are to be emptied.
      asUnit - the Alpha Strike unit corresponding to entity (maybe a MekSummary)
    • updateDisplayedEntity

      public void updateDisplayedEntity(@Nullable Entity entity, @Nullable ASCardDisplayable asUnit, @Nullable BattlefieldSupportAsset assetEntity)
      Updates the pane's displayed unit, including a Battlefield Support Asset for the BFS Card tab. The BFS Card tab is shown whenever an asset is present. A standalone Asset uses its Entity for Summary and TRO while omitting the standard-unit AS Card, Faction Availability and Damage Analysis tabs.
      Parameters:
      entity - the entity for the standard Summary/TRO tabs; the Asset itself for a standalone Asset
      asUnit - the Alpha Strike unit corresponding to entity (maybe a MekSummary), or null
      assetEntity - the Battlefield Support Asset to show in the Asset views, or null if the unit has no asset
    • setAnalysisGunnery

      public void setAnalysisGunnery(int gunnery)
      Sets the gunnery skill the Analysis tab displays its expected-damage curves at, so the tab can follow a live control such as the unit selector's BV gunnery field.
      Parameters:
      gunnery - the gunnery skill for the analysis charts