To improve user experience on my application, id like to distinguish between user’s diffrent mouse wheeling speed and quantity and act accordingly to improve my GUI user freindlyness, how do i analyse it?
To improve user experience on my application, id like to distinguish between user’s diffrent
Share
Robert Harvey makes a good suggestion in the comments, but it doesn’t go far enough. The MouseWheelEvent passed to MouseWheelListener.mouseWheelMoved contains a few properties that you should take into consideration beyond the time between events. Specifically:
The first of these methods, MouseWheelEvent.getPreciseWheelRotation, returns the number of clicks that the user rotated the mouse, taking high-resolution mice and trackpads into account. The higher the absolute value of this number, the more quickly the user was scrolling the mouse.
The second of these methods, MouseWheelEvent.getScrollAmount, tells the system setting that the user’s operating system uses for scroll speed. Using the Windows Control Panel or a similar tool on other platforms, the user can set how quickly the scroll wheel affects change in the interface. If the user has set a very fast scroll wheel, you should probably count a medium-speed scroll to be the same as a very fast scroll on another platform. The user asked for things to scroll more quickly, so your app should respect that.
And of course, you should keep the time of the last scroll event (you can use System.currentTimeMillis() or System.nanoTime() to measure time deltas), and shorter intervals between scroll events typically mean faster scrolling. One possible solution is to keep track of the total number of clicks the user moves the mouse over some constant period of time, say 0.1 or 0.05 seconds, and base the interaction on the accumulated number of scroll wheel clicks rather than the number of clicks that occur in each event.