net.vee.btech.saikoro.event
Class GameManagerEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--net.vee.btech.saikoro.event.GameManagerEvent
All Implemented Interfaces:
java.io.Serializable

public class GameManagerEvent
extends java.util.EventObject

GameManager events generated by the GameManager for common management occurances.

See Also:
Serialized Form

Field Summary
static int CLOSE
           
static int CREATE
           
static int LOAD
           
static int SAVE
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
GameManagerEvent(GameManager aSrc, int aType)
          Constructs a new GameMangerEvent.
GameManagerEvent(GameManager aSrc, int aType, Game aPreviousGame)
          Constructs a new GameMangerEvent.
 
Method Summary
 int getEventType()
          Returns the event type.
 Game getPreviousGame()
          Returns the previous game in a relaced game event.
 GameManager getSourceManager()
          A convenience method which returns the event's originating manager.
 
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

SAVE

public static final int SAVE

LOAD

public static final int LOAD

CREATE

public static final int CREATE

CLOSE

public static final int CLOSE
Constructor Detail

GameManagerEvent

public GameManagerEvent(GameManager aSrc,
                        int aType)
Constructs a new GameMangerEvent.
Parameters:
aSrc - the GameManager at which the event originated.
aType - the type of event.

GameManagerEvent

public GameManagerEvent(GameManager aSrc,
                        int aType,
                        Game aPreviousGame)
Constructs a new GameMangerEvent.
Parameters:
aSrc - the GameManager at which the event originated.
aType - the type of event.
aPrevousGame - the previous game in a relaced game event. May be null.
Method Detail

getSourceManager

public GameManager getSourceManager()
A convenience method which returns the event's originating manager.
Returns:
the event's originating manager, the same object as getSource().

getEventType

public int getEventType()
Returns the event type.

getPreviousGame

public Game getPreviousGame()
Returns the previous game in a relaced game event. This may be null.