Package org.fxmisc.richtext.event
Class MouseStationaryHelper
- java.lang.Object
-
- org.fxmisc.richtext.event.MouseStationaryHelper
-
public class MouseStationaryHelper extends Object
Helper class for setting up the code that will fire both kinds ofMouseStationaryEventwhen these events occur.
-
-
Constructor Summary
Constructors Constructor Description MouseStationaryHelper(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<Point2D,Void>>events(Duration delay)Returns anEventStreamthat emits aPoint2Dwhenever the mouse becomes stationary over the helper's node and emits anullvalue whenever the mouse moves after being stationary.voidinstall(Duration delay)Sets up the code to fire aBEGINevent when the mouse becomes stationary over the node and has not moved for the given amount of time (delay), and to fire aENDevent when the stationary mouse moves again.voiduninstall()Removes uninstalls the code that would fireBEGINandENDevents when the mouse became stationary over this helper's node.
-
-
-
Constructor Detail
-
MouseStationaryHelper
public MouseStationaryHelper(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<Point2D,Void>> events(Duration delay)
Returns anEventStreamthat emits aPoint2Dwhenever the mouse becomes stationary over the helper's node and emits anullvalue whenever the mouse moves after being stationary.
-
install
public void install(Duration delay)
Sets up the code to fire aBEGINevent when the mouse becomes stationary over the node and has not moved for the given amount of time (delay), and to fire aENDevent 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 fireBEGINandENDevents when the mouse became stationary over this helper's node.
-
-