Class NodeFinder

java.lang.Object
org.jhotdraw8.draw.render.NodeFinder

public class NodeFinder extends Object
Provides methods for finding JavaFX nodes within a radius around a point.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable Double
    contains(javafx.scene.Node node, javafx.geometry.Point2D pointInLocal, double radiusInLocal)
    Returns the distance to the node, if the node contains the specified point within a tolerance.
    @Nullable javafx.scene.Node
    findNodeRecursive(javafx.scene.Node n, double vx, double vy, double radius)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NodeFinder

      public NodeFinder()
  • Method Details

    • contains

      public @Nullable Double contains(javafx.scene.Node node, javafx.geometry.Point2D pointInLocal, double radiusInLocal)
      Returns the distance to the node, if the node contains the specified point within a tolerance.
      Parameters:
      node - The node
      pointInLocal - The point in local coordinates
      radiusInLocal - The maximal distance the point is allowed to be away from the node, in local coordinates
      Returns:
      a distance if the node contains the point, null otherwise
    • findNodeRecursive

      public @Nullable javafx.scene.Node findNodeRecursive(javafx.scene.Node n, double vx, double vy, double radius)