megamek.common.event
Class GameEvent

java.lang.Object
  extended by java.util.EventObject
      extended by megamek.common.event.GameEvent
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
GameBoardChangeEvent, GameBoardNewEvent, GameEndEvent, GameEntityEvent, GameEntityNewEvent, GameEntityNewOffboardEvent, GameMapQueryEvent, GameNewActionEvent, GamePhaseChangeEvent, GamePlayerEvent, GameReportEvent, GameSettingsChangeEvent

public abstract class GameEvent
extends java.util.EventObject

Instances of descendant classes are sent as a result of Game change

See Also:
GameListener, Serialized Form

Field Summary
static int GAME_BOARD_CHANGE
           
static int GAME_BOARD_NEW
           
static int GAME_END
           
static int GAME_ENTITY_CHANGE
           
static int GAME_ENTITY_NEW
           
static int GAME_ENTITY_NEW_OFFBOARD
           
static int GAME_ENTITY_REMOVE
           
static int GAME_MAP_QUERY
           
static int GAME_NEW_ACTION
           
static int GAME_PHASE_CHANGE
           
static int GAME_PLAYER_CHANGE
           
static int GAME_PLAYER_CHAT
           
static int GAME_PLAYER_CONNECTED
           
static int GAME_PLAYER_DISCONNECTED
           
static int GAME_REPORT
           
static int GAME_SETTINGS_CHANGE
           
static int GAME_TURN_CHANGE
           
protected  int type
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
GameEvent(java.lang.Object source, int type)
          Construct game event
 
Method Summary
 int getType()
           
 java.lang.String toString()
           
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GAME_PLAYER_CONNECTED

public static final int GAME_PLAYER_CONNECTED
See Also:
Constant Field Values

GAME_PLAYER_DISCONNECTED

public static final int GAME_PLAYER_DISCONNECTED
See Also:
Constant Field Values

GAME_PLAYER_CHANGE

public static final int GAME_PLAYER_CHANGE
See Also:
Constant Field Values

GAME_PLAYER_CHAT

public static final int GAME_PLAYER_CHAT
See Also:
Constant Field Values

GAME_PHASE_CHANGE

public static final int GAME_PHASE_CHANGE
See Also:
Constant Field Values

GAME_TURN_CHANGE

public static final int GAME_TURN_CHANGE
See Also:
Constant Field Values

GAME_REPORT

public static final int GAME_REPORT
See Also:
Constant Field Values

GAME_END

public static final int GAME_END
See Also:
Constant Field Values

GAME_BOARD_NEW

public static final int GAME_BOARD_NEW
See Also:
Constant Field Values

GAME_BOARD_CHANGE

public static final int GAME_BOARD_CHANGE
See Also:
Constant Field Values

GAME_SETTINGS_CHANGE

public static final int GAME_SETTINGS_CHANGE
See Also:
Constant Field Values

GAME_MAP_QUERY

public static final int GAME_MAP_QUERY
See Also:
Constant Field Values

GAME_ENTITY_NEW

public static final int GAME_ENTITY_NEW
See Also:
Constant Field Values

GAME_ENTITY_REMOVE

public static final int GAME_ENTITY_REMOVE
See Also:
Constant Field Values

GAME_ENTITY_NEW_OFFBOARD

public static final int GAME_ENTITY_NEW_OFFBOARD
See Also:
Constant Field Values

GAME_ENTITY_CHANGE

public static final int GAME_ENTITY_CHANGE
See Also:
Constant Field Values

GAME_NEW_ACTION

public static final int GAME_NEW_ACTION
See Also:
Constant Field Values

type

protected int type
Constructor Detail

GameEvent

public GameEvent(java.lang.Object source,
                 int type)
Construct game event

Method Detail

getType

public int getType()
Returns:
the type of the event

toString

public java.lang.String toString()
Overrides:
toString in class java.util.EventObject