com.levigo.jadice.swing.pageview
Class MouseWheelTool

java.lang.Object
  extended by com.levigo.jadice.swing.tool.Tool
      extended by com.levigo.jadice.swing.pageview.MouseWheelTool
All Implemented Interfaces:
MenuContributor

public class MouseWheelTool
extends Tool

The MouseWheelTool is responsible for the page-level navigation using the mouse wheel. The mouse wheel is used to scroll the page view vertically and horizontally (depending on the wheel direction used). Optionally, in single and page spread layout modes, it can be used to skip to the previous/next page.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.levigo.jadice.swing.tool.Tool
Tool.ActivationRequest
 
Field Summary
 
Fields inherited from class com.levigo.jadice.swing.tool.Tool
DEFAULT_PRIORITY, MAX_PRIORITY, MIN_PRIORITY
 
Constructor Summary
MouseWheelTool()
           
 
Method Summary
protected  int getDispatchPriority()
          Return the dispatch priority for this tool.
protected  void handleMouseWheelMoved(MouseWheelEditEvent e, boolean isActive)
          Invoked when the mouse wheel is rotated.
 boolean isSkipPageAtTopAndBottom()
          Return whether to skip to the previous/next page if scrolling occurs while already scrolled to the top/bottom and using a single-page or spread layout.
 void setSkipPageAtTopAndBottom(boolean skipPageAtTopAndBottom)
          Set whether to skip to the previous/next page if scrolling occurs while already scrolled to the top/bottom and using a single-page or spread layout.
 
Methods inherited from class com.levigo.jadice.swing.tool.Tool
contribute, getActivationFeedback, getActivationRequest, getActivationRequestForKeyPressed, getActivationRequestForMouseDragged, getActivationRequestForMousePressed, getCursor, getManager, getRenderPriority, handleEditEvent, handleKeyPressed, handleKeyReleased, handleKeyTyped, handleMouseClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseMoved, handleMousePressed, handleMouseReleased, propagatePropertyChange, render, setActive, setCursor, setEnabled, setManager, setStatusFeedback
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MouseWheelTool

public MouseWheelTool()
Method Detail

handleMouseWheelMoved

protected void handleMouseWheelMoved(MouseWheelEditEvent e,
                                     boolean isActive)
Description copied from class: Tool
Invoked when the mouse wheel is rotated.

Overrides:
handleMouseWheelMoved in class Tool
isActive - whether this tool is currently active
See Also:
MouseWheelEvent

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 range Tool.MIN_PRIORITY...Tool.MAX_PRIORITY. The default priority is equal to Tool.MAX_PRIORITY minus the render priority.

Overrides:
getDispatchPriority in class Tool
Returns:
the dispatch priority

isSkipPageAtTopAndBottom

public boolean isSkipPageAtTopAndBottom()
Return whether to skip to the previous/next page if scrolling occurs while already scrolled to the top/bottom and using a single-page or spread layout.

Returns:
true, if skipping will be performed, false otherwise

setSkipPageAtTopAndBottom

public void setSkipPageAtTopAndBottom(boolean skipPageAtTopAndBottom)
Set whether to skip to the previous/next page if scrolling occurs while already scrolled to the top/bottom and using a single-page or spread layout.

Parameters:
skipPageAtTopAndBottom - true, if skipping should be performed, false otherwise


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.