Class AimedShotHandler
java.lang.Object
megamek.client.ui.panels.phaseDisplay.AimedShotHandler
- All Implemented Interfaces:
ActionListener
,ItemListener
,EventListener
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
ActionListener, listens to the button in the dialog.boolean
allowAimedShotWith
(WeaponMounted weapon) should aimned shoots be allowed with the passed weaponvoid
int
Returns the name of aimed location.boolean
void
ItemListener, listens to the radiobuttons in the dialog.void
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
-
Constructor Details
-
AimedShotHandler
-
-
Method Details
-
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
-
getAimingLocation
Returns the name of aimed location. -
setAimingMode
public void setAimingMode()Sets the aiming mode, depending on the target and the attacker. Against immobile meks, 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. -
isAimingAtLocation
public boolean isAimingAtLocation()- Returns:
- if a hit location currently selected.
-
allowAimedShotWith
should aimned shoots be allowed with the passed weapon- Parameters:
weapon
-- Returns:
-
actionPerformed
ActionListener, listens to the button in the dialog.- Specified by:
actionPerformed
in interfaceActionListener
-
itemStateChanged
ItemListener, listens to the radiobuttons in the dialog.- Specified by:
itemStateChanged
in interfaceItemListener
-