public abstract class EventManager extends Object
A manager to which listeners can be attached. This handles the management of a list of listeners -- optimizing memory and performance. All the methods on this class are guaranteed to be thread-safe.
Clients may extend.
Warning: Do not use this class! Use ListenerList
directly. See
bug 486067.
Constructor and Description |
---|
EventManager() |
Modifier and Type | Method and Description |
---|---|
protected void |
addListenerObject(Object listener)
Adds a listener to this manager that will be notified when this manager's
state changes.
|
protected void |
clearListeners()
Clears all of the listeners from the listener list.
|
protected Object[] |
getListeners()
Returns an array containing all the listeners attached to this event
manager.
|
protected boolean |
isListenerAttached()
Whether one or more listeners are attached to the manager.
|
protected void |
removeListenerObject(Object listener)
Removes a listener from this manager.
|
protected final void addListenerObject(Object listener)
listener
- The listener to be added; must not be null
.protected final void clearListeners()
protected final Object[] getListeners()
Note: Callers of this method must not modify the returned array.
null
protected final boolean isListenerAttached()
true
if listeners are attached to the manager;
false
otherwise.protected final void removeListenerObject(Object listener)
listener
- The listener to be removed; must not be null
.
Copyright (c) 2000, 2017 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.