Class KeyEventBinding

java.lang.Object
javafx.scene.input.EventBinding<KeyEvent>
javafx.scene.input.KeyEventBinding
All Implemented Interfaces:
EventListener, EventHandler<KeyEvent>

public class KeyEventBinding
extends EventBinding<KeyEvent>
Executes a command when a KeyEvent with a specified KeyCode was received.
  • Property Details

  • Constructor Details

    • KeyEventBinding

      public KeyEventBinding()
    • KeyEventBinding

      public KeyEventBinding​(EventType<KeyEvent> eventType)
  • Method Details

    • keyCodeProperty

      public ObjectProperty<KeyCode> keyCodeProperty()
      See Also:
      getKeyCode(), setKeyCode(KeyCode)
    • getKeyCode

      public KeyCode getKeyCode()
      Gets the value of the property keyCode.
      Property description:
    • setKeyCode

      public void setKeyCode​(KeyCode keyCode)
      Sets the value of the property keyCode.
      Property description:
    • handle

      public void handle​(KeyEvent event)
      Description copied from interface: EventHandler
      Invoked when a specific event of the type for which this handler is registered happens.
      Parameters:
      event - the event which occurred