java.lang.Object
qupath.fx.controls.InputDisplay
- All Implemented Interfaces:
EventListener
,javafx.event.EventHandler<javafx.scene.input.InputEvent>
public class InputDisplay
extends Object
implements javafx.event.EventHandler<javafx.scene.input.InputEvent>
Control to display mouse and keyboard input when interacting with a window.
This is useful for demos and tutorials where shortcut keys are used.
-
Property Summary
-
Constructor Summary
ConstructorDescriptionInputDisplay
(javafx.stage.Window owner) Create an input display with the specified owner window.InputDisplay
(javafx.stage.Window owner, javafx.collections.ObservableList<? extends javafx.stage.Window> windows) Create an input display with the specified owner window and list of windows to listen to. -
Method Summary
-
Property Details
-
show
public javafx.beans.property.BooleanProperty showProperty
-
-
Constructor Details
-
InputDisplay
public InputDisplay(javafx.stage.Window owner) Create an input display with the specified owner window.- Parameters:
owner
- the owner used to position the input display, and when listening to input events. If null, an input display is created to listen to all windows but without any owner.
-
InputDisplay
public InputDisplay(javafx.stage.Window owner, javafx.collections.ObservableList<? extends javafx.stage.Window> windows) Create an input display with the specified owner window and list of windows to listen to. To listen to input across all windows, useWindow.getWindows()
.- Parameters:
owner
- the owner used to position the input display.windows
- the windows to listen to.
-
-
Method Details
-
showProperty
public javafx.beans.property.BooleanProperty showProperty() -
show
public void show() -
hide
public void hide() -
handle
public void handle(javafx.scene.input.InputEvent event) - Specified by:
handle
in interfacejavafx.event.EventHandler<javafx.scene.input.InputEvent>
-