In TableView, the UnitIncrement is not the same for the scrollBar.
Because if it's in the Virtual direction, "flow.adjustPixels(-10);" is called. So we make a jump of 10.
But if you are in the non-Virtual direction, "super.increment()" (or "super.decrement()") is called. Or that call will result with the default "unitIncrement" value in "ScrollBar" which is 1.
The result is that you don't scroll the same amount on the Vbar and the Hbar (aka the Hbar is slower than the Vbar).
So I suggest you set a "setUnitIncrement(10);" at the constructor of the scrollBar. And also that you use a variable in "flow.adjustPixels" so that the user can control the UnitIncrement also in the virtualized direction.
Because if it's in the Virtual direction, "flow.adjustPixels(-10);" is called. So we make a jump of 10.
But if you are in the non-Virtual direction, "super.increment()" (or "super.decrement()") is called. Or that call will result with the default "unitIncrement" value in "ScrollBar" which is 1.
The result is that you don't scroll the same amount on the Vbar and the Hbar (aka the Hbar is slower than the Vbar).
So I suggest you set a "setUnitIncrement(10);" at the constructor of the scrollBar. And also that you use a variable in "flow.adjustPixels" so that the user can control the UnitIncrement also in the virtualized direction.
- relates to
-
JDK-8090224 Horizontal ScrollBar in TableView is not coherent with Vertical one
- Open