src/macosx/classes/com/apple/eawt/event/GestureHandler.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2011, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 29,50 ****
import java.util.*;
import java.util.List;
import javax.swing.*;
! import javax.tools.annotation.GenerateNativeHeader;
- /* 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;
// installs a private instance of GestureHandler, if necessary
static void addGestureListenerTo(final JComponent component, final GestureListener listener) {
final Object value = component.getClientProperty(CLIENT_PROPERTY);
if (value instanceof GestureHandler) {
--- 29,48 ----
import java.util.*;
import java.util.List;
import javax.swing.*;
! import java.lang.annotation.Native;
final class GestureHandler {
private static final String CLIENT_PROPERTY = "com.apple.eawt.event.internalGestureHandler";
// native constants for the supported types of high-level gestures
! @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) {
final Object value = component.getClientProperty(CLIENT_PROPERTY);
if (value instanceof GestureHandler) {