Class MoveToolEventHandler.ViewerMover
java.lang.Object
qupath.lib.gui.viewer.tools.handlers.MoveToolEventHandler.ViewerMover
- Enclosing class:
- MoveToolEventHandler
Helper class for panning a 
QuPathViewer (reasonably) smoothly.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidcancelDirection(boolean xAxis) Cancel either the x- or y-axis direction of the movement.voidStop moving, by smoothly decelerating.voidstartMoving(double dx, double dy, boolean constantVelocity) Start moving, with initial velocity given by dx and dy.voidStop moving immediately.
- 
Constructor Details- 
ViewerMoverConstructor.- Parameters:
- viewer- the viewer that will be controlled by this object
 
 
- 
- 
Method Details- 
startMovingpublic void startMoving(double dx, double dy, boolean constantVelocity) Start moving, with initial velocity given by dx and dy.- Parameters:
- dx-
- dy-
- constantVelocity-
 
- 
cancelDirectionpublic void cancelDirection(boolean xAxis) Cancel either the x- or y-axis direction of the movement.E.g. This can be used to change the direction from diagonal to straight (horizontal/vertical) when releasing an arrow key while another arrow key is pressed. - Parameters:
- xAxis-
 
- 
deceleratepublic void decelerate()Stop moving, by smoothly decelerating.
- 
stopMovingpublic void stopMoving()Stop moving immediately.
 
-