Class PanForceMouseTool
java.lang.Object
com.levigo.jadice.web.client.tool.Tool
com.levigo.jadice.web.client.tools.PanForceTool
com.levigo.jadice.web.client.tools.PanForceMouseTool
- All Implemented Interfaces:
MenuContributor
A tool for scrolling by pressing the left mouse button and moving the mouse.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.levigo.jadice.web.client.tools.PanForceTool
PanForceTool.PanForceGesture
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.tools.PanForceTool
ACTIVATION_VOTE, HAND_CURSOR, modifierAndButtonMask, MODIFIERS_ONLY_MASK, useIdlePanModeCursor
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 Tool.ActivationRequest
Provide feedback for the user about what would happen, if the mouse were pressed at the current location.protected Tool.ActivationRequest
Return the auto-activation request for this this tool in response to the given mouse press.protected void
handleMouseDragged
(MouseEditEvent e, boolean isActive) Invoked when a mouse button is pressed on a component and then dragged.protected void
handleMousePressed
(MouseEditEvent e, boolean isActive) Invoked when a mouse button has been pressed on a component.protected void
handleMouseReleased
(MouseEditEvent e, boolean isActive) Invoked when a mouse button has been released on a component.Methods inherited from class com.levigo.jadice.web.client.tools.PanForceTool
getDispatchPriority, getModifierAndButtonMask, handleEditEvent, isUseIdlePanModeCursor, setModifierAndButtonMask, setUseIdlePanModeCursor
Methods inherited from class com.levigo.jadice.web.client.tool.Tool
contribute, ensureDebugId, getActivationFeedback, getActivationRequest, getActivationRequestForKeyPressed, getActivationRequestForMouseDragged, getActivationRequestForTouchMove, getActivationRequestForTouchStart, getManager, getRenderPriority, handleGestureChange, handleGestureEnd, handleGestureStart, handleKeyPressed, handleKeyReleased, handleKeyTyped, handleMouseClicked, handleMouseEntered, handleMouseExited, handleMouseMoved, handleMouseWheelMoved, handlePointerDown, handlePointerMove, handlePointerUp, handleTouchEnd, handleTouchMove, handleTouchStart, propagatePropertyChange, render, setActive, setCursor, setCursor, setEnabled, setManager, setStatusFeedback
-
Constructor Details
-
PanForceMouseTool
public PanForceMouseTool()
-
-
Method Details
-
handleMouseDragged
Description copied from class:Tool
Invoked when a mouse button is pressed on a component and then dragged.MOUSE_DRAGGED
events will continue to be delivered to the component where the drag originated until the mouse button is released (regardless of whether the mouse position is within the bounds of the component).Due to platform-dependent DragDrop implementations,
MouseDragEvent
events may not be delivered during a native Drag&Drop operation.- Overrides:
handleMouseDragged
in classTool
- Parameters:
e
- the eventisActive
- whether this tool is currently active
-
handleMouseReleased
Description copied from class:Tool
Invoked when a mouse button has been released on a component.- Overrides:
handleMouseReleased
in classTool
- Parameters:
e
- the eventisActive
- whether this tool is currently active
-
handleMousePressed
Description copied from class:Tool
Invoked when a mouse button has been pressed on a component.- Overrides:
handleMousePressed
in classTool
- Parameters:
e
- the eventisActive
- whether this tool is currently active
-
getActivationFeedback
Description copied from class:Tool
Provide feedback for the user about what would happen, if the mouse were pressed at the current location. This method is called while handlingMouseMoveEvent
s. If this method returnsnull
no feedback is provided at all. The activation request returned from this method is the same object that is used duringTool.getActivationRequestForKeyPressed(KeyEditEvent)
to signal the auto-activation candidacy. This method should only return an activation request if it will actually candidate for auto-activation later on usingTool.getActivationRequestForMousePressed(MouseEditEvent)
orTool.getActivationRequestForMouseDragged(MouseEditEvent)
.- Overrides:
getActivationFeedback
in classTool
- Parameters:
e
- theMouseEditEvent
- Returns:
- the
Tool.ActivationRequest
-
getActivationRequestForMousePressed
Description copied from class:Tool
Return the auto-activation request for this this tool in response to the given mouse press. If the tool returns anTool.ActivationRequest
, it becomes eligible for auto-activation. However, the final decision about which tool will actually be activated is up to theToolActivationPolicy
used be the tool manager.- Overrides:
getActivationRequestForMousePressed
in classTool
- Parameters:
e
- theKeyEditEvent
- Returns:
- an
Tool.ActivationRequest
ornull
if the tool does not seek to be auto-activated at this time.
-