Class IconView

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class IconView extends BuildView
This view displays the icon that the unit will use in MM and MHQ and allows selecting a different icon from file or from another unit from the cache. If an icon is selected, it will be stored as part of the unit file in base64 encoding when saved. Note that this is for custom units, as canon units will use the mekset to identify and load icons and will not store them in the unit file.
See Also:
  • Constructor Details

    • IconView

      public IconView()
  • Method Details

    • setRefreshedListener

      public void setRefreshedListener(RefreshListener refreshListener)
      Registers a listener notified whenever the unit's icon changes, so dependent views (e.g. the preview and a linked Battlefield Support Asset card) can re-render. Optional; when unset, an icon change only updates this view.
      Parameters:
      refreshListener - the listener to notify, or null to clear it
    • setFromEntity

      public void setFromEntity(megamek.common.units.Entity en)
    • refresh

      public void refresh()