FileDocCategorySizeDatePackage
EventMonitor.javaAPI DocAndroid 1.5 API1820Wed May 06 22:41:04 BST 2009org.w3c.domts

EventMonitor

public class EventMonitor extends Object implements EventListener
This is a utility implementation of EventListener that captures all events and provides access to lists of all events by mode

Fields Summary
private final List
atEvents
private final List
bubbledEvents
private final List
capturedEvents
private final List
allEvents
Constructors Summary
public EventMonitor()


    
  
Methods Summary
public java.util.ListgetAllEvents()

    return new ArrayList(allEvents);
  
public java.util.ListgetAtEvents()

    return new ArrayList(atEvents);
  
public java.util.ListgetBubbledEvents()

    return new ArrayList(bubbledEvents);
  
public java.util.ListgetCapturedEvents()

    return new ArrayList(capturedEvents);
  
public voidhandleEvent(org.w3c.dom.events.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);