src/java.desktop/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 28,37 ****
--- 28,38 ----
import java.awt.AWTKeyStroke;
import java.awt.Point;
import java.awt.Toolkit;
+ import sun.awt.AWTAccessor;
import sun.awt.EmbeddedFrame;
import sun.lwawt.LWWindowPeer;
@SuppressWarnings("serial") // JDK implementation class
public class CEmbeddedFrame extends EmbeddedFrame {
*** 44,56 ****
public CEmbeddedFrame() {
show();
}
- @SuppressWarnings("deprecation")
public void addNotify() {
! if (getPeer() == null) {
LWCToolkit toolkit = (LWCToolkit)Toolkit.getDefaultToolkit();
LWWindowPeer peer = toolkit.createEmbeddedFrame(this);
setPeer(peer);
responder = new CPlatformResponder(peer, true);
}
--- 45,56 ----
public CEmbeddedFrame() {
show();
}
public void addNotify() {
! if (!isDisplayable()) {
LWCToolkit toolkit = (LWCToolkit)Toolkit.getDefaultToolkit();
LWWindowPeer peer = toolkit.createEmbeddedFrame(this);
setPeer(peer);
responder = new CPlatformResponder(peer, true);
}
*** 59,72 ****
public void registerAccelerator(AWTKeyStroke stroke) {}
public void unregisterAccelerator(AWTKeyStroke stroke) {}
- @SuppressWarnings("deprecation")
protected long getLayerPtr() {
! LWWindowPeer peer = (LWWindowPeer)getPeer();
! return peer.getLayerPtr();
}
// -----------------------------------------------------------------------
// SYNTHETIC EVENT DELIVERY
// -----------------------------------------------------------------------
--- 59,71 ----
public void registerAccelerator(AWTKeyStroke stroke) {}
public void unregisterAccelerator(AWTKeyStroke stroke) {}
protected long getLayerPtr() {
! return AWTAccessor.getComponentAccessor().<LWWindowPeer>getPeer(this)
! .getLayerPtr();
}
// -----------------------------------------------------------------------
// SYNTHETIC EVENT DELIVERY
// -----------------------------------------------------------------------