java.lang.Object
org.jhotdraw8.draw.render.NodeFinder
Provides methods for finding JavaFX nodes within a radius around a point.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable Doublecontains(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.NodefindNodeRecursive(javafx.scene.Node n, double vx, double vy, double radius)
-
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 nodepointInLocal- The point in local coordinatesradiusInLocal- 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)
-