Package qupath.lib.gui.viewer.tools
Class PathTools
java.lang.Object
qupath.lib.gui.viewer.tools.PathTools
Default
PathTool implementations.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PathToolArrow drawing tool, with arrowhead at both endsstatic final PathToolArrow drawing tool, with arrowhead at the endstatic final PathToolArrow drawing tool, with arrowhead at the startstatic final PathToolBrush drawing toolstatic final PathToolEllipse drawing toolstatic final PathToolLine drawing toolstatic final PathToolExtendedPathToolthat can switch between drawing lines or arrows.static final PathToolMove toolstatic final PathToolPoints annotation and counting toolstatic final PathToolPolygon drawing tool (closed)static final PathToolPolyline drawing tool (open)static final PathToolRectangle drawing tool -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PathToolcreateExtendedTool(PathTool... tools) static PathToolcreateTool(EventHandler<MouseEvent> handler, String name, Node icon) Create a tool from the specifiedMouseEventhandler.createTool(EventType<T> type, EventHandler<T> handler, String name, Node icon) Create a tool from the specified event handler.static PathToolReturn 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
ExtendedPathToolthat 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 specifiedMouseEventhandler. 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
-