Top Description Fields Constructors Methods
javafx.scene.input

public Class Mnemonic

extends Object
Class Inheritance
Imports
javafx.beans.NamedArg, javafx.event.ActionEvent, javafx.scene.Node

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

Field Summary

Modifier and TypeField and Description
private KeyCombination
private Node

Constructor Summary

AccessConstructor and Description
public
Mnemonic(Node
the Node that will receive the ActionEvent.
node
,
KeyCombination
the KeyCombination that will trigger the Mnemonic.
keyCombination
)

Constructs a Mnemonic with the specified target Node and trigger KeyCombination.

Method Summary

Modifier and TypeMethod and Description
public void
fire()

Fire the ActionEvent

public KeyCombination

Returns:

the KeyCombination
getKeyCombination
()

Returns the KeyCombination

public Node

Returns:

the Node
getNode
()

Returns the Node

public void
setKeyCombination(KeyCombination
the KeyCombination
keyCombination
)

Sets the KeyCombination

public void
setNode(Node
the Node
node
)

Sets the Node

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

keyCombinationback to summary
private KeyCombination keyCombination
nodeback to summary
private Node node

Constructor Detail

Mnemonicback to summary
public Mnemonic(Node node, KeyCombination keyCombination)

Constructs a Mnemonic with the specified target Node and trigger KeyCombination.

Parameters
node:Node

the Node that will receive the ActionEvent.

keyCombination:KeyCombination

the KeyCombination that will trigger the Mnemonic.

Method Detail

fireback to summary
public void fire()

Fire the ActionEvent

getKeyCombinationback to summary
public KeyCombination getKeyCombination()

Returns the KeyCombination

Returns:KeyCombination

the KeyCombination

getNodeback to summary
public Node getNode()

Returns the Node

Returns:Node

the Node

setKeyCombinationback to summary
public void setKeyCombination(KeyCombination keyCombination)

Sets the KeyCombination

Parameters
keyCombination:KeyCombination

the KeyCombination

setNodeback to summary
public void setNode(Node node)

Sets the Node

Parameters
node:Node

the Node

Since
JavaFX 2.2