Codota Logo
EventListenerList
Code IndexAdd Codota to your IDE (free)

How to use
EventListenerList
in
org.apache.batik.dom.events

Best Java code snippets using org.apache.batik.dom.events.EventListenerList (Showing top 20 results out of 315)

  • Common ways to obtain EventListenerList
private void myMethod () {
EventListenerList e =
  • Codota Iconnew EventListenerList()
  • Codota IconEventSupport eventSupport;String type;eventSupport.getEventListeners(type, useCapture)
  • Smart code suggestions by Codota
}
origin: org.apache.xmlgraphics/batik-anim

/**
 * Registers an event listener that will not be stopped by the usual
 * XBL stopping.
 */
public void addImplementationEventListenerNS(String namespaceURI,
                       String type,
                       EventListener listener,
                       boolean useCapture) {
  HashMap<String, EventListenerList> listeners;
  if (useCapture) {
    if (capturingImplementationListeners == null) {
      capturingImplementationListeners = new HashMap<String, EventListenerList>();
    }
    listeners = capturingImplementationListeners;
  } else {
    if (bubblingImplementationListeners == null) {
      bubblingImplementationListeners = new HashMap<String, EventListenerList>();
    }
    listeners = bubblingImplementationListeners;
  }
  EventListenerList list = listeners.get(type);
  if (list == null) {
    list = new EventListenerList();
    listeners.put(type, list);
  }
  list.addListener(namespaceURI, null, listener);
}
origin: apache/batik

/**
 * Returns an array of EventListeners that match the given namespace URI.
 */
public Entry[] getEventListeners(String namespaceURI) {
  if (namespaceURI == null) {
    return getEventListeners();
  }
  Entry[] ls = (Entry[]) listenersNS.get(namespaceURI);
  if (ls != null) {
    return ls;
  }
  int count = counts.get(namespaceURI);
  if (count == 0) {
    return null;
  }
  ls = new Entry[count];
  listenersNS.put(namespaceURI, ls);
  int i = 0;
  for (Entry e = head; i < count; e = e.next) {
    if (namespaceURI.equals(e.namespaceURI)) {
      ls[i++] = e;
    }
  }
  return ls;
}
origin: org.apache.xmlgraphics/batik-anim

/**
 * Unregisters an implementation event listener.
 */
public void removeImplementationEventListenerNS(String namespaceURI,
                        String type,
                        EventListener listener,
                        boolean useCapture) {
  HashMap<String, EventListenerList> listeners = useCapture
    ? capturingImplementationListeners : bubblingImplementationListeners;
  if (listeners == null) {
    return;
  }
  EventListenerList list = listeners.get(type);
  if (list == null) {
    return;
  }
  list.removeListener(namespaceURI, listener);
  if (list.size() == 0) {
    listeners.remove(type);
  }
}
origin: org.apache.xmlgraphics/batik-dom

/**
 * Returns whether this node target has an event listener for the
 * given event namespace URI and type.
 */
public boolean hasEventListenerNS(String namespaceURI, String type) {
  if (capturingListeners != null) {
    EventListenerList ell = capturingListeners.get(type);
    if (ell != null) {
      if (ell.hasEventListener(namespaceURI)) {
        return true;
      }
    }
  }
  if (bubblingListeners != null) {
    EventListenerList ell = capturingListeners.get(type);
    if (ell != null) {
      return ell.hasEventListener(namespaceURI);
    }
  }
  return false;
}
origin: apache/batik

/**
 * Returns whether this node target has an event listener for the
 * given event namespace URI and type.
 */
public boolean hasEventListenerNS(String namespaceURI, String type) {
  if (capturingListeners != null) {
    EventListenerList ell = capturingListeners.get(type);
    if (ell != null) {
      if (ell.hasEventListener(namespaceURI)) {
        return true;
      }
    }
  }
  if (bubblingListeners != null) {
    EventListenerList ell = capturingListeners.get(type);
    if (ell != null) {
      return ell.hasEventListener(namespaceURI);
    }
  }
  return false;
}
origin: apache/batik

/**
 * Unregisters an implementation event listener.
 */
public void removeImplementationEventListenerNS(String namespaceURI,
                        String type,
                        EventListener listener,
                        boolean useCapture) {
  HashMap<String, EventListenerList> listeners = useCapture
    ? capturingImplementationListeners : bubblingImplementationListeners;
  if (listeners == null) {
    return;
  }
  EventListenerList list = listeners.get(type);
  if (list == null) {
    return;
  }
  list.removeListener(namespaceURI, listener);
  if (list.size() == 0) {
    listeners.remove(type);
  }
}
origin: org.apache.xmlgraphics/batik-dom

