下面列出了怎么用javafx.scene.input.ScrollEvent的API类实例代码及写法,或者点击链接到github查看源代码。
/**
* Handle the case where a plot implements the {@link Zoomable} interface.
*
* @param zoomable the zoomable plot.
* @param e the mouse wheel event.
*/
private void handleZoomable(ChartCanvas canvas, Zoomable zoomable,
ScrollEvent e) {
// don't zoom unless the mouse pointer is in the plot's data area
ChartRenderingInfo info = canvas.getRenderingInfo();
PlotRenderingInfo pinfo = info.getPlotInfo();
Point2D p = new Point2D.Double(e.getX(), e.getY());
if (pinfo.getDataArea().contains(p)) {
Plot plot = (Plot) zoomable;
// do not notify while zooming each axis
boolean notifyState = plot.isNotify();
plot.setNotify(false);
int clicks = (int) e.getDeltaY();
double zf = 1.0 + this.zoomFactor;
if (clicks < 0) {
zf = 1.0 / zf;
}
if (true) { //this.chartPanel.isDomainZoomable()) {
zoomable.zoomDomainAxes(zf, pinfo, p, true);
}
if (true) { //this.chartPanel.isRangeZoomable()) {
zoomable.zoomRangeAxes(zf, pinfo, p, true);
}
plot.setNotify(notifyState); // this generates the change event too
}
}
/**
* Handle the case where a plot implements the {@link Zoomable} interface.
*
* @param zoomable the zoomable plot.
* @param e the mouse wheel event.
*/
private void handleZoomable(ChartCanvas canvas, Zoomable zoomable,
ScrollEvent e) {
// don't zoom unless the mouse pointer is in the plot's data area
ChartRenderingInfo info = canvas.getRenderingInfo();
PlotRenderingInfo pinfo = info.getPlotInfo();
Point2D p = new Point2D.Double(e.getX(), e.getY());
if (pinfo.getDataArea().contains(p)) {
Plot plot = (Plot) zoomable;
// do not notify while zooming each axis
boolean notifyState = plot.isNotify();
plot.setNotify(false);
int clicks = (int) e.getDeltaY();
double zf = 1.0 + this.zoomFactor;
if (clicks < 0) {
zf = 1.0 / zf;
}
if (true) { //this.chartPanel.isDomainZoomable()) {
zoomable.zoomDomainAxes(zf, pinfo, p, true);
}
if (true) { //this.chartPanel.isRangeZoomable()) {
zoomable.zoomRangeAxes(zf, pinfo, p, true);
}
plot.setNotify(notifyState); // this generates the change event too
}
}
/**
* @param event Zooms in and out when the mouse is scrolled.
*/
public void onScrollHandler(ScrollEvent event) {
double delta = 1.2;
double scale = (plot.getScaleX());
if (event.getDeltaY() < 0) {
scale /= delta;
} else {
scale *= delta;
}
scale = clamp(scale, MIN_SCALE, MAX_SCALE);
plot.setScaleX(scale);
plot.setScaleY(scale);
event.consume();
}
/**
* Handle the case where a plot implements the {@link Zoomable} interface.
*
* @param zoomable the zoomable plot.
* @param e the mouse wheel event.
*/
private void handleZoomable(ChartCanvas canvas, Zoomable zoomable,
ScrollEvent e) {
// don't zoom unless the mouse pointer is in the plot's data area
ChartRenderingInfo info = canvas.getRenderingInfo();
PlotRenderingInfo pinfo = info.getPlotInfo();
Point2D p = new Point2D.Double(e.getX(), e.getY());
if (pinfo.getDataArea().contains(p)) {
Plot plot = (Plot) zoomable;
// do not notify while zooming each axis
boolean notifyState = plot.isNotify();
plot.setNotify(false);
int clicks = (int) e.getDeltaY();
double zf = 1.0 + this.zoomFactor;
if (clicks < 0) {
zf = 1.0 / zf;
}
if (true) { //this.chartPanel.isDomainZoomable()) {
zoomable.zoomDomainAxes(zf, pinfo, p, true);
}
if (true) { //this.chartPanel.isRangeZoomable()) {
zoomable.zoomRangeAxes(zf, pinfo, p, true);
}
plot.setNotify(notifyState); // this generates the change event too
}
}
/**
* @param event
* Zooms in and out when the mouse is scrolled.
*/
public void onScrollHandler(ScrollEvent event) {
double delta = 1.2;
double scale = (plot.getScaleX());
if (event.getDeltaY() < 0) {
scale /= delta;
} else {
scale *= delta;
}
scale = clamp(scale, MIN_SCALE, MAX_SCALE);
plot.setScaleX(scale);
plot.setScaleY(scale);
event.consume();
}
@Override
public void handleScroll(ChartCanvas canvas, ScrollEvent e) {
JFreeChart chart = canvas.getChart();
if (chart == null) {
return;
}
Plot plot = chart.getPlot();
if (plot instanceof Zoomable) {
Zoomable zoomable = (Zoomable) plot;
handleZoomable(canvas, zoomable, e);
}
else if (plot instanceof PiePlot) {
PiePlot pp = (PiePlot) plot;
pp.handleMouseWheelRotation((int) e.getDeltaY());
}
}
/** Zoom in/out triggered by mouse wheel
* @param event Scroll event
*/
protected void wheelZoom(final ScrollEvent event)
{
// Invoked by mouse scroll wheel.
// Only allow zoom (with control), not pan.
if (! event.isControlDown())
return;
if (event.getDeltaY() > 0)
zoomInOut(event.getX(), event.getY(), 1.0/ZOOM_FACTOR);
else if (event.getDeltaY() < 0)
zoomInOut(event.getX(), event.getY(), ZOOM_FACTOR);
else
return;
event.consume();
}
private C cellForItem(T item) {
C cell = cellPool.getCell(item);
// apply CSS when the cell is first added to the scene
Node node = cell.getNode();
EventStreams.nonNullValuesOf(node.sceneProperty())
.subscribeForOne(scene -> {
node.applyCss();
});
// Make cell initially invisible.
// It will be made visible when it is positioned.
node.setVisible(false);
if (cell.isReusable()) {
// if cell is reused i think adding event handler
// would cause resource leakage.
node.setOnScroll(this::pushScrollEvent);
node.setOnScrollStarted(this::pushScrollEvent);
node.setOnScrollFinished(this::pushScrollEvent);
} else {
node.addEventHandler(ScrollEvent.ANY, this::pushScrollEvent);
}
return cell;
}
/**
* Handle the case where a plot implements the {@link Zoomable} interface.
*
* @param zoomable the zoomable plot.
* @param e the mouse wheel event.
*/
private void handleZoomable(TaChartCanvas canvas, Zoomable zoomable,
ScrollEvent e) {
// don't zoom unless the mouse pointer is in the plot's org.sjwimmer.tacharting.data area
ChartRenderingInfo info = canvas.getRenderingInfo();
PlotRenderingInfo pinfo = info.getPlotInfo();
Point2D p = new Point2D.Double(e.getX(), e.getY());
if (pinfo.getDataArea().contains(p)) {
Plot plot = (Plot) zoomable;
// do not notify while zooming each axis
boolean notifyState = plot.isNotify();
plot.setNotify(false);
int clicks = (int) e.getDeltaY();
double zf = 1.0 + this.zoomFactor;
if (clicks < 0) {
zf = 1.0 / zf;
}
if (canvas.isDomainZoomable()) {
zoomable.zoomDomainAxes(zf, pinfo, p, true);
}
if (canvas.isRangeZoomable()) {
zoomable.zoomRangeAxes(zf, pinfo, p, true);
}
plot.setNotify(notifyState); // this generates the change event too
}
}
private void registerListeners() {
widthProperty().addListener(o -> resize());
heightProperty().addListener(o -> resize());
sceneProperty().addListener(o -> {
if (!locations.isEmpty()) { addShapesToScene(locations.values()); }
if (isZoomEnabled()) { getScene().addEventFilter( ScrollEvent.ANY, new WeakEventHandler<>(_scrollEventHandler)); }
locations.addListener((MapChangeListener<Location, Shape>) CHANGE -> {
if (CHANGE.wasAdded()) {
addShapesToScene(CHANGE.getValueAdded());
} else if(CHANGE.wasRemoved()) {
Platform.runLater(() -> pane.getChildren().remove(CHANGE.getValueRemoved()));
}
});
});
}
/**
* Enables handling of scroll and mouse wheel events for the node.
* This type of events has a peculiarity on Windows. See the javadoc of notifyScrollEvents for more information.
* @see #notifyScrollEvent
* @param intersectionTestFunc a function that takes an event object and must return boolean
* @return itself to let you use a chain of calls
*/
public MouseEventNotificator setOnScrollListener(Function<NativeMouseWheelEvent, Boolean> intersectionTestFunc) {
if (SystemUtils.IS_OS_WINDOWS) {
if (!GlobalScreen.isNativeHookRegistered()) {
try {
GlobalScreen.registerNativeHook();
} catch (NativeHookException | UnsatisfiedLinkError e) {
e.printStackTrace();
Main.log("Failed to initialize the native hooking. Rolling back to using JavaFX events...");
sender.addEventFilter(ScrollEvent.SCROLL, this::notifyScrollEvent);
return this;
}
}
mouseWheelListener = event -> notifyScrollEvent(event, intersectionTestFunc);
GlobalScreen.addNativeMouseWheelListener(mouseWheelListener);
} else {
sender.addEventFilter(ScrollEvent.SCROLL, this::notifyScrollEvent);
}
return this;
}
/**
* Handle the case where a plot implements the {@link Zoomable} interface.
*
* @param zoomable the zoomable plot.
* @param e the mouse wheel event.
*/
private void handleZoomable(ChartCanvas canvas, Zoomable zoomable,
ScrollEvent e) {
// don't zoom unless the mouse pointer is in the plot's data area
ChartRenderingInfo info = canvas.getRenderingInfo();
PlotRenderingInfo pinfo = info.getPlotInfo();
Point2D p = new Point2D.Double(e.getX(), e.getY());
if (pinfo.getDataArea().contains(p)) {
Plot plot = (Plot) zoomable;
// do not notify while zooming each axis
boolean notifyState = plot.isNotify();
plot.setNotify(false);
int clicks = (int) e.getDeltaY();
double zf = 1.0 + this.zoomFactor;
if (clicks < 0) {
zf = 1.0 / zf;
}
if (true) { //this.chartPanel.isDomainZoomable()) {
zoomable.zoomDomainAxes(zf, pinfo, p, true);
}
if (true) { //this.chartPanel.isRangeZoomable()) {
zoomable.zoomRangeAxes(zf, pinfo, p, true);
}
plot.setNotify(notifyState); // this generates the change event too
}
}
private void setupListeners() {
ObjectProperty<Point2D> mouseDown = new SimpleObjectProperty<>();
EventStreams.eventsOf(imageView, MouseEvent.MOUSE_PRESSED).subscribe(e -> {
Point2D mousePress = imageViewToImage(new Point2D(e.getX(), e.getY()));
mouseDown.set(mousePress);
});
EventStreams.eventsOf(imageView, MouseEvent.MOUSE_DRAGGED).subscribe(e -> {
Point2D dragPoint = imageViewToImage(new Point2D(e.getX(), e.getY()));
shift(dragPoint.subtract(mouseDown.get()));
mouseDown.set(imageViewToImage(new Point2D(e.getX(), e.getY())));
});
EventStream<ScrollEvent> scrollEvents = EventStreams.eventsOf(imageView, ScrollEvent.SCROLL);
EventStream<ScrollEvent> scrollEventsUp = scrollEvents.filter(scrollEvent -> scrollEvent.getDeltaY() < 0);
EventStream<ScrollEvent> scrollEventsDown = scrollEvents.filter(scrollEvent -> scrollEvent.getDeltaY() > 0);
scrollEventsUp.subscribe(scrollEvent -> scale = Math.min(scale + 0.25, 3));
scrollEventsDown.subscribe(scrollEvent -> scale = Math.max(scale - 0.25, 0.25));
EventStreams.merge(scrollEventsUp, scrollEventsDown).subscribe(scrollEvent -> scaleImageViewport(scale));
EventStreams.eventsOf(imageView, MouseEvent.MOUSE_CLICKED)
.filter(mouseEvent -> mouseEvent.getClickCount() == 2)
.subscribe(mouseEvent -> fitToView());
}
/**
*
* @param viewer
* The {@link IViewer}
* @return An {@link EventHandler} for {@link ScrollEvent}.
*/
protected EventHandler<ScrollEvent> createScrollFilter(
final IViewer viewer) {
return new EventHandler<ScrollEvent>() {
@Override
public void handle(ScrollEvent event) {
if (!(event.getTarget() instanceof Node)
|| PartUtils.retrieveViewer(getDomain(),
(Node) event.getTarget()) != viewer) {
return;
}
playFinishDelayTransition(viewer);
if (!inScroll.contains(viewer)) {
inScroll.add(viewer);
scrollStarted(viewer, event);
} else {
scroll(viewer, event);
}
}
};
}
/**
* Handle the case where a plot implements the {@link Zoomable} interface.
*
* @param zoomable the zoomable plot.
* @param e the mouse wheel event.
*/
private void handleZoomable(ChartCanvas canvas, Zoomable zoomable,
ScrollEvent e) {
// don't zoom unless the mouse pointer is in the plot's data area
ChartRenderingInfo info = canvas.getRenderingInfo();
PlotRenderingInfo pinfo = info.getPlotInfo();
Point2D p = new Point2D.Double(e.getX(), e.getY());
if (pinfo.getDataArea().contains(p)) {
Plot plot = (Plot) zoomable;
// do not notify while zooming each axis
boolean notifyState = plot.isNotify();
plot.setNotify(false);
int clicks = (int) e.getDeltaY();
double zf = 1.0 + this.zoomFactor;
if (clicks < 0) {
zf = 1.0 / zf;
}
if (true) { //this.chartPanel.isDomainZoomable()) {
zoomable.zoomDomainAxes(zf, pinfo, p, true);
}
if (true) { //this.chartPanel.isRangeZoomable()) {
zoomable.zoomRangeAxes(zf, pinfo, p, true);
}
plot.setNotify(notifyState); // this generates the change event too
}
}
/**
* Handles a scroll event by passing it on to the registered handlers.
*
* @param e the scroll event.
*/
protected void handleScroll(ScrollEvent e) {
if (this.liveHandler != null && this.liveHandler.isEnabled()) {
this.liveHandler.handleScroll(this, e);
}
for (MouseHandlerFX handler: this.auxiliaryMouseHandlers) {
if (handler.isEnabled()) {
handler.handleScroll(this, e);
}
}
}
/**
* Handles a scroll event. This implementation does nothing, override the method if required.
*
* @param canvas the canvas ({@code null} not permitted).
* @param e the event ({@code null} not permitted).
*/
@Override
public void handleScroll(ChartCanvas chartPanel, ScrollEvent eOrig) {
if (gestureHandlers == null || gestureHandlers.isEmpty() || !listensFor(Event.MOUSE_WHEEL))
return;
MouseEventWrapper e = new MouseEventWrapper(eOrig);
ChartEntity entity = findChartEntity(e);
ChartGesture.Entity gestureEntity = ChartGesture.getGestureEntity(entity);
GestureButton button = GestureButton.getButton(e.getButton());
// handle event
handleEvent(new ChartGestureEvent(cw, e, entity,
new ChartGesture(gestureEntity, Event.MOUSE_WHEEL, button)));
}
public void speedUpScroll() {
// final IntegerProperty vValueProperty = new SimpleIntegerProperty(0);
// final int steps = 20;
//
// scrollPane.vvalueProperty().bind(vValueProperty);
//
// scrollPane.setOnSwipeDown(new EventHandler<GestureEvent>() {
//
// public void handle(GestureEvent event) {
// // calculate the needed value here
// vValueProperty.set(vValueProperty.get() + steps);
// }
// });
scrollPane.setContent(innerVBox);
innerVBox.setOnScroll(new EventHandler<ScrollEvent>() {
@Override
public void handle(ScrollEvent event) {
// deltaY makes the scrolling a bit faster
double deltaY = event.getDeltaY()*150;
double width = scrollPane.getContent().getBoundsInLocal().getWidth();
double vvalue = scrollPane.getVvalue();
scrollPane.setVvalue(vvalue + -deltaY/width);
// deltaY/width to make the scrolling equally fast regardless of the actual width of the component
}
});
}
private VirtualFlow(
ObservableList<T> items,
Function<? super T, ? extends C> cellFactory,
OrientationHelper orientation,
Gravity gravity) {
this.getStyleClass().add("virtual-flow");
this.items = items;
this.orientation = orientation;
this.cellListManager = new CellListManager<>(this, items, cellFactory);
this.gravity.set(gravity);
MemoizationList<C> cells = cellListManager.getLazyCellList();
this.sizeTracker = new SizeTracker(orientation, layoutBoundsProperty(), cells);
this.cellPositioner = new CellPositioner<>(cellListManager, orientation, sizeTracker);
this.navigator = new Navigator<>(cellListManager, cellPositioner, orientation, this.gravity, sizeTracker);
getChildren().add(navigator);
clipProperty().bind(Val.map(
layoutBoundsProperty(),
b -> new Rectangle(b.getWidth(), b.getHeight())));
lengthOffsetEstimate = sizeTracker.lengthOffsetEstimateProperty().asVar(this::setLengthOffset);
// scroll content by mouse scroll
this.addEventHandler(ScrollEvent.ANY, se -> {
scrollXBy(-se.getDeltaX());
scrollYBy(-se.getDeltaY());
se.consume();
});
}
private void registerMouseHandlers() {
registerInputEventHandler(MouseEvent.MOUSE_PRESSED, zoomInStartHandler);
registerInputEventHandler(MouseEvent.MOUSE_DRAGGED, zoomInDragHandler);
registerInputEventHandler(MouseEvent.MOUSE_RELEASED, zoomInEndHandler);
registerInputEventHandler(MouseEvent.MOUSE_CLICKED, zoomOutHandler);
registerInputEventHandler(MouseEvent.MOUSE_CLICKED, zoomOriginHandler);
registerInputEventHandler(ScrollEvent.SCROLL, zoomScrollHandler);
registerInputEventHandler(MouseEvent.MOUSE_PRESSED, panStartHandler);
registerInputEventHandler(MouseEvent.MOUSE_DRAGGED, panDragHandler);
registerInputEventHandler(MouseEvent.MOUSE_RELEASED, panEndHandler);
}
/**
* Handles a scroll event by passing it on to the registered handlers.
*
* @param e the scroll event.
*/
protected void handleScroll(ScrollEvent e) {
if (this.liveHandler != null && this.liveHandler.isEnabled()) {
this.liveHandler.handleScroll(this, e);
}
for (MouseHandlerFX handler: this.auxiliaryMouseHandlers) {
if (handler.isEnabled()) {
handler.handleScroll(this, e);
}
}
}
/**
* Handles a scroll event by passing it on to the registered handlers.
*
* @param e the scroll event.
*/
protected void handleScroll(ScrollEvent e) {
if (this.liveHandler != null && this.liveHandler.isEnabled()) {
this.liveHandler.handleScroll(this, e);
}
for (MouseHandlerFX handler: this.auxiliaryMouseHandlers) {
if (handler.isEnabled()) {
handler.handleScroll(this, e);
}
}
}
/**
* Handle the case where a plot implements the {@link Zoomable} interface.
*
* @param canvas the chart canvas.
* @param zoomable the zoomable plot.
* @param e the mouse wheel event.
*/
private void handleZoomable(ChartCanvas canvas, Zoomable zoomable,
ScrollEvent e) {
if (canvas.getChart() == null) {
return;
}
// don't zoom unless the mouse pointer is in the plot's data area
ChartRenderingInfo info = canvas.getRenderingInfo();
PlotRenderingInfo pinfo = info.getPlotInfo();
Point2D p = new Point2D.Double(e.getX(), e.getY());
if (pinfo.getDataArea().contains(p)) {
Plot plot = (Plot) zoomable;
// do not notify while zooming each axis
boolean notifyState = plot.isNotify();
plot.setNotify(false);
int clicks = (int) e.getDeltaY();
double zf = 1.0 + this.zoomFactor;
if (clicks < 0) {
zf = 1.0 / zf;
}
if (canvas.isDomainZoomable()) {
zoomable.zoomDomainAxes(zf, pinfo, p, true);
}
if (canvas.isRangeZoomable()) {
zoomable.zoomRangeAxes(zf, pinfo, p, true);
}
plot.setNotify(notifyState); // this generates the change event too
}
}
public static <T extends Node & IPannablePane> PanningGestures<T> attachViewPortGestures(T pannableCanvas, boolean configurable) {
PanningGestures<T> panningGestures = new PanningGestures<>(pannableCanvas);
if (configurable) {
panningGestures.useViewportGestures = new SimpleBooleanProperty(true);
panningGestures.useViewportGestures.addListener((o, oldVal, newVal) -> {
final Parent parent = pannableCanvas.parentProperty().get();
if (parent == null) {
return;
}
if (newVal) {
parent.addEventHandler(MouseEvent.MOUSE_PRESSED, panningGestures.onMousePressedEventHandler);
parent.addEventHandler(MouseEvent.MOUSE_DRAGGED, panningGestures.onMouseDraggedEventHandler);
parent.addEventHandler(ScrollEvent.ANY, panningGestures.onScrollEventHandler);
} else {
parent.removeEventHandler(MouseEvent.MOUSE_PRESSED, panningGestures.onMousePressedEventHandler);
parent.removeEventHandler(MouseEvent.MOUSE_DRAGGED, panningGestures.onMouseDraggedEventHandler);
parent.removeEventHandler(ScrollEvent.ANY, panningGestures.onScrollEventHandler);
}
});
}
pannableCanvas.parentProperty().addListener((o, oldVal, newVal) -> {
if (oldVal != null) {
oldVal.removeEventHandler(MouseEvent.MOUSE_PRESSED, panningGestures.onMousePressedEventHandler);
oldVal.removeEventHandler(MouseEvent.MOUSE_DRAGGED, panningGestures.onMouseDraggedEventHandler);
oldVal.removeEventHandler(ScrollEvent.ANY, panningGestures.onScrollEventHandler);
}
if (newVal != null) {
newVal.addEventHandler(MouseEvent.MOUSE_PRESSED, panningGestures.onMousePressedEventHandler);
newVal.addEventHandler(MouseEvent.MOUSE_DRAGGED, panningGestures.onMouseDraggedEventHandler);
newVal.addEventHandler(ScrollEvent.ANY, panningGestures.onScrollEventHandler);
}
});
return panningGestures;
}
@Override
public void handleScroll(ChartCanvas canvas, ScrollEvent e) {
JFreeChart chart = canvas.getChart();
Plot plot = chart.getPlot();
if (plot instanceof Zoomable) {
Zoomable zoomable = (Zoomable) plot;
handleZoomable(canvas, zoomable, e);
}
else if (plot instanceof PiePlot) {
PiePlot pp = (PiePlot) plot;
pp.handleMouseWheelRotation((int) e.getDeltaY());
}
}
/**
* Removes all event listeners that were set earlier.
*/
public void cleanListeners() {
// All methods have their own internal checks for the case when a filter is not set and equals null.
sender.removeEventFilter(MouseEvent.MOUSE_CLICKED, this::notifyClickEvent);
sender.removeEventFilter(ScrollEvent.SCROLL, this::notifyScrollEvent);
if (SystemUtils.IS_OS_WINDOWS) {
GlobalScreen.removeNativeMouseWheelListener(mouseWheelListener);
}
}
/**
* Handles a scroll event by passing it on to the registered handlers.
*
* @param e the scroll event.
*/
protected void handleScroll(ScrollEvent e) {
if (this.liveHandler != null && this.liveHandler.isEnabled()) {
this.liveHandler.handleScroll(this, e);
}
for (MouseHandlerFX handler: this.auxiliaryMouseHandlers) {
if (handler.isEnabled()) {
handler.handleScroll(this, e);
}
}
}
@Override
public void handleScroll(ChartCanvas canvas, ScrollEvent e) {
JFreeChart chart = canvas.getChart();
Plot plot = chart.getPlot();
if (plot instanceof Zoomable) {
Zoomable zoomable = (Zoomable) plot;
handleZoomable(canvas, zoomable, e);
}
else if (plot instanceof PiePlot) {
PiePlot pp = (PiePlot) plot;
pp.handleMouseWheelRotation((int) e.getDeltaY());
}
}
@Override
public void handleScroll(ChartCanvas canvas, ScrollEvent e) {
JFreeChart chart = canvas.getChart();
Plot plot = chart.getPlot();
if (plot instanceof Zoomable) {
Zoomable zoomable = (Zoomable) plot;
handleZoomable(canvas, zoomable, e);
}
else if (plot instanceof PiePlot) {
PiePlot pp = (PiePlot) plot;
pp.handleMouseWheelRotation((int) e.getDeltaY());
}
}
/**
* Handles a scroll event by passing it on to the registered handlers.
*
* @param e the scroll event.
*/
protected void handleScroll(ScrollEvent e) {
if (this.liveHandler != null && this.liveHandler.isEnabled()) {
this.liveHandler.handleScroll(this, e);
}
for (MouseHandlerFX handler: this.auxiliaryMouseHandlers) {
if (handler.isEnabled()) {
handler.handleScroll(this, e);
}
}
}