public final void registerAction( @NonNls String aActionName, int aKeyCode, @JdkConstants.InputEventMask int aModifier, Action aAction) { myInputMap.put(KeyStroke.getKeyStroke(aKeyCode, aModifier), aActionName); myActionMap.put(aActionName, aAction); }
private boolean proceedKeyEvent(KeyEvent event, KeyStroke stroke) { if (myInputMap.get(stroke) != null) { final Action action = myActionMap.get(myInputMap.get(stroke)); if (action != null && action.isEnabled()) { action.actionPerformed( new ActionEvent( getContent(), event.getID(), "", event.getWhen(), event.getModifiers())); return true; } } return false; }
public final void registerAction( @NonNls String aActionName, KeyStroke keyStroke, Action aAction) { myInputMap.put(keyStroke, aActionName); myActionMap.put(aActionName, aAction); }