Menu

#1 Expose a bit more in the API.

open
nobody
None
5
2001-09-15
2001-09-15
No

It would be good to be able to configure the minimum
scroll speed as limited by the following line in
JMouseWheelSupport.

nIncrement = Math.max(nIncrement,15) * scrollSpeed;

I needed the ability to update the BoundedRangeModel
by increments of 1. The current implementation only
allows: 0, 15, 30, 45,... increments.

I made the following modifications to
JMouseWheelSupport to expose this speed setting.
Perhaps you might consider including this in your code
or some similar means to configure this value.

<snip>

>public abstract class JMouseWheelSupport {
> private static int minScrollDistance = 15;
>
> public static void setMinScrollDistance(int i) {
> minScrollDistance = i;
> }
>
> public static int getMinScrollDistance() {
> return minScrollDistance;
> }

<snip>

> nIncrement = Math.max(nIncrement,minScrollDistance)
* scrollSpeed;

<snip>

Discussion


Log in to post a comment.