src/java.desktop/windows/classes/sun/awt/windows/WEmbeddedFrame.java
Print this page
*** 28,39 ****
--- 28,42 ----
import sun.awt.*;
import java.awt.*;
import java.awt.event.InvocationEvent;
import java.awt.peer.ComponentPeer;
import java.awt.image.*;
+
import sun.awt.image.ByteInterleavedRaster;
import sun.security.action.GetPropertyAction;
+
+ import java.awt.peer.FramePeer;
import java.security.PrivilegedAction;
import java.security.AccessController;
@SuppressWarnings("serial") // JDK-implementation class
public class WEmbeddedFrame extends EmbeddedFrame {
*** 78,90 ****
addNotify();
show();
}
}
- @SuppressWarnings("deprecation")
public void addNotify() {
! if (getPeer() == null) {
WToolkit toolkit = (WToolkit)Toolkit.getDefaultToolkit();
setPeer(toolkit.createEmbeddedFrame(this));
}
super.addNotify();
}
--- 81,92 ----
addNotify();
show();
}
}
public void addNotify() {
! if (!isDisplayable()) {
WToolkit toolkit = (WToolkit)Toolkit.getDefaultToolkit();
setPeer(toolkit.createEmbeddedFrame(this));
}
super.addNotify();
}
*** 230,260 ****
* DO NOT INVOKE CLIENT CODE ON THIS THREAD!
*/
public void activateEmbeddingTopLevel() {
}
- @SuppressWarnings("deprecation")
public void synthesizeWindowActivation(final boolean activate) {
if (!activate || EventQueue.isDispatchThread()) {
! ((WFramePeer)getPeer()).emulateActivation(activate);
} else {
// To avoid focus concurrence b/w IE and EmbeddedFrame
// activation is postponed by means of posting it to EDT.
Runnable r = new Runnable() {
public void run() {
! ((WFramePeer)getPeer()).emulateActivation(true);
}
};
WToolkit.postEvent(WToolkit.targetToAppContext(this),
new InvocationEvent(this, r));
}
}
- @SuppressWarnings("deprecation")
public boolean requestFocusToEmbedder() {
if (isEmbeddedInIE) {
! return ((WEmbeddedFramePeer) getPeer()).requestFocusToEmbedder();
}
return false;
}
public void registerAccelerator(AWTKeyStroke stroke) {}
--- 232,263 ----
* DO NOT INVOKE CLIENT CODE ON THIS THREAD!
*/
public void activateEmbeddingTopLevel() {
}
public void synthesizeWindowActivation(final boolean activate) {
+ final FramePeer peer = AWTAccessor.getComponentAccessor().getPeer(this);
if (!activate || EventQueue.isDispatchThread()) {
! peer.emulateActivation(activate);
} else {
// To avoid focus concurrence b/w IE and EmbeddedFrame
// activation is postponed by means of posting it to EDT.
Runnable r = new Runnable() {
public void run() {
! peer.emulateActivation(true);
}
};
WToolkit.postEvent(WToolkit.targetToAppContext(this),
new InvocationEvent(this, r));
}
}
public boolean requestFocusToEmbedder() {
if (isEmbeddedInIE) {
! final WEmbeddedFramePeer peer = AWTAccessor.getComponentAccessor()
! .getPeer(this);
! return peer.requestFocusToEmbedder();
}
return false;
}
public void registerAccelerator(AWTKeyStroke stroke) {}