src/java.desktop/macosx/classes/sun/lwawt/LWLightweightFramePeer.java
changeset 47827 f2238a5326e7
parent 47216 71c04702a3d5
equal deleted inserted replaced
47720:79efc2c3d832 47827:f2238a5326e7
     1 /*
     1 /*
     2  * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     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
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    32 import java.awt.Window;
    32 import java.awt.Window;
    33 import java.awt.dnd.DropTarget;
    33 import java.awt.dnd.DropTarget;
    34 import java.awt.event.FocusEvent;
    34 import java.awt.event.FocusEvent;
    35 
    35 
    36 import sun.awt.LightweightFrame;
    36 import sun.awt.LightweightFrame;
       
    37 import sun.awt.OverrideNativeWindowHandle;
    37 import sun.swing.JLightweightFrame;
    38 import sun.swing.JLightweightFrame;
    38 import sun.swing.SwingAccessor;
    39 import sun.swing.SwingAccessor;
    39 
    40 
    40 public class LWLightweightFramePeer extends LWWindowPeer {
    41 public class LWLightweightFramePeer extends LWWindowPeer implements OverrideNativeWindowHandle {
    41 
    42 
    42     public LWLightweightFramePeer(LightweightFrame target,
    43     public LWLightweightFramePeer(LightweightFrame target,
    43                                   PlatformComponent platformComponent,
    44                                   PlatformComponent platformComponent,
    44                                   PlatformWindow platformWindow)
    45                                   PlatformWindow platformWindow)
    45     {
    46     {
   114 
   115 
   115     @Override
   116     @Override
   116     public void updateCursorImmediately() {
   117     public void updateCursorImmediately() {
   117         SwingAccessor.getJLightweightFrameAccessor().updateCursor((JLightweightFrame)getLwTarget());
   118         SwingAccessor.getJLightweightFrameAccessor().updateCursor((JLightweightFrame)getLwTarget());
   118     }
   119     }
       
   120 
       
   121     // SwingNode
       
   122     private volatile long overriddenWindowHandle = 0L;
       
   123 
       
   124     @Override
       
   125     public void overrideWindowHandle(final long handle) {
       
   126         this.overriddenWindowHandle = handle;
       
   127     }
       
   128 
       
   129     public long getOverriddenWindowHandle() {
       
   130         return overriddenWindowHandle;
       
   131     }
   119 }
   132 }