Package org.apache.batik.dom.events
Class EventListenerList
- java.lang.Object
-
- org.apache.batik.dom.events.EventListenerList
-
public class EventListenerList extends java.lang.Object
Class to manager event listeners for one event type.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
EventListenerList.Entry
EventListenerTable entry class.
-
Field Summary
Fields Modifier and Type Field Description protected IntTable
counts
Counts of listener entries with a given namespace URI.protected EventListenerList.Entry
head
Linked list of entries.protected EventListenerList.Entry[]
listeners
Cache of listeners with any namespace URI.protected java.util.HashMap
listenersNS
Caches of listeners with a given namespace URI.protected int
n
Total number of event listners.
-
Constructor Summary
Constructors Constructor Description EventListenerList()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListener(java.lang.String namespaceURI, java.lang.Object group, 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.boolean
hasEventListener(java.lang.String namespaceURI)
Returns whether there is an event listener for the given namespace URI.void
removeListener(java.lang.String namespaceURI, EventListener listener)
Removes a listener.int
size()
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, EventListener listener)
Adds a listener.
-
removeListener
public void removeListener(java.lang.String namespaceURI, 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.
-
-