Class Mnemonic
java.lang.Object
javafx.scene.input.Mnemonic
This class is used when creating a Mnemonic.
The Mnemonic is constructed with a
Node
and a KeyCombination
.
When a Mnemonic is registered on a Scene
, and the KeyCombination reaches the Scene unconsumed,
then the target Node will be sent an ActionEvent
.
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
fire()
Fire theActionEvent
Returns theKeyCombination
getNode()
Returns theNode
void
setKeyCombination
(KeyCombination keyCombination) Sets theKeyCombination
void
Sets theNode
-
Constructor Details
-
Mnemonic
- Parameters:
node
- theNode
that will receive theActionEvent
.keyCombination
- theKeyCombination
that will trigger the Mnemonic.
-
-
Method Details
-
getKeyCombination
-
setKeyCombination
Sets theKeyCombination
- Parameters:
keyCombination
- theKeyCombination
-
getNode
-
setNode
-
fire
public void fire()Fire theActionEvent
-