* not trigger an <code>EventListener</code> designated to use
* capture.
*/
public void addEventListener(String type, EventListener listener,
boolean useCapture) {
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);
}
if (!list.contains(listener)) {
list.add(listener);
}
}