Top Description Fields Constructors Methods
org.fxmisc.richtext.event

public Class MouseStationaryHelper

extends Object
Class Inheritance
Static Imports
javafx.scene.input.MouseEvent.*, org.reactfx.EventStreams.*

Helper class for setting up the code that will fire both kinds of MouseStationaryEvent when these events occur.

Field Summary

Modifier and TypeField and Description
private Subscription
private final Node

Constructor Summary

AccessConstructor and Description
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 Summary

Modifier and TypeMethod and Description
public EventStream<Either<Point2D, Void>>
events(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.

public void
install(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.

public void
uninstall()

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

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

installedback to summary
private Subscription installed
nodeback to summary
private final Node node

Constructor Detail

MouseStationaryHelperback to summary
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

eventsback to summary
public EventStream<Either<Point2D, Void>> events(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.

installback to summary
public void install(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.

uninstallback to summary
public void uninstall()

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