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 Details

    • NodeFinder

      public NodeFinder()
  • Method Details

    • contains

      public @Nullable Double contains(@NonNull javafx.scene.Node node, @NonNull 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(@NonNull javafx.scene.Node n, double vx, double vy, double radius)