src/share/classes/java/awt/Component.java
Print this page
@@ -65,11 +65,10 @@
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;
@@ -4864,20 +4863,10 @@
return;
}
}
break;
- case WindowEvent.WINDOW_CLOSING:
- if (toolkit instanceof WindowClosingListener) {
- windowClosingException = ((WindowClosingListener)
- toolkit).windowClosingNotify((WindowEvent)e);
- if (checkWindowClosingException()) {
- return;
- }
- }
- break;
-
default:
break;
}
/*
@@ -4929,25 +4918,10 @@
}
}
}
/*
- * 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())
*/
@@ -5050,24 +5024,10 @@
}
}
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) &&