I have a very expensive action that can be done by scrolling the mouse on the panel. I am currently using
pane.setOnScroll({myMethod()}).
The problem is that if you scroll a lot, it calculates everything many times. Therefore, I want to perform my actions only after the scrolling is complete. I was hoping to use setOnScrollStarted, keep the initial value and setOnScrollFinished, to complete my actions.
But I do not know why these two methods are never called. As a test, I used
pane.setOnScroll({System.out.println("proof of action"});
and he was clearly not called.
Any idea on how to call my method only at the end of the scroll?
Thanks in advance, A
source
share