Class ScalingMouseWheelListener
java.lang.Object
org.eclipse.nebula.widgets.nattable.ui.scaling.ScalingMouseWheelListener
- All Implemented Interfaces:
EventListener
,org.eclipse.swt.events.MouseWheelListener
,org.eclipse.swt.internal.SWTEventListener
public class ScalingMouseWheelListener
extends Object
implements org.eclipse.swt.events.MouseWheelListener
A
MouseWheelListener
that can be added to a NatTable instance to
support zoom operations while having the CTRL key pressed and the mousewheel
scrolled. Will support 12 dpi min and 288 dpi max.
To support zooming of images (e.g. checkboxes) the registration of the ImagePainter need to be overriden in updatePainter().
- Since:
- 2.0
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a newScalingMouseWheelListener
without an updater.ScalingMouseWheelListener
(Consumer<IConfigRegistry> updater) Creates a newScalingMouseWheelListener
with the given updater. -
Method Summary
-
Constructor Details
-
ScalingMouseWheelListener
public ScalingMouseWheelListener()Creates a newScalingMouseWheelListener
without an updater.Note:
Without an updater manually registered painters will not be updated and therefore won't reflect the updated scaling. This only works in combination with theme styling, as the painter update is implemented in the themes internally. -
ScalingMouseWheelListener
Creates a newScalingMouseWheelListener
with the given updater.- Parameters:
updater
- The updater that should be called on zoom operations. Needed to reflect the updated scaling. E.g. re-register ImagePainters like the CheckBoxPainter, otherwise the images will not be updated according to the scaling.
-
-
Method Details
-
mouseScrolled
public void mouseScrolled(org.eclipse.swt.events.MouseEvent e) - Specified by:
mouseScrolled
in interfaceorg.eclipse.swt.events.MouseWheelListener
-