Class MouseUtils


  • public final class MouseUtils
    extends java.lang.Object
    Few mouse related helper coordinates
    Author:
    rstein
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static double mouseInsideBoundaryBoxDistance​(javafx.geometry.Bounds screenBounds, javafx.geometry.Point2D mouseLoc)  
      static double mouseOutsideBoundaryBoxDistance​(javafx.geometry.Bounds screenBounds, javafx.geometry.Point2D mouseLoc)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • mouseOutsideBoundaryBoxDistance

        public static double mouseOutsideBoundaryBoxDistance​(javafx.geometry.Bounds screenBounds,
                                                             javafx.geometry.Point2D mouseLoc)
        Parameters:
        screenBounds - boundary box in screen coordinates
        mouseLoc - mouse screen coordinate
        Returns:
        maximum external distance (Manhattan-Norm) from the boundary rectangle
      • mouseInsideBoundaryBoxDistance

        public static double mouseInsideBoundaryBoxDistance​(javafx.geometry.Bounds screenBounds,
                                                            javafx.geometry.Point2D mouseLoc)
        Parameters:
        screenBounds - boundary box in screen coordinates
        mouseLoc - mouse screen coordinate
        Returns:
        minimum internal distance (Manhattan-Norm) from the boundary rectangle