Package it.tidalwave.image.render
Class MouseWheelZoomingController
- java.lang.Object
-
- it.tidalwave.image.render.MouseWheelZoomingController
-
public class MouseWheelZoomingController extends java.lang.Object
This class zooms listening to the mouse wheel.- Author:
- Fabrizio Giudici
-
-
Constructor Summary
Constructors Constructor Description MouseWheelZoomingController(ScaleController scaleController)
Creates a new instance of this class, attached to aScaleController
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getZoomFactor()
boolean
isEnabled()
Returns true if the controller is enabled.void
setEnabled(boolean enabled)
Enables or disables this controller.void
setZoomFactor(double zoomFactor)
-
-
-
Constructor Detail
-
MouseWheelZoomingController
public MouseWheelZoomingController(ScaleController scaleController)
Creates a new instance of this class, attached to aScaleController
. This controller must be activated withsetEnabled(true)
in order to be used.- Parameters:
scaleController
- the scale controller
-
-
Method Detail
-
setEnabled
public void setEnabled(boolean enabled)
Enables or disables this controller. As this class attaches some listeners to the image renderer component, it's advisable to disable it when it's not needed, in order to facilitate garbage collection.- Parameters:
enabled
- true if must be enabled, false otherwise
-
isEnabled
public boolean isEnabled()
Returns true if the controller is enabled.- Returns:
- true if enabled
-
setZoomFactor
public void setZoomFactor(double zoomFactor)
-
getZoomFactor
public double getZoomFactor()
-
-