List of usage examples for javax.swing.text JTextComponent getInputMap
public final InputMap getInputMap()
InputMap
that is used when the component has focus. From source file:org.executequery.gui.editor.autocomplete.QueryEditorAutoCompletePopupProvider.java
private void resetEditorActions() { JTextComponent textComponent = queryEditorTextComponent(); ActionMap actionMap = textComponent.getActionMap(); actionMap.remove(LIST_FOCUS_ACTION_KEY); actionMap.remove(LIST_SELECTION_ACTION_KEY); actionMap.remove(LIST_SCROLL_ACTION_KEY_DOWN); actionMap.remove(LIST_SCROLL_ACTION_KEY_UP); InputMap inputMap = textComponent.getInputMap(); inputMap.remove(KEY_STROKE_DOWN);//from ww w .j a va2 s .co m inputMap.remove(KEY_STROKE_UP); inputMap.remove(KEY_STROKE_PAGE_DOWN); inputMap.remove(KEY_STROKE_PAGE_UP); inputMap.remove(KEY_STROKE_ENTER); inputMap.remove(KEY_STROKE_TAB); inputMap.put(KEY_STROKE_DOWN, existingKeyStrokeDownAction); inputMap.put(KEY_STROKE_UP, existingKeyStrokeUpAction); inputMap.put(KEY_STROKE_PAGE_DOWN, existingKeyStrokePageDownAction); inputMap.put(KEY_STROKE_PAGE_UP, existingKeyStrokePageUpAction); inputMap.put(KEY_STROKE_TAB, existingKeyStrokeTabAction); inputMap.put(KEY_STROKE_ENTER, existingKeyStrokeEnterAction); textComponent.removeCaretListener(this); }