/**
 * Registers an event listener for the given namespaced event type
 * in the specified group.
 */
public void addEventListenerNS(String namespaceURI,
                String type,
                EventListener listener,
                boolean useCapture,
                Object group) {
  HashMap<String, EventListenerList> listeners;
  if (useCapture) {
    if (capturingListeners == null) {
      capturingListeners = new HashMap();
    }
    listeners = capturingListeners;
  } else {
    if (bubblingListeners == null) {
      bubblingListeners = new HashMap();
    }
    listeners = bubblingListeners;
  }
  EventListenerList list = listeners.get(type);
  if (list == null) {
    list = new EventListenerList();
    listeners.put(type, list);
  }
  list.addListener(namespaceURI, group, listener);
}
origin: org.apache.xmlgraphics/batik-dom

/**
 * Returns an array of EventListeners that match the given namespace URI.
 */
public Entry[] getEventListeners(String namespaceURI) {
  if (namespaceURI == null) {
    return getEventListeners();
  }
  Entry[] ls = (Entry[]) listenersNS.get(namespaceURI);
  if (ls != null) {
    return ls;
  }
  int count = counts.get(namespaceURI);
  if (count == 0) {
    return null;
  }
  ls = new Entry[count];
  listenersNS.put(namespaceURI, ls);
  int i = 0;
  for (Entry e = head; i < count; e = e.next) {
    if (namespaceURI.equals(e.namespaceURI)) {
      ls[i++] = e;
    }
  }
  return ls;
}
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * Returns whether this node target has an event listener for the
 * given event namespace URI and type.
 */
public boolean hasEventListenerNS(String namespaceURI, String type) {
  if (capturingListeners != null) {
    EventListenerList ell
      = (EventListenerList) capturingListeners.get(type);
    if (ell != null) {
      if (ell.hasEventListener(namespaceURI)) {
        return true;
      }
    }
  }
  if (bubblingListeners != null) {
    EventListenerList ell
      = (EventListenerList) capturingListeners.get(type);
    if (ell != null) {
      return ell.hasEventListener(namespaceURI);
    }
  }
  return false;
}
origin: org.apache.xmlgraphics/batik-dom

/**
 * Deregisters an event listener.
 */
public void removeEventListenerNS(String namespaceURI,
                 String type,
                 EventListener listener,
                 boolean useCapture) {
  HashMap<String, EventListenerList> listeners;
  if (useCapture) {
    listeners = capturingListeners;
  } else {
    listeners = bubblingListeners;
  }
  if (listeners == null) {
    return;
  }
  EventListenerList list = listeners.get(type);
  if (list != null) {
    list.removeListener(namespaceURI, listener);
    if (list.size() == 0) {
      listeners.remove(type);
    }
  }
}
origin: apache/batik

/**
 * Registers an event listener that will not be stopped by the usual
 * XBL stopping.
 */
public void addImplementationEventListenerNS(String namespaceURI,
                       String type,
                       EventListener listener,
                       boolean useCapture) {
  HashMap<String, EventListenerList> listeners;
  if (useCapture) {
    if (capturingImplementationListeners == null) {
      capturingImplementationListeners = new HashMap<String, EventListenerList>();
    }
    listeners = capturingImplementationListeners;
  } else {
    if (bubblingImplementationListeners == null) {
      bubblingImplementationListeners = new HashMap<String, EventListenerList>();
    }
    listeners = bubblingImplementationListeners;
  }
  EventListenerList list = listeners.get(type);
  if (list == null) {
    list = new EventListenerList();
    listeners.put(type, list);
  }
  list.addListener(namespaceURI, null, listener);
}
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * Returns an array of EventListeners that match the given namespace URI.
 */
public Entry[] getEventListeners(String namespaceURI) {
  if (namespaceURI == null) {
    return getEventListeners();
  }
  Entry[] ls = (Entry[]) listenersNS.get(namespaceURI);
  if (ls != null) {
    return ls;
  }
  int count = counts.get(namespaceURI);
  if (count == 0) {
    return null;
  }
  ls = new Entry[count];
  listenersNS.put(namespaceURI, ls);
  int i = 0;
  for (Entry e = head; i < count; e = e.next) {
    if (namespaceURI.equals(e.namespaceURI)) {
      ls[i++] = e;
    }
  }
  return ls;
}
origin: apache/batik

/**
 * Deregisters an event listener.
 */
public void removeEventListenerNS(String namespaceURI,
                 String type,
                 EventListener listener,
                 boolean useCapture) {
  HashMap<String, EventListenerList> listeners;
  if (useCapture) {
    listeners = capturingListeners;
  } else {
    listeners = bubblingListeners;
  }
  if (listeners == null) {
    return;
  }
  EventListenerList list = listeners.get(type);
  if (list != null) {
    list.removeListener(namespaceURI, listener);
    if (list.size() == 0) {
      listeners.remove(type);
    }
  }
}
origin: apache/batik

