diff options
author | Elliott Hughes <enh@google.com> | 2010-02-22 12:09:51 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2010-02-22 12:09:51 -0800 |
commit | e2a6f77f112c01109db196d8b19767896ee977ea (patch) | |
tree | c18066db46425e09a89b679c3b08153d0480d7e7 /dom | |
parent | cb78ba4051c82075119fd3646922a41e6355151b (diff) | |
parent | ea6435b142df4aaaf8854b3200b9f442b331f143 (diff) | |
download | libcore-e2a6f77f112c01109db196d8b19767896ee977ea.zip libcore-e2a6f77f112c01109db196d8b19767896ee977ea.tar.gz libcore-e2a6f77f112c01109db196d8b19767896ee977ea.tar.bz2 |
Merge remote branch 'goog/master' into mm
Conflicts:
libcore/JavaLibrary.mk
Diffstat (limited to 'dom')
-rw-r--r-- | dom/src/test/java/org/w3c/domts/EventMonitor.java | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/dom/src/test/java/org/w3c/domts/EventMonitor.java b/dom/src/test/java/org/w3c/domts/EventMonitor.java deleted file mode 100644 index 909ca4e..0000000 --- a/dom/src/test/java/org/w3c/domts/EventMonitor.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2001-2004 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program is distributed in the - * hope that it will be useful, but WITHOUT ANY WARRANTY; without even - * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. - * See W3C License http://www.w3.org/Consortium/Legal/ for more details. - */ - -package org.w3c.domts; - -import java.util.ArrayList; -import java.util.List; - -import org.w3c.dom.events.Event; -import org.w3c.dom.events.EventListener; - -/** - * This is a utility implementation of EventListener - * that captures all events and provides access - * to lists of all events by mode - */ -public class EventMonitor - implements EventListener { - private final List atEvents = new ArrayList(); - private final List bubbledEvents = new ArrayList(); - private final List capturedEvents = new ArrayList(); - private final List allEvents = new ArrayList(); - - public EventMonitor() { - } - - public void handleEvent(Event evt) { - switch (evt.getEventPhase()) { - case Event.CAPTURING_PHASE: - capturedEvents.add(evt); - break; - - case Event.BUBBLING_PHASE: - bubbledEvents.add(evt); - break; - - case Event.AT_TARGET: - atEvents.add(evt); - break; - } - allEvents.add(evt); - } - - public List getAllEvents() { - return new ArrayList(allEvents); - } - - public List getBubbledEvents() { - return new ArrayList(bubbledEvents); - } - - public List getAtEvents() { - return new ArrayList(atEvents); - } - - public List getCapturedEvents() { - return new ArrayList(capturedEvents); - } -} |