|
org.netbeans.modules.editor.util/1 1.26 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.lib.editor.util.ListenerList<T>
public final class ListenerList<T extends EventListener>
Listener list storing listeners of a single type.
| Constructor Summary | |
|---|---|
ListenerList()
|
|
| Method Summary | |
|---|---|
void |
add(T listener)
Adds the given listener to this listener list. |
int |
getListenerCount()
Returns the total number of listeners for this listener list. |
List<T> |
getListeners()
Returns a list of listeners. |
void |
remove(T listener)
Removes the given listener from this listener list. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ListenerList()
| Method Detail |
|---|
public List<T> getListeners()
The listeners are returned in exactly the same order as they were added to this list. Use the following code for firing events to all the listeners you get from this method.
List listeners = listenerList.getListeners();
for (MyListener l : listeners) {
l.notify(evt);
}
public int getListenerCount()
public void add(T listener)
listener - the listener to be added. If null is passed it is ignored (nothing gets added).public void remove(T listener)
listener - the listener to be removed. If null is passed it is ignored (nothing gets removed).public String toString()
toString in class Object
|
org.netbeans.modules.editor.util/1 1.26 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||