de.caff.util

## Class EventQueueExceptionWrapper

- java.lang.Object
- - java.awt.EventQueue
  - - de.caff.util.EventQueueExceptionWrapper

-     class EventQueueExceptionWrapper
      extends java.awt.EventQueue

  A wrapper for the event queue which catches all uncaught exceptions and distributes them to `EventQueueExceptionListener`s. This should only be used as a singleton, and it is indirectly used by the `Utility.addEventQueueExceptionListener(EventQueueExceptionListener)` method.
  Author:
    Rammi

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `EventQueueExceptionWrapper()` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addEventQueueExceptionListener(EventQueueExceptionListener listener)` Add an exception listener which is called when an exception occurs during the dispatch of an AWT event.
    `protected void` | `dispatchEvent(java.awt.AWTEvent event)` Dispatches an event.
    `void` | `removeEventQueueExceptionListener(EventQueueExceptionListener listener)` Remove an exception listener which was called when an exception occurs during the dispatch of an AWT event.

    - ### Methods inherited from class java.awt.EventQueue

      `createSecondaryLoop, getCurrentEvent, getMostRecentEventTime, getNextEvent, invokeAndWait, invokeLater, isDispatchThread, peekEvent, peekEvent, pop, postEvent, push`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### EventQueueExceptionWrapper

          public EventQueueExceptionWrapper()

      Constructor.

  - ### Method Detail

    - #### dispatchEvent

          protected void dispatchEvent(java.awt.AWTEvent event)

      Dispatches an event. The manner in which the event is dispatched depends upon the type of the event and the type of the event's source object:

      Event Type | Source Type | Dispatched To
      --- | --- | ---
      ActiveEvent | Any | event.dispatch()
      Other | Component | source.dispatchEvent(AWTEvent)
      Other | MenuComponent | source.dispatchEvent(AWTEvent)
      Other | No action (ignored)

      Overrides:
        `dispatchEvent` in class `java.awt.EventQueue`
      Parameters:
        `event` - an instance of `java.awt.AWTEvent`, or a subclass of it

    - #### addEventQueueExceptionListener

          public void addEventQueueExceptionListener(EventQueueExceptionListener listener)

      Add an exception listener which is called when an exception occurs during the dispatch of an AWT event.
      Parameters:
        `listener` - listener to add

    - #### removeEventQueueExceptionListener

          public void removeEventQueueExceptionListener(EventQueueExceptionListener listener)

      Remove an exception listener which was called when an exception occurs during the dispatch of an AWT event.
      Parameters:
        `listener` - listener to remove