/** * Adds a listener. */ public void addListener(String namespaceURI, Object group, EventListener listener) { for (Entry e = head; e != null; e = e.next) { if ((namespaceURI != null && namespaceURI.equals(e.namespaceURI) || namespaceURI == null && e.namespaceURI == null) && e.listener == listener) { // Listener is already in the list, so do nothing. return; } } head = new Entry(listener, namespaceURI, group, head); counts.inc(namespaceURI); n++; listeners = null; listenersNS.remove(namespaceURI); }
for (int i = 0; i < listeners.length; i++) { try { String listenerNS = listeners[i].getNamespaceURI(); if (listenerNS != null && eventNS != null && !listenerNS.equals(eventNS)) { continue; Object group = listeners[i].getGroup(); if (stoppedGroups == null || !stoppedGroups.contains(group)) { listeners[i].getListener().handleEvent(e); if (e.getStopImmediatePropagation()) { if (stoppedGroups != null) {
for (EventListenerList.Entry listener : listeners) { try { String listenerNS = listener.getNamespaceURI(); if (listenerNS != null && eventNS != null && !listenerNS.equals(eventNS)) { continue; Object group = listener.getGroup(); if (stoppedGroups == null || !stoppedGroups.contains(group)) { listener.getListener().handleEvent(e); if (e.getStopImmediatePropagation()) { if (stoppedGroups != null) {
for (EventListenerList.Entry listener : listeners) { try { String listenerNS = listener.getNamespaceURI(); if (listenerNS != null && eventNS != null && !listenerNS.equals(eventNS)) { continue; Object group = listener.getGroup(); if (stoppedGroups == null || !stoppedGroups.contains(group)) { listener.getListener().handleEvent(e); if (e.getStopImmediatePropagation()) { if (stoppedGroups != null) {
/** * Adds a listener. */ public void addListener(String namespaceURI, Object group, EventListener listener) { for (Entry e = head; e != null; e = e.next) { if ((namespaceURI != null && namespaceURI.equals(e.namespaceURI) || namespaceURI == null && e.namespaceURI == null) && e.listener == listener) { // Listener is already in the list, so do nothing. return; } } head = new Entry(listener, namespaceURI, group, head); counts.inc(namespaceURI); n++; listeners = null; listenersNS.remove(namespaceURI); }
/** * Adds a listener. */ public void addListener(String namespaceURI, Object group, EventListener listener) { for (Entry e = head; e != null; e = e.next) { if ((namespaceURI != null && namespaceURI.equals(e.namespaceURI) || namespaceURI == null && e.namespaceURI == null) && e.listener == listener) { // Listener is already in the list, so do nothing. return; } } head = new Entry(listener, namespaceURI, group, head); counts.inc(namespaceURI); n++; listeners = null; listenersNS.remove(namespaceURI); }