public class Nodes
extends java.lang.Object
InputMap
into a Node
.
InputMap
as a default behavior that can be overridden later,
use addFallbackInputMap(Node, InputMap)
.
InputMap
that might override default behaviors, use addInputMap(Node, InputMap)
.
InputMap
, use removeInputMap(Node, InputMap)
.
pushInputMap(Node, InputMap)
and popInputMap(Node)
for temporary behavior
modification.
Constructor and Description |
---|
Nodes() |
Modifier and Type | Method and Description |
---|---|
static void |
addFallbackInputMap(javafx.scene.Node node,
InputMap<?> im)
Adds the given input map to the end of the node's list of input maps, so that an event will be pattern-matched
against all other input maps currently "installed" in the node before being pattern-matched against the given
input map.
|
static void |
addInputMap(javafx.scene.Node node,
InputMap<?> im)
Adds the given input map to the start of the node's list of input maps, so that an event will be pattern-matched
against the given input map before being pattern-matched against any other input maps currently
"installed" in the node.
|
static InputMap<?> |
getInputMap(javafx.scene.Node node)
Gets the
InputMap for the given node or InputMap.empty() if there is none. |
static boolean |
popInputMap(javafx.scene.Node node)
If the internal stack has an
InputMap , removes the current InputMap that was installed
on the give node via pushInputMap(Node, InputMap) , reinstalls the previous InputMap ,
and then returns true. |
static void |
pushInputMap(javafx.scene.Node node,
InputMap<?> im)
Removes the currently installed
InputMap (InputMap1) on the given node and installs the im
(InputMap2) in its place. |
static void |
removeInputMap(javafx.scene.Node node,
InputMap<?> im)
Removes (or uninstalls) the given input map from the node.
|
public static void addInputMap(javafx.scene.Node node, InputMap<?> im)
public static void addFallbackInputMap(javafx.scene.Node node, InputMap<?> im)
public static void removeInputMap(javafx.scene.Node node, InputMap<?> im)
public static InputMap<?> getInputMap(javafx.scene.Node node)
InputMap
for the given node or InputMap.empty()
if there is none.public static void pushInputMap(javafx.scene.Node node, InputMap<?> im)
InputMap
(InputMap1) on the given node and installs the im
(InputMap2) in its place. When finished, InputMap2 can be uninstalled and InputMap1 reinstalled via
popInputMap(Node)
. Multiple InputMaps can be installed so that InputMap(n) will be installed over
InputMap(n-1)public static boolean popInputMap(javafx.scene.Node node)
InputMap
, removes the current InputMap
that was installed
on the give node via pushInputMap(Node, InputMap)
, reinstalls the previous InputMap
,
and then returns true. If the stack is empty, returns false.