src/macosx/classes/sun/lwawt/macosx/CViewEmbeddedFrame.java

Print this page




  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 
  27 package sun.lwawt.macosx;
  28 
  29 import java.awt.AWTKeyStroke;
  30 import java.awt.Toolkit;
  31 import java.lang.reflect.InvocationTargetException;
  32 
  33 import sun.awt.EmbeddedFrame;
  34 import sun.lwawt.LWWindowPeer;
  35 
  36 /*
  37  * The CViewEmbeddedFrame class is used in the SWT_AWT bridge.
  38  * This is a part of public API and should not be renamed or moved
  39  */

  40 public class CViewEmbeddedFrame extends EmbeddedFrame {
  41 
  42     private final long nsViewPtr;
  43 
  44     private boolean isActive = false;
  45 
  46     public CViewEmbeddedFrame(long nsViewPtr) {
  47         this.nsViewPtr = nsViewPtr;
  48     }
  49 
  50     @SuppressWarnings("deprecation")
  51     @Override
  52     public void addNotify() {
  53         if (getPeer() == null) {
  54             LWCToolkit toolkit = (LWCToolkit) Toolkit.getDefaultToolkit();
  55             setPeer(toolkit.createEmbeddedFrame(this));
  56         }
  57         super.addNotify();
  58     }
  59 




  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 
  27 package sun.lwawt.macosx;
  28 
  29 import java.awt.AWTKeyStroke;
  30 import java.awt.Toolkit;
  31 import java.lang.reflect.InvocationTargetException;
  32 
  33 import sun.awt.EmbeddedFrame;
  34 import sun.lwawt.LWWindowPeer;
  35 
  36 /*
  37  * The CViewEmbeddedFrame class is used in the SWT_AWT bridge.
  38  * This is a part of public API and should not be renamed or moved
  39  */
  40 @SuppressWarnings("serial") // JDK implementation class
  41 public class CViewEmbeddedFrame extends EmbeddedFrame {
  42 
  43     private final long nsViewPtr;
  44 
  45     private boolean isActive = false;
  46 
  47     public CViewEmbeddedFrame(long nsViewPtr) {
  48         this.nsViewPtr = nsViewPtr;
  49     }
  50 
  51     @SuppressWarnings("deprecation")
  52     @Override
  53     public void addNotify() {
  54         if (getPeer() == null) {
  55             LWCToolkit toolkit = (LWCToolkit) Toolkit.getDefaultToolkit();
  56             setPeer(toolkit.createEmbeddedFrame(this));
  57         }
  58         super.addNotify();
  59     }
  60