EventDispatchThread.java revision 2518
809N/A * Copyright (c) 1996, 2008, Oracle and/or its affiliates. All rights reserved. 809N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 809N/A * This code is free software; you can redistribute it and/or modify it 809N/A * under the terms of the GNU General Public License version 2 only, as 809N/A * published by the Free Software Foundation. Oracle designates this 809N/A * particular file as subject to the "Classpath" exception as provided 809N/A * by Oracle in the LICENSE file that accompanied this code. 809N/A * This code is distributed in the hope that it will be useful, but WITHOUT 809N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 809N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 809N/A * version 2 for more details (a copy is included in the LICENSE file that 809N/A * accompanied this code). 809N/A * You should have received a copy of the GNU General Public License version 809N/A * 2 along with this work; if not, write to the Free Software Foundation, 809N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 809N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 809N/A * or visit www.oracle.com if you need additional information or have any 809N/A * EventDispatchThread is a package-private AWT class which takes 809N/A * events off the EventQueue and dispatches them to the appropriate 809N/A * The Thread starts a "permanent" event pump with a call to 809N/A * pumpEvents(Conditional) in its run() method. Event handlers can choose to 809N/A * block this event pump at any time, but should start a new pump (<b>not</b> 809N/A * a new EventDispatchThread) by again calling pumpEvents(Conditional). This 809N/A * secondary event pump will exit automatically as soon as the Condtional 809N/A * evaluate()s to false and an additional Event is pumped and dispatched. 809N/A * @author David Mendenhall 809N/A * Must be called on EDT only, that's why no synchronization // EventQueue may change during the dispatching return false;
// AppContext.dispose() interrupts all // Threads in the AppContext * filter out MouseEvent and ActionEvent that's outside * the modalComponent hierarchy. * KeyEvent is handled by using enqueueKeyEvent * Modal internal frames are handled separately. If event is * for some component from another heavyweight than modalComp, * it is accepted. If heavyweight is the same - we still accept * event and perform further filtering in LightweightDispatcher // Exclude this object from modality and // continue to pump it's events. // Exclude this window and all its children from // modality and continue to pump it's events.