wyvern.lib.event
Class MapChangeAdapter

java.lang.Object
  extended bywyvern.lib.event.MapChangeAdapter
All Implemented Interfaces:
java.util.EventListener, MapChangeListener

public class MapChangeAdapter
extends java.lang.Object
implements MapChangeListener

An abstract adapter class for receiving map change events. The methods in this class are empty. This class exists as a convenience for creating listener objects.

Extend this class to create a MapChangeEvent listener, and override the methods for the events of interest. (If you implement the MapChangeListener interface, you have to define all of the methods in it. This abstract class defines null methods for them all, so you only have to define methods for events you care about.)

Create a listener object using the extended class and then register it with a map using the map's addMapChangeListener method. When the map is loaded, suspended, resumed, or unloaded, the relevant method in the listener object is invoked, and the MapChangeEvent is passed to it.

Version:
1.0, Oct 28, 2003
Author:
Steve Yegge

Constructor Summary
MapChangeAdapter()
           
 
Method Summary
 void targetEnteredMap(MapChangeEvent event)
          Notification that the target object has entered a map.
 void targetLeftMap(MapChangeEvent event)
          Notification that the target object has left its map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapChangeAdapter

public MapChangeAdapter()
Method Detail

targetEnteredMap

public void targetEnteredMap(MapChangeEvent event)
Description copied from interface: MapChangeListener
Notification that the target object has entered a map. Called at the end of the object's setMap() function.

Specified by:
targetEnteredMap in interface MapChangeListener

targetLeftMap

public void targetLeftMap(MapChangeEvent event)
Description copied from interface: MapChangeListener
Notification that the target object has left its map. Called at the end of the object's remove() function.

Specified by:
targetLeftMap in interface MapChangeListener