public class MouseStationaryHelper
extends java.lang.Object
MouseStationaryEvent
when
these events occur.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.
|
Modifier and Type | Method | Description |
---|---|---|
org.reactfx.EventStream<org.reactfx.util.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. |
public MouseStationaryHelper(javafx.scene.Node node)
public org.reactfx.EventStream<org.reactfx.util.Either<javafx.geometry.Point2D,java.lang.Void>> events(java.time.Duration delay)
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.public void install(java.time.Duration delay)
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.public void uninstall()
BEGIN
and END
events when the mouse became
stationary over this helper's node.