wyvern.lib.event
Class ContainerChangeAdapter

java.lang.Object
  extended bywyvern.lib.event.ContainerChangeAdapter
All Implemented Interfaces:
ContainerChangeListener, java.util.EventListener

public class ContainerChangeAdapter
extends java.lang.Object
implements ContainerChangeListener

An abstract adapter class for receiving container-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 ContainerChangeEvent listener, and override the methods for the events of interest. (If you implement the ContainerChangeListener 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 an object using the object's addContainerChangeListener method. When the object is added to, or removed from, a bag or inventory, the relevant method in the listener object is invoked, and the ContainerChangeEvent is passed to it.

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

Constructor Summary
ContainerChangeAdapter()
           
 
Method Summary
 void targetEnteredContainer(ContainerChangeEvent event)
          Target object was added to a bag or inventory.
 void targetLeftContainer(ContainerChangeEvent event)
          Target object was removed from a bag or inventory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContainerChangeAdapter

public ContainerChangeAdapter()
Method Detail

targetEnteredContainer

public void targetEnteredContainer(ContainerChangeEvent event)
Target object was added to a bag or inventory.

Specified by:
targetEnteredContainer in interface ContainerChangeListener

targetLeftContainer

public void targetLeftContainer(ContainerChangeEvent event)
Target object was removed from a bag or inventory.

Specified by:
targetLeftContainer in interface ContainerChangeListener