diff options
author | dxu <none@none> | 2013-04-04 15:39:17 -0700 |
---|---|---|
committer | dxu <none@none> | 2013-04-04 15:39:17 -0700 |
commit | 3c664f0710f7cd34553f602c8d2fa3c1657b4a49 (patch) | |
tree | 8eea850ce8e7d5752c7112659c020bd8dccb0f04 /src/macosx/classes/com/apple/eawt | |
parent | 11c0e5ce28523da3ba134ca3ea47c23f2f3cb0c3 (diff) |
8000406: change files using @GenerateNativeHeader to use @Native
Summary: Use @Native annotation to mark constants interested by native codes
Reviewed-by: alanb, anthony, prr
Diffstat (limited to 'src/macosx/classes/com/apple/eawt')
-rw-r--r-- | src/macosx/classes/com/apple/eawt/FullScreenHandler.java | 14 | ||||
-rw-r--r-- | src/macosx/classes/com/apple/eawt/event/GestureHandler.java | 14 |
2 files changed, 12 insertions, 16 deletions
diff --git a/src/macosx/classes/com/apple/eawt/FullScreenHandler.java b/src/macosx/classes/com/apple/eawt/FullScreenHandler.java index 7ad936402..f5a843bcd 100644 --- a/src/macosx/classes/com/apple/eawt/FullScreenHandler.java +++ b/src/macosx/classes/com/apple/eawt/FullScreenHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,17 +33,15 @@ import javax.swing.RootPaneContainer; import com.apple.eawt.AppEvent.FullScreenEvent; -import javax.tools.annotation.GenerateNativeHeader; +import java.lang.annotation.Native; -/* No native methods here, but the constants are needed in the supporting JNI code */ -@GenerateNativeHeader final class FullScreenHandler { private static final String CLIENT_PROPERTY = "com.apple.eawt.event.internalFullScreenHandler"; - static final int FULLSCREEN_WILL_ENTER = 1; - static final int FULLSCREEN_DID_ENTER = 2; - static final int FULLSCREEN_WILL_EXIT = 3; - static final int FULLSCREEN_DID_EXIT = 4; + @Native static final int FULLSCREEN_WILL_ENTER = 1; + @Native static final int FULLSCREEN_DID_ENTER = 2; + @Native static final int FULLSCREEN_WILL_EXIT = 3; + @Native static final int FULLSCREEN_DID_EXIT = 4; // installs a private instance of the handler, if necessary static void addFullScreenListenerTo(final RootPaneContainer window, final FullScreenListener listener) { diff --git a/src/macosx/classes/com/apple/eawt/event/GestureHandler.java b/src/macosx/classes/com/apple/eawt/event/GestureHandler.java index 3b4d54f42..1378a2c80 100644 --- a/src/macosx/classes/com/apple/eawt/event/GestureHandler.java +++ b/src/macosx/classes/com/apple/eawt/event/GestureHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,18 +31,16 @@ import java.util.List; import javax.swing.*; -import javax.tools.annotation.GenerateNativeHeader; +import java.lang.annotation.Native; -/* No native methods here, but the constants are needed in the supporting JNI code */ -@GenerateNativeHeader final class GestureHandler { private static final String CLIENT_PROPERTY = "com.apple.eawt.event.internalGestureHandler"; // native constants for the supported types of high-level gestures - static final int PHASE = 1; - static final int ROTATE = 2; - static final int MAGNIFY = 3; - static final int SWIPE = 4; + @Native static final int PHASE = 1; + @Native static final int ROTATE = 2; + @Native static final int MAGNIFY = 3; + @Native static final int SWIPE = 4; // installs a private instance of GestureHandler, if necessary static void addGestureListenerTo(final JComponent component, final GestureListener listener) { |