src/share/classes/java/awt/Component.java

Print this page

        

*** 65,75 **** import sun.awt.AppContext; import sun.awt.AWTAccessor; import sun.awt.ConstrainableGraphics; import sun.awt.SubRegionShowable; import sun.awt.SunToolkit; - import sun.awt.WindowClosingListener; import sun.awt.CausedFocusEvent; import sun.awt.EmbeddedFrame; import sun.awt.dnd.SunDropTargetEvent; import sun.awt.im.CompositionArea; import sun.font.FontManager; --- 65,74 ----
*** 4864,4883 **** return; } } break; - case WindowEvent.WINDOW_CLOSING: - if (toolkit instanceof WindowClosingListener) { - windowClosingException = ((WindowClosingListener) - toolkit).windowClosingNotify((WindowEvent)e); - if (checkWindowClosingException()) { - return; - } - } - break; - default: break; } /* --- 4863,4872 ----
*** 4929,4953 **** } } } /* - * 8. Special handling for 4061116 : Hook for browser to close modal - * dialogs. - */ - if (id == WindowEvent.WINDOW_CLOSING && !e.isConsumed()) { - if (toolkit instanceof WindowClosingListener) { - windowClosingException = - ((WindowClosingListener)toolkit). - windowClosingDelivered((WindowEvent)e); - if (checkWindowClosingException()) { - return; - } - } - } - - /* * 9. Allow the peer to process the event. * Except KeyEvents, they will be processed by peer after * all KeyEventPostProcessors * (see DefaultKeyboardFocusManager.dispatchKeyEvent()) */ --- 4918,4927 ----
*** 5050,5073 **** } } return false; } - boolean checkWindowClosingException() { - if (windowClosingException != null) { - if (this instanceof Dialog) { - ((Dialog)this).interruptBlocking(); - } else { - windowClosingException.fillInStackTrace(); - windowClosingException.printStackTrace(); - windowClosingException = null; - } - return true; - } - return false; - } - boolean areInputMethodsEnabled() { // in 1.2, we assume input method support is required for all // components that handle key events, but components can turn off // input methods by calling enableInputMethods(false). return ((eventMask & AWTEvent.INPUT_METHODS_ENABLED_MASK) != 0) && --- 5024,5033 ----