@@ -134,6 +134,9 @@ public class MouseWheelEvent extends MouseEvent {
134134 * @see #getWheelRotation
135135 */
136136 int wheelRotation ;
137+
138+ double preciseWheelRotation ;
139+
137140
138141 /*
139142 * serialVersionUID
@@ -179,7 +182,6 @@ public class MouseWheelEvent extends MouseEvent {
179182 public MouseWheelEvent (Component source , int id , long when , int modifiers ,
180183 int x , int y , int clickCount , boolean popupTrigger ,
181184 int scrollType , int scrollAmount , int wheelRotation ) {
182-
183185 this (source , id , when , modifiers , x , y , 0 , 0 , clickCount ,
184186 popupTrigger , scrollType , scrollAmount , wheelRotation );
185187 }
@@ -226,15 +228,24 @@ public MouseWheelEvent (Component source, int id, long when, int modifiers,
226228 public MouseWheelEvent (Component source , int id , long when , int modifiers ,
227229 int x , int y , int xAbs , int yAbs , int clickCount , boolean popupTrigger ,
228230 int scrollType , int scrollAmount , int wheelRotation ) {
229-
231+ this (source , id , when , modifiers , x , y , xAbs , yAbs , clickCount , popupTrigger ,
232+ scrollType , scrollAmount , wheelRotation , wheelRotation );
233+ }
234+
235+ public MouseWheelEvent (Component source , int id , long when , int modifiers ,
236+ int x , int y , int xAbs , int yAbs , int clickCount , boolean popupTrigger ,
237+ int scrollType , int scrollAmount , int wheelRotation , double preciseWheelRotation ) {
238+ // ala Java 7
230239 super (source , id , when , modifiers , x , y , xAbs , yAbs , clickCount ,
231240 popupTrigger , MouseEvent .NOBUTTON );
232241
233242 this .scrollType = scrollType ;
234243 this .scrollAmount = scrollAmount ;
235244 this .wheelRotation = wheelRotation ;
245+ this .preciseWheelRotation = preciseWheelRotation ;
236246 }
237247
248+
238249 /**
239250 * Returns the type of scrolling that should take place in response to this
240251 * event. This is determined by the native platform. Legal values are:
@@ -281,6 +292,11 @@ public int getWheelRotation() {
281292 return wheelRotation ;
282293 }
283294
295+ public double getPreciseWheelRotation () {
296+ // SwingJS no different here
297+ return preciseWheelRotation ;
298+ }
299+
284300 /**
285301 * This is a convenience method to aid in the implementation of
286302 * the common-case MouseWheelListener - to scroll a ScrollPane or
0 commit comments