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

Print this page




  47 
  48     public CPlatformView() {
  49         super(0, true);
  50     }
  51 
  52     public void initialize(LWWindowPeer peer, CPlatformResponder responder) {
  53         this.peer = peer;
  54         this.responder = responder;
  55 
  56         if (!LWCToolkit.getSunAwtDisableCALayers()) {
  57             this.windowLayer = new CGLLayer(peer);
  58         }
  59         setPtr(nativeCreateView(0, 0, 0, 0, getWindowLayerPtr()));
  60     }
  61 
  62     public long getAWTView() {
  63         return ptr;
  64     }
  65 
  66     public boolean isOpaque() {
  67         return peer.isOpaque();
  68     }
  69 
  70     /*
  71      * All coordinates passed to the method should be based on the origin being in the bottom-left corner (standard
  72      * Cocoa coordinates).
  73      */
  74     public void setBounds(int x, int y, int width, int height) {
  75         CWrapper.NSView.setFrame(ptr, x, y, width, height);
  76     }
  77 
  78     // REMIND: CGLSurfaceData expects top-level's size
  79     public Rectangle getBounds() {
  80         return peer.getBounds();
  81     }
  82 
  83     public Object getDestination() {
  84         return peer;
  85     }
  86 
  87     public void enterFullScreenMode(final long nsWindowPtr) {




  47 
  48     public CPlatformView() {
  49         super(0, true);
  50     }
  51 
  52     public void initialize(LWWindowPeer peer, CPlatformResponder responder) {
  53         this.peer = peer;
  54         this.responder = responder;
  55 
  56         if (!LWCToolkit.getSunAwtDisableCALayers()) {
  57             this.windowLayer = new CGLLayer(peer);
  58         }
  59         setPtr(nativeCreateView(0, 0, 0, 0, getWindowLayerPtr()));
  60     }
  61 
  62     public long getAWTView() {
  63         return ptr;
  64     }
  65 
  66     public boolean isOpaque() {
  67         return !peer.isTranslucent();
  68     }
  69 
  70     /*
  71      * All coordinates passed to the method should be based on the origin being in the bottom-left corner (standard
  72      * Cocoa coordinates).
  73      */
  74     public void setBounds(int x, int y, int width, int height) {
  75         CWrapper.NSView.setFrame(ptr, x, y, width, height);
  76     }
  77 
  78     // REMIND: CGLSurfaceData expects top-level's size
  79     public Rectangle getBounds() {
  80         return peer.getBounds();
  81     }
  82 
  83     public Object getDestination() {
  84         return peer;
  85     }
  86 
  87     public void enterFullScreenMode(final long nsWindowPtr) {