Package org.fxmisc.richtext.event
Class MouseStationaryHelper
- java.lang.Object
-
- org.fxmisc.richtext.event.MouseStationaryHelper
-
public class MouseStationaryHelper extends java.lang.Object
Helper class for setting up the code that will fire both kinds ofMouseStationaryEvent
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 anEventStream
that emits aPoint2D
whenever the mouse becomes stationary over the helper's node and emits anull
value whenever the mouse moves after being stationary.void
install(java.time.Duration delay)
Sets up the code to fire aBEGIN
event when the mouse becomes stationary over the node and has not moved for the given amount of time (delay
), and to fire aEND
event when the stationary mouse moves again.void
uninstall()
Removes uninstalls the code that would fireBEGIN
andEND
events when the mouse became stationary over this helper's node.
-
-
-
Method Detail
-
events
public EventStream<Either<javafx.geometry.Point2D,java.lang.Void>> events(java.time.Duration delay)
Returns anEventStream
that emits aPoint2D
whenever the mouse becomes stationary over the helper's node and emits anull
value whenever the mouse moves after being stationary.
-
install
public void install(java.time.Duration delay)
Sets up the code to fire aBEGIN
event when the mouse becomes stationary over the node and has not moved for the given amount of time (delay
), and to fire aEND
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 fireBEGIN
andEND
events when the mouse became stationary over this helper's node.
-
-