|
SalesPoint Framework v3.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object data.events.StockChangeAdapter
An abstract adapter class for receiving stock change events. The methods in this class are empty. This class exists as convenience for creating listener objects.
Extend this class to create a StockChangeEvent listener and override the methods for the events of interest. (If you implement the StockChangeListener 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 ListenableStock using
the Stock's ListenableStock.addStockChangeListener(data.events.StockChangeListener)
method. When the Stock's contents
change, the relevant method in the listener object is invoked, and a StockChangeEvent
is passed
to it.
Constructor Summary | |
StockChangeAdapter()
|
Method Summary | |
void |
addedStockItems(StockChangeEvent e)
Called whenever StockItems were added to the Stock. |
void |
canEditStockItems(StockChangeEvent e)
Called to ask whether certain StockItems may be edited. |
void |
canRemoveStockItems(StockChangeEvent e)
Called to ask whether certain StockItems may be removed. |
void |
commitAddStockItems(StockChangeEvent e)
Called whenever the adding of StockItems was commited. |
void |
commitEditStockItems(StockChangeEvent e)
Called whenever the editing of StockItems was commited. |
void |
commitRemoveStockItems(StockChangeEvent e)
Called whenever the removal of StockItems was commited. |
void |
editingStockItems(StockChangeEvent e)
Called whenever the Stock began editing StockItems. |
void |
noEditStockItems(StockChangeEvent e)
Called for each listener that already agreed with an editing that was then rejected by another listener. |
void |
noRemoveStockItems(StockChangeEvent e)
Called for each listener that already agreed with a removal that was then rejected by another listener. |
void |
removedStockItems(StockChangeEvent e)
Called whenever StockItems were removed from the Stock. |
void |
rollbackAddStockItems(StockChangeEvent e)
Called whenever the adding of StockItems was rolled back. |
void |
rollbackEditStockItems(StockChangeEvent e)
Called whenever the editing of StockItems was rolled back. |
void |
rollbackRemoveStockItems(StockChangeEvent e)
Called whenever the removal of StockItems was rolled back. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StockChangeAdapter()
Method Detail |
public void addedStockItems(StockChangeEvent e)
addedStockItems
in interface StockChangeListener
e
- an event object describing the event.public void commitAddStockItems(StockChangeEvent e)
commitAddStockItems
in interface StockChangeListener
e
- an event object describing the event.public void rollbackAddStockItems(StockChangeEvent e)
rollbackAddStockItems
in interface StockChangeListener
e
- an event object describing the event.public void canRemoveStockItems(StockChangeEvent e) throws VetoException
noRemoveStockItems
event.
canRemoveStockItems
in interface StockChangeListener
e
- an event object describing the event.
VetoException
- if the listener wants to veto the removal.public void noRemoveStockItems(StockChangeEvent e)
noRemoveStockItems
in interface StockChangeListener
e
- an event object describing the event.public void removedStockItems(StockChangeEvent e)
removedStockItems
in interface StockChangeListener
e
- an event object describing the event.public void commitRemoveStockItems(StockChangeEvent e)
commitRemoveStockItems
in interface StockChangeListener
e
- an event object describing the event.public void rollbackRemoveStockItems(StockChangeEvent e)
rollbackRemoveStockItems
in interface StockChangeListener
e
- an event object describing the event.public void canEditStockItems(StockChangeEvent e) throws VetoException
noEditStockItems
event.
canEditStockItems
in interface StockChangeListener
e
- an event object describing the event.
VetoException
- if the listener wants to veto the editing.public void noEditStockItems(StockChangeEvent e)
noEditStockItems
in interface StockChangeListener
e
- an event object describing the event.public void editingStockItems(StockChangeEvent e)
removedStockItems
and a addedStockItems
event, but this is implementation
specific.
editingStockItems
in interface StockChangeListener
e
- an event object describing the event.public void commitEditStockItems(StockChangeEvent e)
commitEditStockItems
in interface StockChangeListener
e
- an event object describing the event.public void rollbackEditStockItems(StockChangeEvent e)
rollbackEditStockItems
in interface StockChangeListener
e
- an event object describing the event.
|
SalesPoint Framework v3.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |