Class OffBoardTargetOverlay

java.lang.Object
megamek.client.ui.clientGUI.boardview.overlay.OffBoardTargetOverlay
All Implemented Interfaces:
IDisplayable

public class OffBoardTargetOverlay extends Object implements IDisplayable
This class handles the display and logic for the off board targeting overlay.
  • Constructor Details

    • OffBoardTargetOverlay

      public OffBoardTargetOverlay(ClientGUI clientgui)
  • Method Details

    • setTargetingPhaseDisplay

      public void setTargetingPhaseDisplay(TargetingPhaseDisplay tpd)
      Sets a reference to a TargetingPhaseDisplay. Used to communicate a generated attack to it.
    • isHit

      public boolean isHit(Point point, 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
    • isReleased

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

      public void draw(Graphics graph, Rectangle rect)
      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