Class Mnemonic

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 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 Details Link icon

  • Method Details Link icon

    • getKeyCombination Link icon

      public KeyCombination getKeyCombination()
      Returns the KeyCombination
      Returns:
      the KeyCombination
    • setKeyCombination Link icon

      public void setKeyCombination(KeyCombination keyCombination)
      Parameters:
      keyCombination - the KeyCombination
    • getNode Link icon

      public Node getNode()
      Returns the Node
      Returns:
      the Node
    • setNode Link icon

      public void setNode(Node node)
      Sets the Node
      Parameters:
      node - the Node
      Since:
      JavaFX 2.2
    • fire Link icon

      public void fire()
      Fire the ActionEvent