/**
 * Registers an event listener for the given namespaced event type
 * in the specified group.
 */
public void addEventListenerNS(String namespaceURI,
                String type,
                EventListener listener,
                boolean useCapture,
                Object group) {
  HashMap<String, EventListenerList> listeners;
  if (useCapture) {
    if (capturingListeners == null) {
      capturingListeners = new HashMap();
    }
    listeners = capturingListeners;
  } else {
    if (bubblingListeners == null) {
      bubblingListeners = new HashMap();
    }
    listeners = bubblingListeners;
  }
  EventListenerList list = listeners.get(type);
  if (list == null) {
    list = new EventListenerList();
    listeners.put(type, list);
  }
  list.addListener(namespaceURI, group, listener);
}
origin: org.apache.xmlgraphics/batik-anim

EventListenerList.Entry[] listeners = list.getEventListeners();
fireEventListeners(node, e, listeners, stoppedGroups,
          toBeStoppedGroups);
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * Unregisters an implementation event listener.
 */
public void removeImplementationEventListenerNS(String namespaceURI,
                        String type,
                        EventListener listener,
                        boolean useCapture) {
  HashTable listeners = useCapture ? capturingImplementationListeners
                   : bubblingImplementationListeners;
  if (listeners == null) {
    return;
  }
  EventListenerList list = (EventListenerList) listeners.get(type);
  if (list == null) {
    return;
  }
  list.removeListener(namespaceURI, listener);
  if (list.size() == 0) {
    listeners.remove(type);
  }
}
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * Registers an event listener for the given namespaced event type
 * in the specified group.
 */
public void addEventListenerNS(String namespaceURI,
                String type,
                EventListener listener,
                boolean useCapture,
                Object group) {
  HashTable listeners;
  if (useCapture) {
    if (capturingListeners == null) {
      capturingListeners = new HashTable();
    }
    listeners = capturingListeners;
  } else {
    if (bubblingListeners == null) {
      bubblingListeners = new HashTable();
    }
    listeners = bubblingListeners;
  }
  EventListenerList list = (EventListenerList) listeners.get(type);
  if (list == null) {
    list = new EventListenerList();
    listeners.put(type, list);
  }
  list.addListener(namespaceURI, group, listener);
}
origin: fr.avianey.apache-xmlgraphics/batik

EventListenerList.Entry[] listeners = list.getEventListeners();
fireEventListeners(node, e, listeners, stoppedGroups,
          toBeStoppedGroups);
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * Deregisters an event listener.
 */
public void removeEventListenerNS(String namespaceURI,
                 String type,
                 EventListener listener,
                 boolean useCapture) {
  HashTable listeners;
  if (useCapture) {
    listeners = capturingListeners;
  } else {
    listeners = bubblingListeners;
  }
  if (listeners == null) {
    return;
  }
  EventListenerList list = (EventListenerList) listeners.get(type);
  if (list != null) {
    list.removeListener(namespaceURI, listener);
    if (list.size() == 0) {
      listeners.remove(type);
    }
  }
}
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * Registers an event listener that will not be stopped by the usual
 * XBL stopping.
 */
public void addImplementationEventListenerNS(String namespaceURI,
                       String type,
                       EventListener listener,
                       boolean useCapture) {
  HashTable listeners;
  if (useCapture) {
    if (capturingImplementationListeners == null) {
      capturingImplementationListeners = new HashTable();
    }
    listeners = capturingImplementationListeners;
  } else {
    if (bubblingImplementationListeners == null) {
      bubblingImplementationListeners = new HashTable();
    }
    listeners = bubblingImplementationListeners;
  }
  EventListenerList list = (EventListenerList) listeners.get(type);
  if (list == null) {
    list = new EventListenerList();
    listeners.put(type, list);
  }
  list.addListener(namespaceURI, null, listener);
}
org.apache.batik.dom.eventsEventListenerList

Javadoc

Class to manager event listeners for one event type.

Most used methods

  • <init>
  • addListener
    Adds a listener.
  • getEventListeners
    Returns an array of EventListeners that match the given namespace URI.
  • removeListener
    Removes a listener.
  • size
    Returns the number of event listeners stored in this object.
  • hasEventListener
    Returns whether there is an event listener for the given namespace URI.

Popular in Java

  • Reactive rest calls using spring rest template
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • onCreateOptionsMenu (Activity)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • Point (java.awt)
    A point representing a location in (x, y) coordinate space, specified in integer precision.
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now