Class PathTools

java.lang.Object
qupath.lib.gui.viewer.tools.PathTools

public class PathTools extends Object
Default PathTool implementations.
Author:
Pete Bankhead
  • Field Details

    • MOVE

      public static final PathTool MOVE
      Move tool
    • RECTANGLE

      public static final PathTool RECTANGLE
      Rectangle drawing tool
    • ELLIPSE

      public static final PathTool ELLIPSE
      Ellipse drawing tool
    • LINE

      public static final PathTool LINE
      Line drawing tool
    • ARROW_START

      public static final PathTool ARROW_START
      Arrow drawing tool, with arrowhead at the start
    • ARROW_END

      public static final PathTool ARROW_END
      Arrow drawing tool, with arrowhead at the end
    • ARROW_DOUBLE

      public static final PathTool ARROW_DOUBLE
      Arrow drawing tool, with arrowhead at both ends
    • LINE_OR_ARROW

      public static final PathTool LINE_OR_ARROW
      Extended PathTool that can switch between drawing lines or arrows.
    • POLYGON

      public static final PathTool POLYGON
      Polygon drawing tool (closed)
    • POLYLINE

      public static final PathTool POLYLINE
      Polyline drawing tool (open)
    • BRUSH

      public static final PathTool BRUSH
      Brush drawing tool
    • POINTS

      public static final PathTool POINTS
      Points annotation and counting tool
  • Constructor Details

    • PathTools

      public PathTools()
  • Method Details

    • createTool

      public static PathTool createTool(EventHandler<MouseEvent> handler, String name, Node icon)
      Create a tool from the specified MouseEvent handler. When the tool is registered, the handler will be called for any mouse event.
      Parameters:
      handler - the mouse event handler
      name - the name of the tool
      icon - the (toolbar) icon of the tool
      Returns:
      a new PathTool
    • createExtendedTool

      public static PathTool createExtendedTool(PathTool... tools)
    • 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 handled
      handler - the event handler
      name - the name of the tool
      icon - the (toolbar) icon of the tool
      Returns:
      a new PathTool
    • getTool

      public static PathTool getTool(String pathToolString)
      Return the PathTool corresponding to the specified String.
      Parameters:
      pathToolString -
      Returns:
      pathTool