Package org.apache.batik.dom.events
Class EventListenerList
- java.lang.Object
-
- org.apache.batik.dom.events.EventListenerList
-
public class EventListenerList extends java.lang.ObjectClass to manager event listeners for one event type.- Version:
- $Id: EventListenerList.java 1831635 2018-05-15 13:33:47Z ssteiner $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEventListenerList.EntryEventListenerTable entry class.
-
Field Summary
Fields Modifier and Type Field Description protected IntTablecountsCounts of listener entries with a given namespace URI.protected EventListenerList.EntryheadLinked list of entries.protected EventListenerList.Entry[]listenersCache of listeners with any namespace URI.protected java.util.HashMaplistenersNSCaches of listeners with a given namespace URI.protected intnTotal number of event listners.
-
Constructor Summary
Constructors Constructor Description EventListenerList()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddListener(java.lang.String namespaceURI, java.lang.Object group, org.w3c.dom.events.EventListener listener)Adds a listener.EventListenerList.Entry[]getEventListeners()Returns an array containing all event listener entries.EventListenerList.Entry[]getEventListeners(java.lang.String namespaceURI)Returns an array of EventListeners that match the given namespace URI.booleanhasEventListener(java.lang.String namespaceURI)Returns whether there is an event listener for the given namespace URI.voidremoveListener(java.lang.String namespaceURI, org.w3c.dom.events.EventListener listener)Removes a listener.intsize()Returns the number of event listeners stored in this object.
-
-
-
Field Detail
-
n
protected int n
Total number of event listners.
-
head
protected EventListenerList.Entry head
Linked list of entries.
-
counts
protected IntTable counts
Counts of listener entries with a given namespace URI.
-
listeners
protected EventListenerList.Entry[] listeners
Cache of listeners with any namespace URI.
-
listenersNS
protected java.util.HashMap listenersNS
Caches of listeners with a given namespace URI.
-
-
Method Detail
-
addListener
public void addListener(java.lang.String namespaceURI, java.lang.Object group, org.w3c.dom.events.EventListener listener)Adds a listener.
-
removeListener
public void removeListener(java.lang.String namespaceURI, org.w3c.dom.events.EventListener listener)Removes a listener.
-
getEventListeners
public EventListenerList.Entry[] getEventListeners()
Returns an array containing all event listener entries.
-
getEventListeners
public EventListenerList.Entry[] getEventListeners(java.lang.String namespaceURI)
Returns an array of EventListeners that match the given namespace URI.
-
hasEventListener
public boolean hasEventListener(java.lang.String namespaceURI)
Returns whether there is an event listener for the given namespace URI.
-
size
public int size()
Returns the number of event listeners stored in this object.
-
-