|
SalesPoint v3.3 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object data.events.CatalogChangeAdapter<T>
public abstract class CatalogChangeAdapter<T extends CatalogItem>
An abstract adapter class for receiving catalog change events. The methods in this class are empty. This class exists as convenience for creating listener objects.
Extend this class to create a CatalogChangeEvent listener and override the methods for the events of interest. (If you implement the CatalogChangeListener 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 ListenableCatalog using
the Catalog's ListenableCatalog.addCatalogChangeListener(data.events.CatalogChangeListener)
method. When the Catalog's contents
change, the relevant method in the listener object is invoked, and a CatalogChangeEvent
is passed
to it.
Constructor Summary | |
---|---|
CatalogChangeAdapter()
|
Method Summary | |
---|---|
void |
addedCatalogItem(CatalogChangeEvent<T> e)
Called whenever a CatalogItem was added to the Catalog. |
void |
canEditCatalogItem(CatalogChangeEvent<T> e)
Called to ask whether a CatalogItem may be edited. |
void |
canRemoveCatalogItem(CatalogChangeEvent<T> e)
Called to ask whether a CatalogItem may be removed. |
void |
commitedAddCatalogItem(CatalogChangeEvent<T> e)
Called whenever the adding of a CatalogItem was commited. |
void |
commitEditCatalogItem(CatalogChangeEvent<T> e)
Called whenever editing a CatalogItem was commited. |
void |
commitedRemoveCatalogItem(CatalogChangeEvent<T> e)
Called whenever the removal of a CatalogItem was commited. |
void |
editingCatalogItem(CatalogChangeEvent<T> e)
Called whenever editing a CatalogItem was started. |
void |
noEditCatalogItem(CatalogChangeEvent<T> e)
Called for each listener that already agreed with an editing that was then rejected by another listener. |
void |
noRemoveCatalogItem(CatalogChangeEvent<T> e)
Called for each listener that already agreed with a removal that was then rejected by another listener. |
void |
removedCatalogItem(CatalogChangeEvent<T> e)
Called whenever a CatalogItem was removed from the Catalog. |
void |
rollbackEditCatalogItem(CatalogChangeEvent<T> e)
Called whenever editing a CatalogItem was rolled back. |
void |
rolledbackAddCatalogItem(CatalogChangeEvent<T> e)
Called whenever the adding of a CatalogItem was rolled back. |
void |
rolledbackRemoveCatalogItem(CatalogChangeEvent<T> e)
Called whenever the removal of a CatalogItem was rolled back. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CatalogChangeAdapter()
Method Detail |
---|
public void addedCatalogItem(CatalogChangeEvent<T> e)
addedCatalogItem
in interface CatalogChangeListener<T extends CatalogItem>
e
- an event object describing the event.public void commitedAddCatalogItem(CatalogChangeEvent<T> e)
commitedAddCatalogItem
in interface CatalogChangeListener<T extends CatalogItem>
e
- an event object describing the event.public void rolledbackAddCatalogItem(CatalogChangeEvent<T> e)
rolledbackAddCatalogItem
in interface CatalogChangeListener<T extends CatalogItem>
e
- an event object describing the event.public void canRemoveCatalogItem(CatalogChangeEvent<T> e) throws VetoException
noRemoveCatalogItem
event.
canRemoveCatalogItem
in interface CatalogChangeListener<T extends CatalogItem>
e
- an event object describing the event.
VetoException
- if the listener wants to veto the removal.public void noRemoveCatalogItem(CatalogChangeEvent<T> e)
noRemoveCatalogItem
in interface CatalogChangeListener<T extends CatalogItem>
e
- an event object describing the event.public void removedCatalogItem(CatalogChangeEvent<T> e)
removedCatalogItem
in interface CatalogChangeListener<T extends CatalogItem>
e
- an event object describing the event.public void commitedRemoveCatalogItem(CatalogChangeEvent<T> e)
commitedRemoveCatalogItem
in interface CatalogChangeListener<T extends CatalogItem>
e
- an event object describing the event.public void rolledbackRemoveCatalogItem(CatalogChangeEvent<T> e)
rolledbackRemoveCatalogItem
in interface CatalogChangeListener<T extends CatalogItem>
e
- an event object describing the event.public void canEditCatalogItem(CatalogChangeEvent<T> e) throws VetoException
noEditCatalogItem
event.
canEditCatalogItem
in interface CatalogChangeListener<T extends CatalogItem>
e
- an event object describing the event.
VetoException
- if the listener wants to veto the editing.public void noEditCatalogItem(CatalogChangeEvent<T> e)
noEditCatalogItem
in interface CatalogChangeListener<T extends CatalogItem>
e
- an event object describing the event.public void editingCatalogItem(CatalogChangeEvent<T> e)
removedCatalogItem
and a addedCatalogItem
event, but this is implementation
specific.
editingCatalogItem
in interface CatalogChangeListener<T extends CatalogItem>
e
- an event object describing the event.public void commitEditCatalogItem(CatalogChangeEvent<T> e)
commitEditCatalogItem
in interface CatalogChangeListener<T extends CatalogItem>
e
- an event object describing the event.public void rollbackEditCatalogItem(CatalogChangeEvent<T> e)
rollbackEditCatalogItem
in interface CatalogChangeListener<T extends CatalogItem>
e
- an event object describing the event.
|
SalesPoint v3.3 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |