Class SetCurrentPageTool
java.lang.Object
com.levigo.jadice.web.client.tool.Tool
com.levigo.jadice.web.client.tools.SetCurrentPageTool
- All Implemented Interfaces:
MenuContributor
This tool allows to jump to a specific page. It is used by the
ThumbnailView
to set the
current page when the user clicks on the thumbnails.
The default behavior is to jump to the page if the user double clicks the page with the left mouse button.
The click count can be configured via setActivationClickCount(int)
.
-
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
Returns the current activation click count (left mouse button).protected void
handleKeyPressed
(KeyEditEvent e, boolean isActive) Invoked when a key has been pressed.protected void
handleMouseClicked
(MouseEditEvent e, boolean isActive) Invoked when the mouse button has been clicked (pressed and released) on a component.protected void
handleTouchStart
(TouchEditEvent e, boolean isActive) Invoked when a touch started.void
setActivationClickCount
(int activationClickCount) Sets the activation click count to the desired value.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, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseMoved, handleMousePressed, handleMouseReleased, handleMouseWheelMoved, handlePointerDown, handlePointerMove, handlePointerUp, handleTouchEnd, handleTouchMove, propagatePropertyChange, render, setActive, setCursor, setCursor, setEnabled, setManager, setStatusFeedback
-
Constructor Details
-
SetCurrentPageTool
public SetCurrentPageTool()
-
-
Method Details
-
handleMouseClicked
Description copied from class:Tool
Invoked when the mouse button has been clicked (pressed and released) on a component.- Overrides:
handleMouseClicked
in classTool
- Parameters:
e
- theMouseEditEvent
isActive
- whether this tool is currently active
-
handleTouchStart
Description copied from class:Tool
Invoked when a touch started.- Overrides:
handleTouchStart
in classTool
- Parameters:
e
- theTouchEditEvent
isActive
- whether this tool is currently active
-
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
-
getActivationClickCount
public int getActivationClickCount()Returns the current activation click count (left mouse button).- Returns:
- the click count
-
setActivationClickCount
public void setActivationClickCount(int activationClickCount) Sets the activation click count to the desired value.Default: 2 (double click with left mouse button)
- Parameters:
activationClickCount
- how many left mouse button hits count as "click"?
-