wyvern.lib.event
Class ContainerChangeEvent

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

public class ContainerChangeEvent
extends java.util.EventObject

Event fired when an object being tracked by a ContainerChangeListener is added to, or removed from, a Container.

Version:
1.0, Oct 28, 2003
Author:
Steve Yegge
See Also:
Serialized Form

Nested Class Summary
static class ContainerChangeEvent.EventType
           
 
Field Summary
static ContainerChangeEvent.EventType ADD
           
static ContainerChangeEvent.EventType REMOVE
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ContainerChangeEvent(GameObject obj, Bag source, ContainerChangeEvent.EventType type)
          Constructs a new ContainerChangeEvent
 
Method Summary
 Bag getContainer()
          Returns the Container the object was added to, or removed from.
 ContainerChangeEvent.EventType getEventType()
          Returns ADD or REMOVE
 GameObject getTarget()
          Returns the GameObject that entered or left the container.
 java.lang.String toString()
          Returns descriptive 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

ADD

public static final ContainerChangeEvent.EventType ADD

REMOVE

public static final ContainerChangeEvent.EventType REMOVE
Constructor Detail

ContainerChangeEvent

public ContainerChangeEvent(GameObject obj,
                            Bag source,
                            ContainerChangeEvent.EventType type)
Constructs a new ContainerChangeEvent

Parameters:
obj - the object that moved into or out of a Container
source - the container entered or exited
type - ADD or REMOVE
Method Detail

getTarget

public GameObject getTarget()
Returns the GameObject that entered or left the container.


getContainer

public Bag getContainer()
Returns the Container the object was added to, or removed from.


getEventType

public ContainerChangeEvent.EventType getEventType()
Returns ADD or REMOVE


toString

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