- All Implemented Interfaces:
EventListener,javafx.event.EventHandler<javafx.scene.input.InputEvent>
This is useful for demos and tutorials where shortcut keys are used.
-
Property Summary
PropertiesTypePropertyDescriptionjavafx.beans.property.ObjectProperty<javafx.util.Duration> javafx.beans.property.DoublePropertyjavafx.beans.property.BooleanPropertyOptionally reverse the scroll direction, both horizontally and vertically.javafx.beans.property.BooleanPropertyjavafx.beans.property.BooleanPropertyjavafx.beans.property.BooleanPropertyControl whether keypresses are ignored when typing is performed within a text input control (e.g. -
Constructor Summary
ConstructorsConstructorDescriptionInputDisplay(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
Modifier and TypeMethodDescriptionjavafx.beans.property.ObjectProperty<javafx.util.Duration> javafx.beans.property.DoublePropertyjavafx.util.DurationGets the value of thefadeDurationproperty.doubleGets the value of thefadeToproperty.booleanGets the value of thereverseScrollproperty.booleanGets the value of theshowSymbolsproperty.booleanGets the value of theskipTextInputControlsproperty.voidhandle(javafx.scene.input.InputEvent event) voidhide()Hide the input display.javafx.beans.property.BooleanPropertyOptionally reverse the scroll direction, both horizontally and vertically.voidsetFadeDuration(javafx.util.Duration duration) Sets the value of thefadeDurationproperty.voidsetFadeTo(double opacity) Sets the value of thefadeToproperty.voidsetReverseScroll(boolean doReverse) Sets the value of thereverseScrollproperty.voidsetShowSymbols(boolean showSymbols) Sets the value of theshowSymbolsproperty.voidsetSkipTextInputControls(boolean skip) Sets the value of theskipTextInputControlsproperty.voidshow()Show the input display.javafx.beans.property.BooleanPropertyjavafx.beans.property.BooleanPropertyjavafx.beans.property.BooleanPropertyControl whether keypresses are ignored when typing is performed within a text input control (e.g.
-
Property Details
-
show
public javafx.beans.property.BooleanProperty showProperty- See Also:
-
reverseScroll
public javafx.beans.property.BooleanProperty reverseScrollPropertyOptionally reverse the scroll direction, both horizontally and vertically. This exists to support the fact that scrolling can act differently on different platforms, or even different devices using the same platform.For example, on macOS there has been a setting for a mouse to use 'natural scrolling' for some years; this also exists for Windows 11, or could previously have been adjusted in registry settings. Unfortunately, we have no way to query this information from Java to 'correct' the scroll directions shown here.
- See Also:
-
skipTextInputControls
public javafx.beans.property.BooleanProperty skipTextInputControlsPropertyControl whether keypresses are ignored when typing is performed within a text input control (e.g. text field, text area). Default is false.- See Also:
-
showSymbols
public javafx.beans.property.BooleanProperty showSymbolsProperty- See Also:
-
fadeDuration
public javafx.beans.property.ObjectProperty<javafx.util.Duration> fadeDurationProperty- See Also:
-
fadeTo
public javafx.beans.property.DoubleProperty fadeToProperty- See Also:
-
-
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()- Returns:
- the
showproperty
-
show
public void show()Show the input display. -
hide
public void hide()Hide the input display. -
reverseScrollProperty
public javafx.beans.property.BooleanProperty reverseScrollProperty()Optionally reverse the scroll direction, both horizontally and vertically. This exists to support the fact that scrolling can act differently on different platforms, or even different devices using the same platform.For example, on macOS there has been a setting for a mouse to use 'natural scrolling' for some years; this also exists for Windows 11, or could previously have been adjusted in registry settings. Unfortunately, we have no way to query this information from Java to 'correct' the scroll directions shown here.
- Returns:
- the
reverseScrollproperty - See Also:
-
setReverseScroll
public void setReverseScroll(boolean doReverse) Sets the value of thereverseScrollproperty.- Property description:
- Optionally reverse the scroll direction, both horizontally and vertically.
This exists to support the fact that scrolling can act differently on different platforms,
or even different devices using the same platform.
For example, on macOS there has been a setting for a mouse to use 'natural scrolling' for some years; this also exists for Windows 11, or could previously have been adjusted in registry settings. Unfortunately, we have no way to query this information from Java to 'correct' the scroll directions shown here.
- Parameters:
doReverse- the value for thereverseScrollproperty- See Also:
-
getReverseScroll
public boolean getReverseScroll()Gets the value of thereverseScrollproperty.- Property description:
- Optionally reverse the scroll direction, both horizontally and vertically.
This exists to support the fact that scrolling can act differently on different platforms,
or even different devices using the same platform.
For example, on macOS there has been a setting for a mouse to use 'natural scrolling' for some years; this also exists for Windows 11, or could previously have been adjusted in registry settings. Unfortunately, we have no way to query this information from Java to 'correct' the scroll directions shown here.
- Returns:
- the value of the
reverseScrollproperty - See Also:
-
skipTextInputControlsProperty
public javafx.beans.property.BooleanProperty skipTextInputControlsProperty()Control whether keypresses are ignored when typing is performed within a text input control (e.g. text field, text area). Default is false.- Returns:
- the
skipTextInputControlsproperty - See Also:
-
setSkipTextInputControls
public void setSkipTextInputControls(boolean skip) Sets the value of theskipTextInputControlsproperty.- Property description:
- Control whether keypresses are ignored when typing is performed within a text input control (e.g. text field, text area). Default is false.
- Parameters:
skip- the value for theskipTextInputControlsproperty- See Also:
-
getSkipTextInputControls
public boolean getSkipTextInputControls()Gets the value of theskipTextInputControlsproperty.- Property description:
- Control whether keypresses are ignored when typing is performed within a text input control (e.g. text field, text area). Default is false.
- Returns:
- the value of the
skipTextInputControlsproperty - See Also:
-
showSymbolsProperty
public javafx.beans.property.BooleanProperty showSymbolsProperty()- Returns:
- the
showSymbolsproperty - See Also:
-
setShowSymbols
public void setShowSymbols(boolean showSymbols) Sets the value of theshowSymbolsproperty.- Property description:
- Parameters:
showSymbols- the value for theshowSymbolsproperty- See Also:
-
getShowSymbols
public boolean getShowSymbols()Gets the value of theshowSymbolsproperty.- Property description:
- Returns:
- the value of the
showSymbolsproperty - See Also:
-
fadeDurationProperty
public javafx.beans.property.ObjectProperty<javafx.util.Duration> fadeDurationProperty()- Returns:
- the
fadeDurationproperty - See Also:
-
setFadeDuration
public void setFadeDuration(javafx.util.Duration duration) Sets the value of thefadeDurationproperty.- Property description:
- Parameters:
duration- the value for thefadeDurationproperty- See Also:
-
getFadeDuration
public javafx.util.Duration getFadeDuration()Gets the value of thefadeDurationproperty.- Property description:
- Returns:
- the value of the
fadeDurationproperty - See Also:
-
fadeToProperty
public javafx.beans.property.DoubleProperty fadeToProperty()- Returns:
- the
fadeToproperty - See Also:
-
setFadeTo
public void setFadeTo(double opacity) Sets the value of thefadeToproperty.- Property description:
- Parameters:
opacity- the value for thefadeToproperty- See Also:
-
getFadeTo
public double getFadeTo()Gets the value of thefadeToproperty.- Property description:
- Returns:
- the value of the
fadeToproperty - See Also:
-
handle
public void handle(javafx.scene.input.InputEvent event) - Specified by:
handlein interfacejavafx.event.EventHandler<javafx.scene.input.InputEvent>
-