megamek.client.ui.AWT
Class FiringDisplay.AimedShotHandler

java.lang.Object
  extended by megamek.client.ui.AWT.FiringDisplay.AimedShotHandler
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.ItemListener, java.util.EventListener
Enclosing class:
FiringDisplay

 class FiringDisplay.AimedShotHandler
extends java.lang.Object
implements java.awt.event.ActionListener, java.awt.event.ItemListener


Constructor Summary
FiringDisplay.AimedShotHandler()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent ev)
          ActionListener, listens to the button in the dialog.
 boolean allowAimedShotWith(Mounted weapon)
          Determines if a certain weapon may aimed at a specific hit location.
 void closeDialog()
           
 int getAimingAt()
           
 java.lang.String getAimingLocation()
          Returns the name of aimed location.
 int getAimingMode()
           
 boolean inAimingMode()
          If in aiming mode.
 boolean isAimingAtLocation()
          If a hit location is currently selected.
 void itemStateChanged(java.awt.event.ItemEvent ev)
          ItemListener, listens to the radiobuttons in the dialog.
 void setAimingMode()
          Sets the aiming mode, depending on the target and the attacker.
 void setEnableAll(boolean enableAll)
          Enables the radiobuttons in the dialog.
 void setPartialCover(int partialCover)
           
 void showDialog()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FiringDisplay.AimedShotHandler

FiringDisplay.AimedShotHandler()
Method Detail

showDialog

public void showDialog()

closeDialog

public void closeDialog()

setEnableAll

public void setEnableAll(boolean enableAll)
Enables the radiobuttons in the dialog.


setPartialCover

public void setPartialCover(int partialCover)

getAimingAt

public int getAimingAt()

getAimingMode

public int getAimingMode()

getAimingLocation

public java.lang.String getAimingLocation()
Returns the name of aimed location.


setAimingMode

public void setAimingMode()
Sets the aiming mode, depending on the target and the attacker. Against immobile mechs, targeting computer aiming mode will be used if turned on. (This is a hack, but it's the resolution suggested by the bug submitter, and I don't think it's half bad.


inAimingMode

public boolean inAimingMode()
If in aiming mode.


isAimingAtLocation

public boolean isAimingAtLocation()
If a hit location is currently selected.


allowAimedShotWith

public boolean allowAimedShotWith(Mounted weapon)
Determines if a certain weapon may aimed at a specific hit location.


actionPerformed

public void actionPerformed(java.awt.event.ActionEvent ev)
ActionListener, listens to the button in the dialog.

Specified by:
actionPerformed in interface java.awt.event.ActionListener

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent ev)
ItemListener, listens to the radiobuttons in the dialog.

Specified by:
itemStateChanged in interface java.awt.event.ItemListener