private void registerKeybinding(int action, String actionName, KeyStroke stroke, String editorActionName){ KeyStroke[] keys = findEditorKeys(editorActionName, stroke); for (int i = 0; i < keys.length; i++) { getInputMap().put(keys[i], actionName); keyActionPairsList.add(actionName); // add action-name keyActionPairsList.add(keys[i]); // add keystroke } getActionMap().put(actionName, new JDCPopupAction(action)); }
private void registerKeybinding(int action, String actionName, KeyStroke stroke, String editorActionName){ KeyStroke[] keys = findEditorKeys(editorActionName, stroke); for (int i = 0; i < keys.length; i++) { getInputMap().put(keys[i], actionName); keyActionPairsList.add(actionName); // add action-name keyActionPairsList.add(keys[i]); // add keystroke } getActionMap().put(actionName, new JDCPopupAction(action)); }
public void mouseClicked(MouseEvent evt) { if (SwingUtilities.isLeftMouseButton(evt)) { JTextComponent component = extEditorUI.getComponent(); if( component != null && evt.getClickCount() == 2 ) { JDCPopupPanel jdc = ExtUtilities.getJDCPopupPanel(component); if (jdc != null) { Action a = jdc.getActionMap().get(JDCPopupPanel.COMPLETION_SUBSTITUTE_TEXT); if (a != null) { a.actionPerformed(new ActionEvent(component, ActionEvent.ACTION_PERFORMED, "")); // NOI18N } } } } } }
public void mouseClicked(MouseEvent evt) { if (SwingUtilities.isLeftMouseButton(evt)) { JTextComponent component = extEditorUI.getComponent(); if( component != null && evt.getClickCount() == 2 ) { JDCPopupPanel jdc = ExtUtilities.getJDCPopupPanel(component); if (jdc != null) { Action a = jdc.getActionMap().get(JDCPopupPanel.COMPLETION_SUBSTITUTE_TEXT); if (a != null) { a.actionPerformed(new ActionEvent(component, ActionEvent.ACTION_PERFORMED, "")); // NOI18N } } } } } }
private void unregisterKeybinding(String actionName, KeyStroke stroke) { getInputMap().remove(stroke); getActionMap().remove(actionName); }
private void unregisterKeybinding(String actionName, KeyStroke stroke) { getInputMap().remove(stroke); getActionMap().remove(actionName); }