Class MouseStationaryHelper


  • public class MouseStationaryHelper
    extends java.lang.Object
    Helper class for setting up the code that will fire both kinds of MouseStationaryEvent when these events occur.
    • Constructor Summary

      Constructors 
      Constructor Description
      MouseStationaryHelper​(javafx.scene.Node node)
      Creates a helper class that can install/uninstall the code needed to fire events when the mouse becomes stationary over the given node.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      EventStream<Either<javafx.geometry.Point2D,​java.lang.Void>> events​(java.time.Duration delay)
      Returns an EventStream that emits a Point2D whenever the mouse becomes stationary over the helper's node and emits a null value whenever the mouse moves after being stationary.
      void install​(java.time.Duration delay)
      Sets up the code to fire a BEGIN event when the mouse becomes stationary over the node and has not moved for the given amount of time (delay), and to fire a END event when the stationary mouse moves again.
      void uninstall()
      Removes uninstalls the code that would fire BEGIN and END events when the mouse became stationary over this helper's node.
      • Methods inherited from class java.lang.Object

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

      • MouseStationaryHelper

        public MouseStationaryHelper​(javafx.scene.Node node)
        Creates a helper class that can install/uninstall the code needed to fire events when the mouse becomes stationary over the given node.
    • Method Detail

      • events

        public EventStream<Either<javafx.geometry.Point2D,​java.lang.Void>> events​(java.time.Duration delay)
        Returns an EventStream that emits a Point2D whenever the mouse becomes stationary over the helper's node and emits a null value whenever the mouse moves after being stationary.
      • install

        public void install​(java.time.Duration delay)
        Sets up the code to fire a BEGIN event when the mouse becomes stationary over the node and has not moved for the given amount of time (delay), and to fire a END event when the stationary mouse moves again. Note: any previously installed delays will be removed without creating memory leaks.
      • uninstall

        public void uninstall()
        Removes uninstalls the code that would fire BEGIN and END events when the mouse became stationary over this helper's node.