1 15 16 package swingwt.awt.event; 17 18 import swingwt.awt.Component; 19 20 26 public class MouseWheelEvent extends MouseEvent 27 { 28 public static final int WHEEL_UNIT_SCROLL = 0; 29 public static final int WHEEL_BLOCK_SCROLL = 1; 30 31 int scrollType, scrollAmount, wheelRotation; 32 33 public MouseWheelEvent( Component source, int id, long when, int modifiers, 34 int x, int y, int clickCount, boolean popupTrigger, 35 int scrollType, int scrollAmount, int wheelRotation ) 36 { 37 super(source, id, when, modifiers, x, y, clickCount, popupTrigger); 38 this.scrollType = scrollType; 39 this.scrollAmount = scrollAmount; 40 this.wheelRotation = wheelRotation; 41 } 42 public int getScrollType() { return scrollType; } 43 public int getScrollAmount() { return scrollAmount; } 44 public int getWheelRotation() { return wheelRotation; } 45 public int getUnitsToScroll() { return scrollAmount * wheelRotation; } 46 } 47 | Popular Tags |