public class OverlayTool extends Object
Modifier and Type | Field and Description |
---|---|
protected String |
icon
Filename of icon.
|
protected String |
name
Name of this tool.
|
protected OverlayTransform |
overlay
Associated overlay transform.
|
protected String |
tip
Tool tip text.
|
Constructor and Description |
---|
OverlayTool(OverlayTransform overlay,
String name,
String tip,
String icon)
Constructs a measurement line creation tool.
|
Modifier and Type | Method and Description |
---|---|
protected void |
deselectAll()
Deselect all selected overlays.
|
String |
getIcon()
Gets path to icon file.
|
String |
getName()
Gets tool name.
|
String |
getTip()
Gets tool tip text.
|
OverlayTransform |
getTransform()
Gets associated overlay transform.
|
void |
keyPressed(int code,
int mods)
Instructs this tool to respond to a key press.
|
void |
keyReleased(int code,
int mods)
Instructs this tool to respond to a key release.
|
void |
mouseDown(DisplayEvent e,
int px,
int py,
float dx,
float dy,
int[] pos,
int mods)
Instructs this tool to respond to a mouse press.
|
void |
mouseDrag(DisplayEvent e,
int px,
int py,
float dx,
float dy,
int[] pos,
int mods)
Instructs this tool to respond to a mouse drag.
|
void |
mouseMoved(DisplayEvent e,
int px,
int py,
float dx,
float dy,
int[] pos,
int mods)
Instructs this tool to respond to mouse movement.
|
void |
mouseUp(DisplayEvent e,
int px,
int py,
float dx,
float dy,
int[] pos,
int mods)
Instructs this tool to respond to a mouse release.
|
protected OverlayTransform overlay
protected String name
protected String tip
protected String icon
public OverlayTool(OverlayTransform overlay, String name, String tip, String icon)
public void mouseDown(DisplayEvent e, int px, int py, float dx, float dy, int[] pos, int mods)
e
- DisplayEvent corresponding to this mouse press.px
- X coordinate of mouse press in pixel coordinate system.py
- Y coordinate of mouse press in pixel coordinate system.dx
- X coordinate of mouse press in data coordinate system.dy
- Y coordinate of mouse press in data coordinate system.pos
- Dimensional position of mouse press.mods
- Modifiers of mouse press.public void mouseUp(DisplayEvent e, int px, int py, float dx, float dy, int[] pos, int mods)
e
- DisplayEvent corresponding to this mouse release.px
- X coordinate of mouse release in pixel coordinate system.py
- Y coordinate of mouse release in pixel coordinate system.dx
- X coordinate of mouse release in data coordinate system.dy
- Y coordinate of mouse release in data coordinate system.pos
- Dimensional position of mouse release.mods
- Modifiers of mouse release.public void mouseDrag(DisplayEvent e, int px, int py, float dx, float dy, int[] pos, int mods)
e
- DisplayEvent corresponding to this mouse drag.px
- X coordinate of mouse drag in pixel coordinate system.py
- Y coordinate of mouse drag in pixel coordinate system.dx
- X coordinate of mouse drag in data coordinate system.dy
- Y coordinate of mouse drag in data coordinate system.pos
- Dimensional position of mouse drag.mods
- Modifiers of mouse drag.public void mouseMoved(DisplayEvent e, int px, int py, float dx, float dy, int[] pos, int mods)
e
- DisplayEvent corresponding to this mouse movement.px
- X coordinate of mouse movement in pixel coordinate system.py
- Y coordinate of mouse movement in pixel coordinate system.dx
- X coordinate of mouse movement in data coordinate system.dy
- Y coordinate of mouse movement in data coordinate system.pos
- Dimensional position of mouse movement.mods
- Modifiers of mouse movement.public void keyPressed(int code, int mods)
code
- Key code of pressed key.mods
- Modifiers of pressed key.public void keyReleased(int code, int mods)
code
- Key code of released key.mods
- Modifiers of released key.public OverlayTransform getTransform()
public String getName()
public String getTip()
public String getIcon()
protected void deselectAll()
Copyright © 2015–2022 SciJava. All rights reserved.