MCPcopy Index your code
hub / github.com/benfry/processing4 / registerWindowCloseKeys

Method registerWindowCloseKeys

app/src/processing/app/ui/Toolkit.java:883–892  ·  view source on GitHub ↗

Registers key events for a Ctrl-W and ESC with an ActionListener that will take care of disposing the window.

(JRootPane root,
                                             ActionListener disposer)

Source from the content-addressed store, hash-verified

881 * that will take care of disposing the window.
882 */
883 static public void registerWindowCloseKeys(JRootPane root,
884 ActionListener disposer) {
885 KeyStroke stroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0);
886 root.registerKeyboardAction(disposer, stroke,
887 JComponent.WHEN_IN_FOCUSED_WINDOW);
888
889 stroke = KeyStroke.getKeyStroke('W', SHORTCUT_KEY_MASK);
890 root.registerKeyboardAction(disposer, stroke,
891 JComponent.WHEN_IN_FOCUSED_WINDOW);
892 }
893
894
895 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Callers 11

initMethod · 0.95
CharacterSelectorMethod · 0.95
initMethod · 0.95
WebFrameMethod · 0.95
PreferencesFrameMethod · 0.95
ExamplesFrameMethod · 0.95
SketchbookFrameMethod · 0.95
FindReplaceMethod · 0.95
ColorChooserMethod · 0.95
RenameMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected