- java.lang.Object
-
- org.jfree.chart.swing.MouseWheelHandler
-
- All Implemented Interfaces:
MouseWheelListener,Serializable,EventListener
public class MouseWheelHandler extends Object implements MouseWheelListener, Serializable
A class that handles mouse wheel events for theChartPanelclass.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MouseWheelHandler(ChartPanel chartPanel)Creates a new instance for the specified chart panel.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetZoomFactor()Returns the current zoom factor.voidmouseWheelMoved(MouseWheelEvent e)Handles a mouse wheel event from the underlying chart panel.voidsetZoomFactor(double zoomFactor)Sets the zoom factor.
-
-
-
Constructor Detail
-
MouseWheelHandler
public MouseWheelHandler(ChartPanel chartPanel)
Creates a new instance for the specified chart panel.- Parameters:
chartPanel- the chart panel (nullnot permitted).
-
-
Method Detail
-
getZoomFactor
public double getZoomFactor()
Returns the current zoom factor. The default value is 0.10 (ten percent).- Returns:
- The zoom factor.
- See Also:
setZoomFactor(double)
-
setZoomFactor
public void setZoomFactor(double zoomFactor)
Sets the zoom factor.- Parameters:
zoomFactor- the zoom factor.- See Also:
getZoomFactor()
-
mouseWheelMoved
public void mouseWheelMoved(MouseWheelEvent e)
Handles a mouse wheel event from the underlying chart panel.- Specified by:
mouseWheelMovedin interfaceMouseWheelListener- Parameters:
e- the event.
-
-