- java.lang.Object
-
- javafx.scene.input.Mnemonic
-
public class Mnemonic extends Object
This class is used when creating a Mnemonic. The Mnemonic is constructed with aNode
and aKeyCombination
. When a Mnemonic is registered on aScene
, and the KeyCombination reaches the Scene unconsumed, then the target Node will be sent anActionEvent
.Controls should use their MnemonicParsing property when adding Mnemonics.
Mnemonics will not be displayed on all platforms, but the api will still be present.
- Since:
- JavaFX 2.0
-
-
Constructor Summary
Constructors Constructor Description Mnemonic(Node node, KeyCombination keyCombination)
-
Method Summary
Modifier and Type Method Description void
fire()
Fire theActionEvent
KeyCombination
getKeyCombination()
Returns theKeyCombination
Node
getNode()
Returns theNode
void
setKeyCombination(KeyCombination keyCombination)
Sets theKeyCombination
void
setNode(Node node)
Sets theNode
-
-
-
Constructor Detail
-
Mnemonic
public Mnemonic(Node node, KeyCombination keyCombination)
- Parameters:
node
- theNode
that will receive theActionEvent
.keyCombination
- theKeyCombination
that will trigger the Mnemonic.
-
-
Method Detail
-
getKeyCombination
public KeyCombination getKeyCombination()
Returns theKeyCombination
- Returns:
- the
KeyCombination
-
setKeyCombination
public void setKeyCombination(KeyCombination keyCombination)
Sets theKeyCombination
- Parameters:
keyCombination
- theKeyCombination
-
fire
public void fire()
Fire theActionEvent
-
-