src/share/classes/java/awt/Window.java

Print this page

        

*** 224,233 **** --- 224,234 ---- private transient Component temporaryLostComponent; static boolean systemSyncLWRequests = false; boolean syncLWRequests = false; transient boolean beforeFirstShow = true; + private transient boolean disposing = false; static final int OPENED = 0x01; /** * An Integer value representing the Window State.
*** 1160,1169 **** --- 1161,1172 ---- } void doDispose() { class DisposeAction implements Runnable { public void run() { + disposing = true; + try { // Check if this window is the fullscreen window for the // device. Exit the fullscreen mode prior to disposing // of the window if that's the case. GraphicsDevice gd = getGraphicsConfiguration().getDevice(); if (gd.getFullScreenWindow() == Window.this) {
*** 1190,1199 **** --- 1193,1205 ---- inputContext.dispose(); inputContext = null; } } clearCurrentFocusCycleRootOnHide(); + } finally { + disposing = false; + } } } DisposeAction action = new DisposeAction(); if (EventQueue.isDispatchThread()) { action.run();
*** 2732,2741 **** --- 2738,2751 ---- */ public boolean isShowing() { return visible; } + boolean isDisposing() { + return disposing; + } + /** * @deprecated As of J2SE 1.4, replaced by * {@link Component#applyComponentOrientation Component.applyComponentOrientation}. */ @Deprecated