• Post Reply Bookmark Topic Watch Topic
  • New Topic

mousewheelevent  RSS feed

 
Nikos Stavros
Ranch Hand
Posts: 243
Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how does this event distinguished from a wheel moved up and wheel moved down
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From the MouseWheelEvent JavaDocs -


getWheelRotation

public int getWheelRotation()

Returns the number of "clicks" the mouse wheel was rotated.

Returns:
negative values if the mouse wheel was rotated up/away from the user, and positive values if the mouse wheel was rotated down/ towards the user

 
Campbell Ritchie
Marshal
Posts: 55772
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you looked in the MouseWheelEvent API and its getUnitsToScroll method?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!