home *** CD-ROM | disk | FTP | other *** search
- package sun.awt;
-
- import java.awt.EventDispatchThread;
-
- public class Modality {
- private boolean m_isOnEventDispatchThread;
- private EventDispatchThread.EventPump m_eventPump;
-
- public void enter() throws InterruptedException {
- if (Thread.currentThread() instanceof EventDispatchThread) {
- EventDispatchThread var1 = (EventDispatchThread)Thread.currentThread();
- var1.getClass();
- this.m_eventPump = new EventDispatchThread.EventPump(var1);
- this.m_isOnEventDispatchThread = true;
- this.m_eventPump.dispatchEvents();
- } else {
- this.m_isOnEventDispatchThread = false;
- synchronized(this){}
-
- try {
- this.wait();
- } catch (Throwable var3) {
- throw var3;
- }
-
- }
- }
-
- public void exit() {
- if (this.m_isOnEventDispatchThread) {
- this.m_eventPump.stopDispatching();
- } else {
- synchronized(this){}
-
- try {
- this.notify();
- } catch (Throwable var3) {
- throw var3;
- }
-
- }
- }
- }
-