< prev index next >

src/java.desktop/macosx/classes/sun/lwawt/macosx/NSEvent.java

Print this page

        

@@ -30,20 +30,28 @@
 /**
  * A class representing Cocoa NSEvent class with the fields only necessary for
  * JDK functionality.
  */
 final class NSEvent {
+
+    static final int SCROLL_PHASE_UNSUPPORTED = 1;
+    static final int SCROLL_PHASE_BEGAN = 2;
+    static final int SCROLL_PHASE_CONTINUED = 3;
+    static final int SCROLL_MASK_PHASE_CANCELLED = 4;
+    static final int SCROLL_MASK_PHASE_ENDED = 5;
+
     private int type;
     private int modifierFlags;
 
     // Mouse event information
     private int clickCount;
     private int buttonNumber;
     private int x;
     private int y;
     private double scrollDeltaY;
     private double scrollDeltaX;
+    private int scrollPhase;
     private int absX;
     private int absY;
 
     // Key event information
     private short keyCode;

@@ -60,21 +68,22 @@
     }
 
     // Called from native
     NSEvent(int type, int modifierFlags, int clickCount, int buttonNumber,
                    int x, int y, int absX, int absY,
-                   double scrollDeltaY, double scrollDeltaX) {
+                   double scrollDeltaY, double scrollDeltaX, int scrollPhase) {
         this.type = type;
         this.modifierFlags = modifierFlags;
         this.clickCount = clickCount;
         this.buttonNumber = buttonNumber;
         this.x = x;
         this.y = y;
         this.absX = absX;
         this.absY = absY;
         this.scrollDeltaY = scrollDeltaY;
         this.scrollDeltaX = scrollDeltaX;
+        this.scrollPhase = scrollPhase;
     }
 
     int getType() {
         return type;
     }

@@ -105,10 +114,14 @@
 
     double getScrollDeltaX() {
         return scrollDeltaX;
     }
 
+    int getScrollPhase() {
+        return scrollPhase;
+    }
+
     int getAbsX() {
         return absX;
     }
 
     int getAbsY() {
< prev index next >