-
- All Known Implementing Classes:
TransformEventHandler2D,TransformEventHandler3D
public interface TransformEventHandlerChange a transformation in response to user input (mouse events, key events, etc.) TheTransformEventHandlerreceives notifications about changes of the canvas size (it may react for example by changing the scale of the transformation accordingly).- Author:
- Tobias Pietzsch
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidinstall(org.scijava.ui.behaviour.util.Behaviours behaviours)Install transformation behaviours into the specifiedbehaviourscontrainer.voidsetCanvasSize(int width, int height, boolean updateTransform)This is called, when the screen size of the canvas (the component displaying the image and generating mouse events) changes.
-
-
-
Method Detail
-
install
void install(org.scijava.ui.behaviour.util.Behaviours behaviours)
Install transformation behaviours into the specifiedbehaviourscontrainer.
-
setCanvasSize
void setCanvasSize(int width, int height, boolean updateTransform)This is called, when the screen size of the canvas (the component displaying the image and generating mouse events) changes. This can be used to determine screen coordinates to keep fixed while zooming or rotating with the keyboard, e.g., set these to (width/2, height/2). It can also be used to update the current source-to-screen transform, e.g., to change the zoom along with the canvas size.- Parameters:
width- the new canvas width.height- the new canvas height.updateTransform- whether the current source-to-screen transform should be updated. This will befalsefor the initial update of a newTransformEventHandlerandtrueon subsequent calls.
-
-