private void detach() { textComponent.removeKeyListener(this); }
void unregisterListeners() { _editor.getDocument().removeUndoableEditListener( _docListener ); _editor.removeKeyListener( _editorKeyListener ); }
private void detach() { textComponent.removeKeyListener(this); textComponent.getDocument().removeDocumentListener(this); }
public void remove() { this.component.removeMouseListener(this.mouseHandler); this.component.removeKeyListener(this.keyHandler); } }
@Override protected void unregisterListeners() { getEditor().getDocument().removeUndoableEditListener( _docListener ); getEditor().removeKeyListener( _editorKeyListener ); }
@Override protected void unregisterListeners() { getEditor().getDocument().removeUndoableEditListener( _docListener ); getEditor().removeKeyListener( _editorKeyListener ); }
public void keyPressed (KeyEvent e) { if ((e.getKeyCode () == KeyEvent.VK_ESCAPE && e.getModifiers () == 0) || (e.getKeyCode () == KeyEvent.VK_ENTER && e.getModifiers() == 0) ) { if (highlights == null) return; final List<Highlight> oldHighlights = highlights; SwingUtilities.invokeLater (new Runnable () { public void run () { Iterator<Highlight> it = oldHighlights.iterator (); while (it.hasNext ()) it.next ().remove (); } }); editor.removeKeyListener (this); document.removeDocumentListener (this); highlights = null; elements = null; editor = null; document = null; renameImplementation = null; e.consume (); } }
public void endProcessing() { _processingEnded = true; _sqlPanelApi.getSQLEntryPanel().getTextComponent().removeKeyListener(_triggerParserKeyListener); if (_parserTimer != null) { _parserTimer.stop(); } if (_parserThread != null) { _parserThread.exitThread(); } _session = null; _sqlPanelApi = null; _listeners = null; }
public void endProcessing() { _processingEnded = true; _sqlPanelApi.getSQLEntryPanel().getTextComponent().removeKeyListener(_triggerParserKeyListener); if (_parserTimer != null) { _parserTimer.stop(); } if (_parserThread != null) { _parserThread.exitThread(); } _session = null; _sqlPanelApi = null; _listeners = null; }
private void release() { target.putClientProperty(InstantRenamePerformer.class, null); if (doc instanceof BaseDocument) { ((BaseDocument) doc).removePostModificationDocumentListener(this); } target.removeKeyListener(this); target = null; region = null; attribs = null; requestRepaint(); doc = null; }
/** Has to be called from AWT event thread to be properly synchronized */ public void stopBlocking() { this.component.removeKeyListener(this); KeyboardFocusManager kfm = KeyboardFocusManager.getCurrentKeyboardFocusManager(); while(!blockedEvents.isEmpty()) { KeyEvent e = (KeyEvent)blockedEvents.removeFirst(); e = new KeyEvent((Component)e.getSource(), e.getID(), e.getWhen(), e.getModifiers(), e.getKeyCode(), e.getKeyChar(), e.getKeyLocation()); kfm.dispatchEvent(e); } }
public void uninstall() { hidePopup(); textComponent.removeKeyListener(keyListener); textComponent.removeComponentListener(componentListener); textComponent.removeFocusListener(focusListener); textComponent.removeHierarchyListener(hierarchyListener); } }
public void uninstall() { hidePopup(); textComponent.removeKeyListener(keyListener); textComponent.removeComponentListener(componentListener); textComponent.removeFocusListener(focusListener); textComponent.removeHierarchyListener(hierarchyListener); } }
public void uninstall() { hidePopup(); textComponent.removeKeyListener(keyListener); textComponent.removeComponentListener(componentListener); textComponent.removeFocusListener(focusListener); textComponent.removeHierarchyListener(hierarchyListener); } }
public void uninstall() { hidePopup(); textComponent.removeKeyListener(keyListener); textComponent.removeComponentListener(componentListener); textComponent.removeFocusListener(focusListener); textComponent.removeHierarchyListener(hierarchyListener); } }
private synchronized void release() { if (target == null) { //already released return; } target.putClientProperty(InstantRenamePerformer.class, null); if (doc instanceof BaseDocument) { ((BaseDocument) doc).removePostModificationDocumentListener(this); } target.removeKeyListener(this); getHighlightsBag(doc).clear(); region = null; doc = null; target = null; instance = null; }
void configureEditor(final ComboBoxEditor newEditor) { if (editor != null) { editor.removeKeyListener(editorKeyListener); editor.removeFocusListener(editorFocusListener); } if (newEditor != null) { editor = (JTextComponent) newEditor.getEditorComponent(); editor.addKeyListener(editorKeyListener); editor.addFocusListener(editorFocusListener); editor.setDocument(this); } }
void configureEditor(final ComboBoxEditor pNewEditor) { if (mEditor != null) { mEditor.removeKeyListener(mEditorKeyListener); mEditor.removeFocusListener(mEditorFocusListener); } if (pNewEditor != null) { mEditor = (JTextComponent) pNewEditor.getEditorComponent(); mEditor.addKeyListener(mEditorKeyListener); mEditor.addFocusListener(mEditorFocusListener); mEditor.setDocument(this); } }
private void configureEditor(JTextComponent textComponent) { if (getTextComponent() != null) { getTextComponent().removeKeyListener(_editorKeyListener); // getTextComponent().removeFocusListener(_editorFocusListener); } if (textComponent != null) { _textComponent = textComponent; getTextComponent().addKeyListener(_editorKeyListener); // getTextComponent().addFocusListener(_editorFocusListener); String text = getTextComponent().getText(); _oldDocument = getTextComponent().getDocument(); if (_oldDocument instanceof AbstractDocument && _document != null) { _document.setDocumentFilter(((AbstractDocument) _oldDocument).getDocumentFilter()); } getTextComponent().setDocument(_document); getTextComponent().setText(text); } }
/** * Uninstalls the listeners so that the component is not auto-completion anymore. */ public void uninstallListeners() { if (_propertyChangeListener != null && _comboBox != null) { _comboBox.removePropertyChangeListener(_propertyChangeListener); } if (getTextComponent() != null) { getTextComponent().removeKeyListener(_editorKeyListener); // getTextComponent().removeFocusListener(_editorFocusListener); String text = getTextComponent().getText(); if (_oldDocument != null) { getTextComponent().setDocument(_oldDocument); _oldDocument = null; } getTextComponent().setText(text); } getTextComponent().putClientProperty(CLIENT_PROPERTY_AUTO_COMPLETION, null); }