megamek.client.event
Class MechDisplayEvent

java.lang.Object
  extended by java.util.EventObject
      extended by 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

Field Summary
static int WEAPON_SELECTED
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
MechDisplayEvent(java.lang.Object source, Entity entity, Mounted weapon)
           
MechDisplayEvent(java.lang.Object source, int type)
           
 
Method Summary
 Entity getEntity()
           
 int getEntityId()
           
 Mounted getEquip()
           
 int getType()
          Returns the type of event that this is
 int getWeaponId()
           
 
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
 

Field Detail

WEAPON_SELECTED

public static final int WEAPON_SELECTED
See Also:
Constant Field Values
Constructor Detail

MechDisplayEvent

public MechDisplayEvent(java.lang.Object source,
                        Entity entity,
                        Mounted weapon)

MechDisplayEvent

public MechDisplayEvent(java.lang.Object source,
                        int type)
Method Detail

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