Class EditorShortcuts
java.lang.Object
ch.autumo.ui.fx.view.EditorShortcuts
The editing shortcuts of a Swing editor inside a
SwingNode.
A Cmd/Ctrl combination does not reach the Swing component on every platform: JavaFX handles the key event first. The shortcuts are therefore intercepted on the JavaFX node and executed on the editor directly. The system clipboard of JavaFX is used instead of the clipboard of Swing, so copying in another application and pasting into the editor works - and the other way round.
Handled are Cmd/Ctrl+C (copy), +V (paste), +X (cut), +A (select all), +Z (undo) and Shift+Z (redo). Paste, cut and undo/redo do nothing when the editor is not editable.
-
Method Summary
-
Method Details
-
install
Intercepts the editing shortcuts of the editor.- Parameters:
root- the JavaFX node that contains theSwingNodeof the editorarea- the editor widget
-