Class ScrollHandlerFX

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 Details

    • ScrollHandlerFX

      public ScrollHandlerFX​(String id)
      Creates a new instance with the specified ID.
      Parameters:
      id - the handler ID (null not permitted).
  • Method Details

    • getZoomFactor

      public double getZoomFactor()
      Returns the zoom factor. The default value is 0.10 (ten percent).
      Returns:
      The zoom factor.
    • setZoomFactor

      public void setZoomFactor​(double zoomFactor)
      Sets the zoom factor (a percentage amount by which the mouse wheel movement will change the chart size).
      Parameters:
      zoomFactor - the zoom factor.
    • handleScroll

      public void handleScroll​(ChartCanvas canvas, javafx.scene.input.ScrollEvent e)
      Description copied from class: AbstractMouseHandlerFX
      Handles a scroll event. This implementation does nothing, override the method if required.
      Specified by:
      handleScroll in interface MouseHandlerFX
      Overrides:
      handleScroll in class AbstractMouseHandlerFX
      Parameters:
      canvas - the canvas (null not permitted).
      e - the event (null not permitted).