Mention ContextMenuEvent in MouseEvent and KeyEvent

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 7u6
    • Affects Version/s: 7u7
    • Component/s: javafx

      In traditional AWT or Swing UI development we listen for context menu requests using the MouseEvent.isPopupTrigger method or the KeyEvent.VK_CONTEXT_MENU constant. Consequently, many Java developers will look at the JavaFX MouseEvent and KeyEvent and wonder where this stuff has gone.

      It turns out, that JavaFX has a much better model, where a specific ContextMenuEvent is fired, when the user requests the context menu using the mouse or keyboard.

      To make JavaFX more accessible for long-term Java developers I recommend mentioning this in the docs for MouseEvent and KeyEvent with a comment such as

      "To handle mouse or keyboard events that triggers the context menu, see the ContextMenuEvent."

            Assignee:
            Pavel Ĺ afrata
            Reporter:
            Randahl Isaksen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: