SalesPoint Framework v3.1

data.events
Class DataBasketAdapter

java.lang.Object
  extended bydata.events.DataBasketAdapter
All Implemented Interfaces:
DataBasketListener, EventListener

public abstract class DataBasketAdapter
extends Object
implements DataBasketListener

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

Extend this class to create a DataBasketEvent listener and override the methods for the events of interest. (If you implement the DataBasketListener interface, you have to define all of the methods in it. This abstract class defines empty method bodies for them all, so you can concentrate on defining methods only for events you care about.)

Create a listener object using the extended class and then register it with a ListenableDataBasket using the DataBasket's ListenableDataBasket.addDataBasketListener(data.events.DataBasketListener) method. When the DataBasket's contents change, the relevant method in the listener object is invoked, and a DataBasketEvent is passed to it.

Since:
v2.0
Author:
Steffen Zschaler

Constructor Summary
DataBasketAdapter()
           
 
Method Summary
 void addedDBE(DataBasketEvent e)
          Called when a DataBasketEntry was added to the DataBasket.
 void dataBasketChanged(DataBasketEvent e)
          Called when the DataBasket changed in a manner too complex for the two other types of events.
 void removedDBE(DataBasketEvent e)
          Called when a DataBasketEntry was removed from the DataBasket.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataBasketAdapter

public DataBasketAdapter()
Method Detail

addedDBE

public void addedDBE(DataBasketEvent e)
Called when a DataBasketEntry was added to the DataBasket.

Specified by:
addedDBE in interface DataBasketListener
Parameters:
e - an event object that describes the event.
Override:
Sometimes

removedDBE

public void removedDBE(DataBasketEvent e)
Called when a DataBasketEntry was removed from the DataBasket.

Specified by:
removedDBE in interface DataBasketListener
Parameters:
e - an event object that describes the event.
Override:
Sometimes

dataBasketChanged

public void dataBasketChanged(DataBasketEvent e)
Called when the DataBasket changed in a manner too complex for the two other types of events.

Specified by:
dataBasketChanged in interface DataBasketListener
Parameters:
e - an event object that describes the event. (e.getAffectedEntry() == null!)
Override:
Sometimes

SalesPoint Framework v3.1