wyvern.kernel.maps
Class GameObjectEventSupport

java.lang.Object
  extended bywyvern.kernel.maps.GameObjectEventSupport

public class GameObjectEventSupport
extends java.lang.Object

Helper class that a GameObject delegates to for firing event notifications. Manages the listener lists and firing of events.

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

Constructor Summary
GameObjectEventSupport(GameObject obj)
          Constructs a new GameObjectEventSupport
 
Method Summary
 void addContainerChangeListener(ContainerChangeListener l)
           
 void addMapChangeListener(MapChangeListener l)
           
 void addMapMotionListener(MapMotionListener l)
           
 void addMessageListener(MessageListener l)
           
 void destroy()
          Destroys this object, nulling out all the lists and cached events.
 void fireContainerEntered(Bag bag)
           
 void fireContainerExited(Bag bag)
           
 void fireEnteredMap(GameMap map, int x, int y)
           
 void fireExitedMap(GameMap map, int x, int y)
           
 void fireMessageReceived(Commandable receiver, java.lang.String msg, byte style)
           
 void fireMovedInMap(GameMap map, java.util.List src, java.util.List dest)
           
 void removeContainerChangeListener(ContainerChangeListener l)
           
 void removeMapChangeListener(MapChangeListener l)
           
 void removeMapMotionListener(MapMotionListener l)
           
 void removeMessageListener(MessageListener l)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GameObjectEventSupport

public GameObjectEventSupport(GameObject obj)
Constructs a new GameObjectEventSupport

Parameters:
obj - the object we're firing events for
Method Detail

destroy

public void destroy()
Destroys this object, nulling out all the lists and cached events.


addMapChangeListener

public void addMapChangeListener(MapChangeListener l)

removeMapChangeListener

public void removeMapChangeListener(MapChangeListener l)

fireEnteredMap

public void fireEnteredMap(GameMap map,
                           int x,
                           int y)

fireExitedMap

public void fireExitedMap(GameMap map,
                          int x,
                          int y)

addMapMotionListener

public void addMapMotionListener(MapMotionListener l)

removeMapMotionListener

public void removeMapMotionListener(MapMotionListener l)

fireMovedInMap

public void fireMovedInMap(GameMap map,
                           java.util.List src,
                           java.util.List dest)

addContainerChangeListener

public void addContainerChangeListener(ContainerChangeListener l)

removeContainerChangeListener

public void removeContainerChangeListener(ContainerChangeListener l)

fireContainerEntered

public void fireContainerEntered(Bag bag)

fireContainerExited

public void fireContainerExited(Bag bag)

addMessageListener

public void addMessageListener(MessageListener l)

removeMessageListener

public void removeMessageListener(MessageListener l)

fireMessageReceived

public void fireMessageReceived(Commandable receiver,
                                java.lang.String msg,
                                byte style)