/** Resets this event manager by removing all events from the event queue. */
 public synchronized void reset() {
   currentTopEventPriority = Integer.MIN_VALUE;
   clearAllEvents(true);
   customEvents.clear();
 }
 /** Removes all custom events from the event queue. */
 public void resetCustomEvents() {
   customEvents.clear();
 }