java.lang.Object
org.jfree.chart.fx.interaction.AbstractMouseHandlerFX
org.jfree.chart.fx.interaction.ScrollHandlerFX
- All Implemented Interfaces:
MouseHandlerFX
public class ScrollHandlerFX extends AbstractMouseHandlerFX implements MouseHandlerFX
Handles scroll events (mouse wheel etc) on a
ChartCanvas.-
Constructor Summary
Constructors Constructor Description ScrollHandlerFX(String id)Creates a new instance with the specified ID. -
Method Summary
Modifier and Type Method Description doublegetZoomFactor()Returns the zoom factor.voidhandleScroll(ChartCanvas canvas, javafx.scene.input.ScrollEvent e)Handles a scroll event.voidsetZoomFactor(double zoomFactor)Sets the zoom factor (a percentage amount by which the mouse wheel movement will change the chart size).Methods inherited from class org.jfree.chart.fx.interaction.AbstractMouseHandlerFX
getID, handleMouseClicked, handleMouseDragged, handleMouseMoved, handleMousePressed, handleMouseReleased, hasMatchingModifiers, isEnabled, setEnabledMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jfree.chart.fx.interaction.MouseHandlerFX
getID, handleMouseClicked, handleMouseDragged, handleMouseMoved, handleMousePressed, handleMouseReleased, hasMatchingModifiers, isEnabled
-
Constructor Details
-
ScrollHandlerFX
Creates a new instance with the specified ID.- Parameters:
id- the handler ID (nullnot permitted).
-
-
Method Details
-
getZoomFactor
Returns the zoom factor. The default value is 0.10 (ten percent).- Returns:
- The zoom factor.
-
setZoomFactor
Sets the zoom factor (a percentage amount by which the mouse wheel movement will change the chart size).- Parameters:
zoomFactor- the zoom factor.
-
handleScroll
Description copied from class:AbstractMouseHandlerFXHandles a scroll event. This implementation does nothing, override the method if required.- Specified by:
handleScrollin interfaceMouseHandlerFX- Overrides:
handleScrollin classAbstractMouseHandlerFX- Parameters:
canvas- the canvas (nullnot permitted).e- the event (nullnot permitted).
-