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
27 package sun.lwawt.macosx;
28
29 import java.awt.Insets;
30
31 import sun.lwawt.PlatformComponent;
32 import sun.lwawt.PlatformWindow;
33
34 /**
35 * On OSX {@code CPlatformComponent} stores pointer to the native CAlayer which
36 * can be used from JAWT.
37 */
38 final class CPlatformComponent extends CFRetainedResource
39 implements PlatformComponent {
40
41 private volatile PlatformWindow platformWindow;
42
43 CPlatformComponent() {
44 super(0, true);
45 }
46
47 public long getPointer() {
48 return ptr;
49 }
50
51 @Override
52 public void initialize(final PlatformWindow platformWindow) {
53 this.platformWindow = platformWindow;
54 setPtr(nativeCreateComponent(platformWindow.getLayerPtr()));
55 }
56
57 // TODO: visibility, z-order
58
|
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
27 package sun.lwawt.macosx;
28
29 import java.awt.Insets;
30
31 import sun.lwawt.PlatformComponent;
32 import sun.lwawt.PlatformWindow;
33
34 /**
35 * On OSX {@code CPlatformComponent} stores pointer to the native CAlayer which
36 * can be used from JAWT.
37 */
38 class CPlatformComponent extends CFRetainedResource
39 implements PlatformComponent {
40
41 private volatile PlatformWindow platformWindow;
42
43 CPlatformComponent() {
44 super(0, true);
45 }
46
47 public long getPointer() {
48 return ptr;
49 }
50
51 @Override
52 public void initialize(final PlatformWindow platformWindow) {
53 this.platformWindow = platformWindow;
54 setPtr(nativeCreateComponent(platformWindow.getLayerPtr()));
55 }
56
57 // TODO: visibility, z-order
58
|