1 /*
   2  * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  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 package sun.lwawt.macosx;
  27 
  28 import java.awt.Font;
  29 import java.awt.FontMetrics;
  30 import java.awt.Graphics;
  31 import java.awt.GraphicsDevice;
  32 import java.awt.Insets;
  33 import java.awt.MenuBar;
  34 import java.awt.Point;
  35 import java.awt.Window;
  36 import sun.awt.CausedFocusEvent;
  37 import sun.java2d.SurfaceData;
  38 import sun.lwawt.LWWindowPeer;
  39 import sun.lwawt.LWWindowPeer.PeerType;
  40 import sun.lwawt.PlatformWindow;
  41 
  42 public class CPlatformLWWindow extends CPlatformWindow {
  43 
  44     @Override
  45     public void initialize(Window target, LWWindowPeer peer, PlatformWindow owner) {
  46         this.peer = peer;
  47         this.target = target;
  48         if (owner instanceof CPlatformWindow) {
  49             this.owner = (CPlatformWindow)owner;
  50         }
  51         this.contentView = new CPlatformLWView();
  52     }
  53 
  54     @Override
  55     public void toggleFullScreen() {
  56     }
  57 
  58     @Override
  59     public void setMenuBar(MenuBar mb) {
  60     }
  61 
  62     @Override
  63     public void dispose() {
  64     }
  65 
  66     @Override
  67     public FontMetrics getFontMetrics(Font f) {
  68         return null;
  69     }
  70 
  71     @Override
  72     public Insets getInsets() {
  73         return null;
  74     }
  75 
  76     @Override
  77     public Point getLocationOnScreen() {
  78         return null;
  79     }
  80 
  81     @Override
  82     public GraphicsDevice getGraphicsDevice() {
  83         return null;
  84     }
  85 
  86     @Override
  87     public SurfaceData getScreenSurface() {
  88         return null;
  89     }
  90 
  91     @Override
  92     public SurfaceData replaceSurfaceData() {
  93         return null;
  94     }
  95 
  96     @Override
  97     public void setBounds(int x, int y, int w, int h) {
  98         if (peer != null) {
  99             peer.notifyReshape(x, y, w, h);        
 100         }
 101     }
 102 
 103     @Override
 104     public void setVisible(boolean visible) {
 105     }
 106 
 107     @Override
 108     public void setTitle(String title) {
 109     }
 110 
 111     @Override
 112     public void updateIconImages() {
 113     }
 114 
 115     @Override
 116     public long getNSWindowPtr() {
 117         return 0;
 118     }
 119 
 120     @Override
 121     public SurfaceData getSurfaceData() {
 122         return null;
 123     }
 124 
 125     @Override
 126     public void toBack() {
 127     }
 128 
 129     @Override
 130     public void toFront() {
 131     }
 132 
 133     @Override
 134     public void setResizable(final boolean resizable) {
 135     }
 136 
 137     @Override
 138     public void setSizeConstraints(int minW, int minH, int maxW, int maxH) {
 139     }
 140 
 141     @Override
 142     public boolean rejectFocusRequest(CausedFocusEvent.Cause cause) {
 143         return false;
 144     }
 145 
 146     @Override
 147     public boolean requestWindowFocus() {
 148         return true;
 149     }
 150 
 151     @Override
 152     public boolean isActive() {
 153         return true;
 154     }
 155 
 156     @Override
 157     public void updateFocusableWindowState() {
 158     }
 159 
 160     @Override
 161     public Graphics transformGraphics(Graphics g) {
 162         return null;
 163     }
 164 
 165     @Override
 166     public void setAlwaysOnTop(boolean isAlwaysOnTop) {
 167     }
 168 
 169     @Override
 170     public PlatformWindow getTopmostPlatformWindowUnderMouse(){
 171         return null;
 172     }
 173 
 174     @Override
 175     public void setOpacity(float opacity) {
 176     }
 177 
 178     @Override
 179     public void setOpaque(boolean isOpaque) {
 180     }
 181 
 182     @Override
 183     public void enterFullScreenMode() {
 184     }
 185 
 186     @Override
 187     public void exitFullScreenMode() {
 188     }
 189 
 190     @Override
 191     public void setWindowState(int windowState) {
 192     }
 193 
 194     @Override
 195     public LWWindowPeer getPeer() {
 196         return super.getPeer();
 197     }
 198 
 199     @Override
 200     public CPlatformView getContentView() {
 201         return super.getContentView();
 202     }
 203 
 204     @Override
 205     public long getLayerPtr() {
 206         return 0;
 207     }
 208 }