|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--net.rim.device.api.collection.util.CollectionListenerManager
Class that can manage a list of CollectionListener objects that
register to receive collection events.
| Constructor Summary | ||
CollectionListenerManager()
Constructs a new CollectionListManager instance. |
||
| Method Summary | ||
void |
addCollectionListener(Object listener)
Registers a new collection listener. |
|
void |
clearOut()
Flush this manager's listener list. |
|
void |
fireElementAdded(Collection collection,
Object element)
Sends add event to the list of listeners. |
|
void |
fireElementRemoved(Collection collection,
Object element)
Sends remove event to the list of listeners. |
|
void |
fireElementUpdated(Collection collection,
Object oldElement,
Object newElement)
Sends update event to the list of listeners. |
|
void |
fireReset(Collection collection)
Sends reset event to the list of listeners. |
|
void |
fireReset(Collection collection,
Object context)
Sends reset event to the list of listeners. |
|
void |
forEachListener(Collection collection,
CollectionListenerAction action)
Performs a callback for each registered listener. |
|
boolean |
isEmpty()
Determines if this manager's listener list is empty. |
|
void |
removeCollectionListener(Object listener)
Unregisters a collection listener. |
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public CollectionListenerManager()
| Method Detail |
public void addCollectionListener(Object listener)
listener - Collection event listener to add to this manager's list.public void clearOut()
Invoke this method to remove all the current listeners registered with this manager.
public void fireElementAdded(Collection collection, Object element)
When this manager's associated collection adds a new element, it can send an add message to its listeners managed by this manager.
collection - Changed collection.element - Element added.public void fireElementRemoved(Collection collection, Object element)
When this manager's associated collection removes an element, it can send a remove message to its listeners managed by this manager.
collection - Changed collection.element - Element removed.public void fireElementUpdated(Collection collection, Object oldElement, Object newElement)
When this manager's associated collection updates an element, it can send an update message to its listeners managed by this manager.
collection - Changed collection.oldElement - Element that was replaced.newElement - New element that replaced the old element.public void fireReset(Collection collection)
When this manager's associated collection drastically changes, it can send a reset message to its listeners managed by this manager. The listening collections should reset their collections (erase their contents and reload from the notifying source).
collection - Changed collection.public void fireReset(Collection collection, Object context)
When this manager's associated collection drastically changes, it can send a reset message to its listeners managed by this manager. The listening collections should reset their collections (erase their contents and reload from the notifying source).
collection - Changed collection.context - Context object for reset.public void forEachListener(Collection collection, CollectionListenerAction action)
Invoke this method to prompt this manager's associated collection to perform an action for each registered listener.
collection - Collection to perform the action.action - Action to perform.public boolean isEmpty()
public void removeCollectionListener(Object listener)
listener - Collection event listener to remove from this manager's
list.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2009 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.