Class MouseWheelZoomTool
java.lang.Object
com.levigo.jadice.web.client.tool.Tool
com.levigo.jadice.web.client.tools.MouseWheelZoomTool
- All Implemented Interfaces:
MenuContributor
Advanced MouseWheelZoom with better algorithm. Zooms in/out when the mouse wheel is rotated and
the CTRL or ALT button is pressed. The zoom factor is multiplied with 1.45 for each rotation.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.levigo.jadice.web.client.tool.Tool
Tool.ActivationRequest
-
Field Summary
Fields inherited from class com.levigo.jadice.web.client.tool.Tool
DEFAULT_PRIORITY, MAX_PRIORITY, MIN_PRIORITY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected int
Return the dispatch priority for this tool.protected void
handleMouseWheelMoved
(MouseWheelEditEvent e, boolean isActive) Invoked when the mouse wheel is rotated.Methods inherited from class com.levigo.jadice.web.client.tool.Tool
contribute, ensureDebugId, getActivationFeedback, getActivationFeedback, getActivationRequest, getActivationRequestForKeyPressed, getActivationRequestForMouseDragged, getActivationRequestForMousePressed, getActivationRequestForTouchMove, getActivationRequestForTouchStart, getManager, getRenderPriority, handleEditEvent, handleGestureChange, handleGestureEnd, handleGestureStart, handleKeyPressed, handleKeyReleased, handleKeyTyped, handleMouseClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseMoved, handleMousePressed, handleMouseReleased, handlePointerDown, handlePointerMove, handlePointerUp, handleTouchEnd, handleTouchMove, handleTouchStart, propagatePropertyChange, render, setActive, setCursor, setCursor, setEnabled, setManager, setStatusFeedback
-
Constructor Details
-
MouseWheelZoomTool
public MouseWheelZoomTool()
-
-
Method Details
-
handleMouseWheelMoved
Description copied from class:Tool
Invoked when the mouse wheel is rotated.- Overrides:
handleMouseWheelMoved
in classTool
- Parameters:
e
- theMouseEditEvent
isActive
- whether this tool is currently active
-
getDispatchPriority
protected int getDispatchPriority()Description copied from class:Tool
Return the dispatch priority for this tool. Tools with higher dispatch priorities receive events earlier than tools with lower priorities. The priority should be in the rangeTool.MIN_PRIORITY
...Tool.MAX_PRIORITY
. The default priority is equal toTool.MAX_PRIORITY
minus the render priority.- Overrides:
getDispatchPriority
in classTool
- Returns:
- the dispatch priority
-