wyvern.lib.event
Class ContainerChangeEvent
java.lang.Object
java.util.EventObject
wyvern.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
Fields inherited from class java.util.EventObject |
source |
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 |
ADD
public static final ContainerChangeEvent.EventType ADD
REMOVE
public static final ContainerChangeEvent.EventType REMOVE
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 Containersource
- the container entered or exitedtype
- ADD or REMOVE
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.