wyvern.lib.event
Class MapLifecycleEvent

java.lang.Object
  extended byjava.util.EventObject
      extended bywyvern.lib.event.MapLifecycleEvent
All Implemented Interfaces:
java.io.Serializable

public class MapLifecycleEvent
extends java.util.EventObject

A notification that's delivered on major map events, such as done loading, suspend, resume, and unload.

Version:
1.0, Aug 09, 2003
Author:
Steve Yegge
See Also:
Serialized Form

Nested Class Summary
static class MapLifecycleEvent.EventType
           
 
Field Summary
static MapLifecycleEvent.EventType LOAD
          MapLifecycleEvent type for when map has finished loading (all the objects are added).
static MapLifecycleEvent.EventType RESUME
          MapLifecycleEvent type for when a map has just been resumed.
static MapLifecycleEvent.EventType SUSPEND
          MapLifecycleEvent type for when a map has just been suspended.
static MapLifecycleEvent.EventType UNLOAD
          MapLifecycleEvent type for when map is about to unload and dismantle itself, but before all of its objects have been removed.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
MapLifecycleEvent(GameMap map, MapLifecycleEvent.EventType type)
          Constructs a new MapLifecycleEvent
 
Method Summary
 MapLifecycleEvent.EventType getEventType()
          Returns event type
 GameMap getMap()
          Returns the map for which this event took place.
 java.lang.String toString()
          Returns debugging string.
 
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

LOAD

public static final MapLifecycleEvent.EventType LOAD
MapLifecycleEvent type for when map has finished loading (all the objects are added). Called from map's doneLoading() method.


UNLOAD

public static final MapLifecycleEvent.EventType UNLOAD
MapLifecycleEvent type for when map is about to unload and dismantle itself, but before all of its objects have been removed.


SUSPEND

public static final MapLifecycleEvent.EventType SUSPEND
MapLifecycleEvent type for when a map has just been suspended.


RESUME

public static final MapLifecycleEvent.EventType RESUME
MapLifecycleEvent type for when a map has just been resumed.

Constructor Detail

MapLifecycleEvent

public MapLifecycleEvent(GameMap map,
                         MapLifecycleEvent.EventType type)
Constructs a new MapLifecycleEvent

Method Detail

getEventType

public MapLifecycleEvent.EventType getEventType()
Returns event type

Returns:
event type

getMap

public GameMap getMap()
Returns the map for which this event took place.


toString

public java.lang.String toString()
Returns debugging string.