- java.lang.Object
-
- bdv.TransformEventHandler2D
-
- All Implemented Interfaces:
TransformEventHandler
public class TransformEventHandler2D extends Object implements TransformEventHandler
- Author:
- Tobias Pietzsch
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTransformEventHandler2D.Descriptions
-
Field Summary
-
Constructor Summary
Constructors Constructor Description TransformEventHandler2D(TransformState transform)
-
Method Summary
All Methods Instance Methods Concrete 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.
-
-
-
Field Detail
-
DRAG_TRANSLATE
public static final String DRAG_TRANSLATE
- See Also:
- Constant Field Values
-
DRAG_ROTATE
public static final String DRAG_ROTATE
- See Also:
- Constant Field Values
-
ZOOM_NORMAL
public static final String ZOOM_NORMAL
- See Also:
- Constant Field Values
-
SCROLL_TRANSLATE
public static final String SCROLL_TRANSLATE
- See Also:
- Constant Field Values
-
SCROLL_ROTATE
public static final String SCROLL_ROTATE
- See Also:
- Constant Field Values
-
ROTATE_LEFT
public static final String ROTATE_LEFT
- See Also:
- Constant Field Values
-
ROTATE_RIGHT
public static final String ROTATE_RIGHT
- See Also:
- Constant Field Values
-
KEY_ZOOM_IN
public static final String KEY_ZOOM_IN
- See Also:
- Constant Field Values
-
KEY_ZOOM_OUT
public static final String KEY_ZOOM_OUT
- See Also:
- Constant Field Values
-
ZOOM_FAST
public static final String ZOOM_FAST
- See Also:
- Constant Field Values
-
SCROLL_TRANSLATE_FAST
public static final String SCROLL_TRANSLATE_FAST
- See Also:
- Constant Field Values
-
SCROLL_ROTATE_FAST
public static final String SCROLL_ROTATE_FAST
- See Also:
- Constant Field Values
-
ROTATE_LEFT_FAST
public static final String ROTATE_LEFT_FAST
- See Also:
- Constant Field Values
-
ROTATE_RIGHT_FAST
public static final String ROTATE_RIGHT_FAST
- See Also:
- Constant Field Values
-
KEY_ZOOM_IN_FAST
public static final String KEY_ZOOM_IN_FAST
- See Also:
- Constant Field Values
-
KEY_ZOOM_OUT_FAST
public static final String KEY_ZOOM_OUT_FAST
- See Also:
- Constant Field Values
-
ZOOM_SLOW
public static final String ZOOM_SLOW
- See Also:
- Constant Field Values
-
SCROLL_TRANSLATE_SLOW
public static final String SCROLL_TRANSLATE_SLOW
- See Also:
- Constant Field Values
-
SCROLL_ROTATE_SLOW
public static final String SCROLL_ROTATE_SLOW
- See Also:
- Constant Field Values
-
ROTATE_LEFT_SLOW
public static final String ROTATE_LEFT_SLOW
- See Also:
- Constant Field Values
-
ROTATE_RIGHT_SLOW
public static final String ROTATE_RIGHT_SLOW
- See Also:
- Constant Field Values
-
KEY_ZOOM_IN_SLOW
public static final String KEY_ZOOM_IN_SLOW
- See Also:
- Constant Field Values
-
KEY_ZOOM_OUT_SLOW
public static final String KEY_ZOOM_OUT_SLOW
- See Also:
- Constant Field Values
-
DRAG_TRANSLATE_KEYS
public static final String[] DRAG_TRANSLATE_KEYS
-
DRAG_ROTATE_KEYS
public static final String[] DRAG_ROTATE_KEYS
-
ZOOM_NORMAL_KEYS
public static final String[] ZOOM_NORMAL_KEYS
-
SCROLL_TRANSLATE_KEYS
public static final String[] SCROLL_TRANSLATE_KEYS
-
SCROLL_ROTATE_KEYS
public static final String[] SCROLL_ROTATE_KEYS
-
ROTATE_LEFT_KEYS
public static final String[] ROTATE_LEFT_KEYS
-
ROTATE_RIGHT_KEYS
public static final String[] ROTATE_RIGHT_KEYS
-
KEY_ZOOM_IN_KEYS
public static final String[] KEY_ZOOM_IN_KEYS
-
KEY_ZOOM_OUT_KEYS
public static final String[] KEY_ZOOM_OUT_KEYS
-
ZOOM_FAST_KEYS
public static final String[] ZOOM_FAST_KEYS
-
SCROLL_TRANSLATE_FAST_KEYS
public static final String[] SCROLL_TRANSLATE_FAST_KEYS
-
SCROLL_ROTATE_FAST_KEYS
public static final String[] SCROLL_ROTATE_FAST_KEYS
-
ROTATE_LEFT_FAST_KEYS
public static final String[] ROTATE_LEFT_FAST_KEYS
-
ROTATE_RIGHT_FAST_KEYS
public static final String[] ROTATE_RIGHT_FAST_KEYS
-
KEY_ZOOM_IN_FAST_KEYS
public static final String[] KEY_ZOOM_IN_FAST_KEYS
-
KEY_ZOOM_OUT_FAST_KEYS
public static final String[] KEY_ZOOM_OUT_FAST_KEYS
-
ZOOM_SLOW_KEYS
public static final String[] ZOOM_SLOW_KEYS
-
SCROLL_TRANSLATE_SLOW_KEYS
public static final String[] SCROLL_TRANSLATE_SLOW_KEYS
-
SCROLL_ROTATE_SLOW_KEYS
public static final String[] SCROLL_ROTATE_SLOW_KEYS
-
ROTATE_LEFT_SLOW_KEYS
public static final String[] ROTATE_LEFT_SLOW_KEYS
-
ROTATE_RIGHT_SLOW_KEYS
public static final String[] ROTATE_RIGHT_SLOW_KEYS
-
KEY_ZOOM_IN_SLOW_KEYS
public static final String[] KEY_ZOOM_IN_SLOW_KEYS
-
KEY_ZOOM_OUT_SLOW_KEYS
public static final String[] KEY_ZOOM_OUT_SLOW_KEYS
-
-
Constructor Detail
-
TransformEventHandler2D
public TransformEventHandler2D(TransformState transform)
-
-
Method Detail
-
install
public void install(org.scijava.ui.behaviour.util.Behaviours behaviours)
Description copied from interface:TransformEventHandlerInstall transformation behaviours into the specifiedbehaviourscontrainer.- Specified by:
installin interfaceTransformEventHandler
-
setCanvasSize
public void setCanvasSize(int width, int height, boolean updateTransform)Description copied from interface:TransformEventHandlerThis 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.- Specified by:
setCanvasSizein interfaceTransformEventHandler- 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.
-
-