Register a keybinding in the given components WHEN_IN_FOCUSED_WINDOW input map, runing the given action when the action's accelerator key is pressed. Note that this is typically automatically handled when the action is assigned to a JMenuItem, but it can still be needed for other actions, or action
(final JComponent component, final Action action)
| 61 | * enabled, it is registered again. |
| 62 | */ |
| 63 | public static void bind(final JComponent component, final Action action) { |
| 64 | bind(component, action, |
| 65 | (KeyStroke) action.getValue(Action.ACCELERATOR_KEY)); |
| 66 | } |
| 67 | |
| 68 | /** |
| 69 | * Register a keybinding, running the given action when the given keystroke is |
no test coverage detected