Package qupath.lib.gui.viewer.tools
Class PathTools
java.lang.Object
qupath.lib.gui.viewer.tools.PathTools
Default
PathTool
implementations.- Author:
- Pete Bankhead
-
Field Summary
Modifier and TypeFieldDescriptionstatic final PathTool
Arrow drawing tool, with arrowhead at both endsstatic final PathTool
Arrow drawing tool, with arrowhead at the endstatic final PathTool
Arrow drawing tool, with arrowhead at the startstatic final PathTool
Brush drawing toolstatic final PathTool
Ellipse drawing toolstatic final PathTool
Line drawing toolstatic final PathTool
ExtendedPathTool
that can switch between drawing lines or arrows.static final PathTool
Move toolstatic final PathTool
Points annotation and counting toolstatic final PathTool
Polygon drawing tool (closed)static final PathTool
Polyline drawing tool (open)static final PathTool
Rectangle drawing tool -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic PathTool
createExtendedTool
(PathTool... tools) static PathTool
createTool
(EventHandler<MouseEvent> handler, String name, Node icon) Create a tool from the specifiedMouseEvent
handler.createTool
(EventType<T> type, EventHandler<T> handler, String name, Node icon) Create a tool from the specified event handler.static PathTool
Return the PathTool corresponding to the specified String.
-
Field Details
-
MOVE
Move tool -
RECTANGLE
Rectangle drawing tool -
ELLIPSE
Ellipse drawing tool -
LINE
Line drawing tool -
ARROW_START
Arrow drawing tool, with arrowhead at the start -
ARROW_END
Arrow drawing tool, with arrowhead at the end -
ARROW_DOUBLE
Arrow drawing tool, with arrowhead at both ends -
LINE_OR_ARROW
ExtendedPathTool
that can switch between drawing lines or arrows. -
POLYGON
Polygon drawing tool (closed) -
POLYLINE
Polyline drawing tool (open) -
BRUSH
Brush drawing tool -
POINTS
Points annotation and counting tool
-
-
Constructor Details
-
PathTools
public PathTools()
-
-
Method Details
-
createTool
Create a tool from the specifiedMouseEvent
handler. When the tool is registered, the handler will be called for any mouse event.- Parameters:
handler
- the mouse event handlername
- the name of the toolicon
- the (toolbar) icon of the tool- Returns:
- a new
PathTool
-
createExtendedTool
-
createTool
public static <T extends Event> PathTool createTool(EventType<T> type, EventHandler<T> handler, String name, Node icon) Create a tool from the specified event handler.- Parameters:
type
- the type of the event that should be handledhandler
- the event handlername
- the name of the toolicon
- the (toolbar) icon of the tool- Returns:
- a new
PathTool
-
getTool
Return the PathTool corresponding to the specified String.- Parameters:
pathToolString
-- Returns:
- pathTool
-