jdk/src/share/classes/java/awt/EventDispatchThread.java
changeset 3938 ef327bd847c0
parent 1979 f47a542ee9b7
child 4365 4ac67034e98b
equal deleted inserted replaced
3934:487e1aa949c4 3938:ef327bd847c0
    34 import sun.security.action.GetPropertyAction;
    34 import sun.security.action.GetPropertyAction;
    35 import sun.awt.AWTAutoShutdown;
    35 import sun.awt.AWTAutoShutdown;
    36 import sun.awt.SunToolkit;
    36 import sun.awt.SunToolkit;
    37 
    37 
    38 import java.util.Vector;
    38 import java.util.Vector;
    39 import java.util.logging.*;
    39 import sun.util.logging.PlatformLogger;
    40 
    40 
    41 import sun.awt.dnd.SunDragSourceContextPeer;
    41 import sun.awt.dnd.SunDragSourceContextPeer;
    42 import sun.awt.EventQueueDelegate;
    42 import sun.awt.EventQueueDelegate;
    43 
    43 
    44 /**
    44 /**
    59  * @author David Mendenhall
    59  * @author David Mendenhall
    60  *
    60  *
    61  * @since 1.1
    61  * @since 1.1
    62  */
    62  */
    63 class EventDispatchThread extends Thread {
    63 class EventDispatchThread extends Thread {
    64     private static final Logger eventLog = Logger.getLogger("java.awt.event.EventDispatchThread");
    64     private static final PlatformLogger eventLog = PlatformLogger.getLogger("java.awt.event.EventDispatchThread");
    65 
    65 
    66     private EventQueue theQueue;
    66     private EventQueue theQueue;
    67     private boolean doDispatch = true;
    67     private boolean doDispatch = true;
    68     private static final int ANY_EVENT = -1;
    68     private static final int ANY_EVENT = -1;
    69 
    69 
   273                     event.consume();
   273                     event.consume();
   274                 }
   274                 }
   275             }
   275             }
   276             while (eventOK == false);
   276             while (eventOK == false);
   277 
   277 
   278             if (eventLog.isLoggable(Level.FINEST)) {
   278             if (eventLog.isLoggable(PlatformLogger.FINEST)) {
   279                 eventLog.log(Level.FINEST, "Dispatching: " + event);
   279                 eventLog.finest("Dispatching: " + event);
   280             }
   280             }
   281 
   281 
   282             Object handle = null;
   282             Object handle = null;
   283             if (delegate != null) {
   283             if (delegate != null) {
   284                 handle = delegate.beforeDispatch(event);
   284                 handle = delegate.beforeDispatch(event);
   306         }
   306         }
   307         return true;
   307         return true;
   308     }
   308     }
   309 
   309 
   310     private void processException(Throwable e) {
   310     private void processException(Throwable e) {
   311         if (eventLog.isLoggable(Level.FINE)) {
   311         if (eventLog.isLoggable(PlatformLogger.FINE)) {
   312             eventLog.log(Level.FINE, "Processing exception: " + e);
   312             eventLog.fine("Processing exception: " + e);
   313         }
   313         }
   314         getUncaughtExceptionHandler().uncaughtException(this, e);
   314         getUncaughtExceptionHandler().uncaughtException(this, e);
   315         // don't rethrow the exception to avoid EDT recreation
   315         // don't rethrow the exception to avoid EDT recreation
   316     }
   316     }
   317 
   317