megamek.client.event
Class MechDisplayEvent
java.lang.Object
java.util.EventObject
megamek.client.event.MechDisplayEvent
- All Implemented Interfaces:
- java.io.Serializable
public class MechDisplayEvent
- extends java.util.EventObject
Instances of this class are sent as a result of changes in MechDisplay
- See Also:
MechDisplayListener,
Serialized Form
| Fields inherited from class java.util.EventObject |
source |
| Methods inherited from class java.util.EventObject |
getSource, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
WEAPON_SELECTED
public static final int WEAPON_SELECTED
- See Also:
- Constant Field Values
MechDisplayEvent
public MechDisplayEvent(java.lang.Object source,
Entity entity,
Mounted weapon)
MechDisplayEvent
public MechDisplayEvent(java.lang.Object source,
int type)
getType
public int getType()
- Returns the type of event that this is
getEntityId
public int getEntityId()
- Returns:
- the entity ID associated with this event, if applicable; -1
otherwise.
getWeaponId
public int getWeaponId()
- Returns:
- the weapon ID associated with this event, if applicable; -1
otherwise.
getEntity
public Entity getEntity()
- Returns:
- the entity associated with event, or null
getEquip
public Mounted getEquip()
- Returns:
- the equipment associated with the event or null