Class AbstractConcurrentModel
java.lang.Object
org.eclipse.jface.viewers.deferred.AbstractConcurrentModel
- All Implemented Interfaces:
IConcurrentModel
- Direct Known Subclasses:
SetModel
Abstract base class for all IConcurrentModel implementations. Clients should
subclass this class instead of implementing IConcurrentModel directly.
- Since:
- 3.1
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(IConcurrentModelListener listener) Adds a listener to this model.protected final void
Fires an add notification to all listenersprotected final void
fireRemove
(Object[] removed) Fires a remove notification to all listenersprotected final void
fireUpdate
(Object[] updated) Fires an update notification to all listenersprotected final IConcurrentModelListener[]
Returns the array of listeners for this modelvoid
removeListener
(IConcurrentModelListener listener) Removes a listener from this model.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.jface.viewers.deferred.IConcurrentModel
requestUpdate
-
Constructor Details
-
AbstractConcurrentModel
public AbstractConcurrentModel()
-
-
Method Details
-
addListener
Description copied from interface:IConcurrentModel
Adds a listener to this model. The listener should be given the model's current contents (either through setContents or a sequence of adds) at the receiver's earliest convenience. The receiver will notify the listener about any changes in state until the listener is removed.Has no effect if an identical listener is already registered.
- Specified by:
addListener
in interfaceIConcurrentModel
- Parameters:
listener
- listener to add
-
fireAdd
Fires an add notification to all listeners- Parameters:
added
- objects added to the set
-
fireRemove
Fires a remove notification to all listeners- Parameters:
removed
- objects removed from the set
-
fireUpdate
Fires an update notification to all listeners- Parameters:
updated
- objects that have changed
-
getListeners
Returns the array of listeners for this model- Returns:
- the array of listeners for this model
-
removeListener
Description copied from interface:IConcurrentModel
Removes a listener from this model. The receiver will stop sending notifications to the given listener as soon as possible (although some additional notifications may still if arrive if the receiver was in the process of sending notifications in another thread). Any pending updates for this listener will be cancelled.Has no effect if the given listener is not known to this model.
- Specified by:
removeListener
in interfaceIConcurrentModel
- Parameters:
listener
- listener to remove
-