Class MouseWheelEvent

All Implemented Interfaces:
Serializable

public class MouseWheelEvent extends MouseEvent
Port of MouseWheelEvent. Extends our MouseEvent — carries scroll type, scroll amount, integer rotation, and high-precision rotation (smooth-scrolling wheels).
See Also:
  • Field Details

  • Constructor Details

    • MouseWheelEvent

      public MouseWheelEvent(Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger, int scrollType, int scrollAmount, int wheelRotation)
    • MouseWheelEvent

      public MouseWheelEvent(Component source, int id, long when, int modifiers, int x, int y, int xAbs, int yAbs, int clickCount, boolean popupTrigger, int scrollType, int scrollAmount, int wheelRotation)
    • MouseWheelEvent

      public MouseWheelEvent(Component source, int id, long when, int modifiers, int x, int y, int xAbs, int yAbs, int clickCount, boolean popupTrigger, int scrollType, int scrollAmount, int wheelRotation, double preciseWheelRotation)
  • Method Details

    • getScrollType

      public int getScrollType()
    • getScrollAmount

      public int getScrollAmount()
    • getWheelRotation

      public int getWheelRotation()
    • getPreciseWheelRotation

      public double getPreciseWheelRotation()
    • getUnitsToScroll

      public int getUnitsToScroll()
      How far each click of the wheel should scroll if the current scroll type is WHEEL_UNIT_SCROLL. AWT returns a computed value from the underlying component's scroll unit; we return the raw scrollAmount * rotation so callers get the same "total units" semantics.
    • paramString

      public String paramString()
      Overrides:
      paramString in class MouseEvent