Class UnitOverview

java.lang.Object
megamek.client.ui.swing.UnitOverview
All Implemented Interfaces:
IDisplayable, IPreferenceChangeListener

public class UnitOverview extends Object implements IDisplayable, IPreferenceChangeListener
  • Field Details

    • ICON_NAME_MAX_LENGTH

      public static final int ICON_NAME_MAX_LENGTH
      The maximum length of the icon name.
      See Also:
  • Constructor Details

    • UnitOverview

      public UnitOverview(ClientGUI clientgui)
  • Method Details

    • getUIWidth

      public static int getUIWidth()
    • draw

      public void draw(Graphics graph, Rectangle clipBounds)
      Description copied from interface: IDisplayable
      Draw this IDisplayable to the Graphics graph, which is the boardview graphics. The currently visible part of the boardview is given by the Rectangle rect, so the upper left corner of the visible boardview is rect.x, rect.y.
      Specified by:
      draw in interface IDisplayable
    • isHit

      public boolean isHit(Point p, Dimension size)
      Description copied from interface: IDisplayable
      Returns true when the mouse position point is considered "within" this IDisplayable. This is called when a mouse button is pressed. The default for this method will always return false.
      Specified by:
      isHit in interface IDisplayable
    • isDragged

      public boolean isDragged(Point p, Dimension size)
      Description copied from interface: IDisplayable
      Returns true when this IDisplayable is dragged or resized using mouse dragging. This will prevent the boardview from reacting to this mouse action. The default for this method will always return false.
      Specified by:
      isDragged in interface IDisplayable
    • isReleased

      public boolean isReleased()
      Specified by:
      isReleased in interface IDisplayable
    • getIconName

      protected String getIconName(Entity e, FontMetrics metrics)
    • adjustString

      protected String adjustString(String s, FontMetrics metrics)
    • preferenceChange

      public void preferenceChange(PreferenceChangeEvent e)
      Specified by:
      preferenceChange in interface IPreferenceChangeListener