you can set the ScrollEventListener to a ScrollPane and thus override the original behavior. Thus, for example, I applied ScrollPane, which scrolls horizontally, not vertically. This is what the relevant part of my code looks like:
public class Overview extends ScrollPane { ... private void setupHorizontalScrolling() { this.setOnScroll(new EventHandler<ScrollEvent>() { @Override public void handle(ScrollEvent scrollEvent) { double deltaY = scrollEvent.getDeltaY()*2;
To satisfy your requirements, you can simply change the line in which get / setHvalue is called to get / setVvalue, and then you can configure the scroll as you want.
source share