Class KeyboardNavigationTool
java.lang.Object
com.levigo.jadice.web.client.tool.Tool
com.levigo.jadice.web.client.tools.KeyboardNavigationTool
- All Implemented Interfaces:
MenuContributor
This tool allows to navigate with the arrow keys (up, down, left, right)
within the viewer. As you would expect, each keystroke scrolls a little bit
down/up/left/right.
-
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 TypeMethodDescriptionint
The distance to navigate with a single keystroke.protected void
handleKeyPressed
(KeyEditEvent e, boolean isActive) Invoked when a key has been pressed.void
setIncrement
(int increment) Sets the distance to navigate with a single keystroke.Methods inherited from class com.levigo.jadice.web.client.tool.Tool
contribute, ensureDebugId, getActivationFeedback, getActivationFeedback, getActivationRequest, getActivationRequestForKeyPressed, getActivationRequestForMouseDragged, getActivationRequestForMousePressed, getActivationRequestForTouchMove, getActivationRequestForTouchStart, getDispatchPriority, getManager, getRenderPriority, handleEditEvent, handleGestureChange, handleGestureEnd, handleGestureStart, handleKeyReleased, handleKeyTyped, handleMouseClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseMoved, handleMousePressed, handleMouseReleased, handleMouseWheelMoved, handlePointerDown, handlePointerMove, handlePointerUp, handleTouchEnd, handleTouchMove, handleTouchStart, propagatePropertyChange, render, setActive, setCursor, setCursor, setEnabled, setManager, setStatusFeedback
-
Constructor Details
-
KeyboardNavigationTool
public KeyboardNavigationTool()
-
-
Method Details
-
handleKeyPressed
Description copied from class:Tool
Invoked when a key has been pressed. See the class description forKeyEvent
for a definition of a key pressed event.- Overrides:
handleKeyPressed
in classTool
- Parameters:
e
- theMouseEditEvent
isActive
- whether this tool is currently active
-
getIncrement
public int getIncrement()The distance to navigate with a single keystroke. -
setIncrement
public void setIncrement(int increment) Sets the distance to navigate with a single keystroke.
-