public class PolylineTool extends OverlayTool
Modifier and Type | Field and Description |
---|---|
protected static int |
ADJUST |
protected static int |
ADJUST_TAIL |
protected static int |
BEGIN_EXTEND |
protected static int |
CLOSE_LOOP |
protected static int |
EXTEND |
protected static int |
EXTEND_ON_TAIL |
protected OverlayPolyline |
line
Curve currently being drawn or modified.
|
protected int |
mode
The current mode of the state machine represented in/by the mouse methods
of this tool.
|
protected static int |
PLACE |
protected static int |
SELECT |
protected static int |
SELECTED_TAIL |
protected int |
selectedNode
Nearest node on selected PolyLine.
|
protected static double |
THRESH
Maximum distance (in pixels) mouse can be from a node to be considered
pointing to it.
|
protected static int |
WAIT
The Different modes of this tool.
|
icon, name, overlay, tip
Constructor and Description |
---|
PolylineTool(OverlayTransform overlay)
Constructs a creation tool.
|
Modifier and Type | Method and Description |
---|---|
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 a 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.
|
void |
print(String methodName,
String message)
Prints a message for debugging.
|
deselectAll, getIcon, getName, getTip, getTransform, keyPressed, keyReleased
protected static final int WAIT
protected static final int EXTEND
protected static final int ADJUST
protected static final int SELECT
protected static final int PLACE
protected static final int ADJUST_TAIL
protected static final int CLOSE_LOOP
protected static final int SELECTED_TAIL
protected static final int EXTEND_ON_TAIL
protected static final int BEGIN_EXTEND
protected static final double THRESH
protected OverlayPolyline line
protected int selectedNode
protected int mode
public PolylineTool(OverlayTransform overlay)
public void mouseDown(DisplayEvent e, int px, int py, float dx, float dy, int[] pos, int mods)
mouseDown
in class OverlayTool
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 mouseDrag(DisplayEvent e, int px, int py, float dx, float dy, int[] pos, int mods)
mouseDrag
in class OverlayTool
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 mouseUp(DisplayEvent e, int px, int py, float dx, float dy, int[] pos, int mods)
mouseUp
in class OverlayTool
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 mouseMoved(DisplayEvent e, int px, int py, float dx, float dy, int[] pos, int mods)
mouseMoved
in class OverlayTool
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.Copyright © 2015–2022 SciJava. All rights reserved.