Package org.jfree.chart
Class MouseWheelHandler
java.lang.Object
org.jfree.chart.MouseWheelHandler
- All Implemented Interfaces:
MouseWheelListener
,Serializable
,EventListener
A class that handles mouse wheel events for the
ChartPanel
class.- See Also:
-
Constructor Summary
ConstructorDescriptionMouseWheelHandler
(ChartPanel chartPanel) Creates a new instance for the specified chart panel. -
Method Summary
Modifier and TypeMethodDescriptiondouble
Returns the current zoom factor.void
Handles a mouse wheel event from the underlying chart panel.void
setZoomFactor
(double zoomFactor) Sets the zoom factor.
-
Constructor Details
-
MouseWheelHandler
Creates a new instance for the specified chart panel.- Parameters:
chartPanel
- the chart panel (null
not permitted).
-
-
Method Details
-
getZoomFactor
Returns the current zoom factor. The default value is 0.10 (ten percent).- Returns:
- The zoom factor.
- See Also:
-
setZoomFactor
Sets the zoom factor.- Parameters:
zoomFactor
- the zoom factor.- See Also:
-
mouseWheelMoved
Handles a mouse wheel event from the underlying chart panel.- Specified by:
mouseWheelMoved
in interfaceMouseWheelListener
- Parameters:
e
- the event.
-