protected void finalize() throws Throwable { if (docL != null) { getDocument().removeDocumentListener(docL); docL = null; } super.finalize(); }
protected void finalize() throws Throwable { if (docL != null) { getDocument().removeDocumentListener(docL); docL = null; } super.finalize(); }
public void insertUpdate(DocumentEvent evt) { if (lastItem != null && evt.getOffset() < lastItem.getOffset() + lastItem.getImage().length()) { docModified = true; getDocument().removeDocumentListener(this); docL = null; } }
public void removeUpdate(DocumentEvent evt) { if (lastItem != null && evt.getOffset() < lastItem.getOffset() + lastItem.getImage().length()) { docModified = true; getDocument().removeDocumentListener(this); docL = null; } }
doc.removeDocumentListener(docL); ((BaseDocument) evt.getOldValue()).removeDocumentListener(docL);
doc.removeDocumentListener(docL); ((BaseDocument)evt.getOldValue()).removeDocumentListener(docL);
doc.removeDocumentListener(docL); ((BaseDocument)evt.getOldValue()).removeDocumentListener(docL);
oldDoc.removeDocumentListener(this);
private void update(final Interrupter interrupter) { BaseDocument doc = getDocument(); if (doc != null) { DocumentListener listener = null; if (interrupter instanceof InterrupterImpl) { listener = new DocumentListener(){ @Override public void insertUpdate(DocumentEvent e) { ((InterrupterImpl)interrupter).cancel(); } @Override public void removeUpdate(DocumentEvent e) { ((InterrupterImpl)interrupter).cancel(); } @Override public void changedUpdate(DocumentEvent e) { } }; doc.addDocumentListener(listener); } try { update(doc, interrupter); } finally { if (listener != null) { doc.removeDocumentListener(listener); } } } }
oldDoc.removeDocumentListener(this);
protected void modelChanged(BaseDocument oldDoc, BaseDocument newDoc) { oldDoc.removeDocumentListener(this);
doc.removeDocumentListener(this); caret.removeChangeListener(this); if (caretTimer != null) {
} finally { if (listener != null) { doc.removeDocumentListener(listener);
/** Deinstalls the UI for a component */ public void uninstallUI(JComponent c) { super.uninstallUI(c); Settings.removeSettingsChangeListener(this); //c.removePropertyChangeListener(this); if (c instanceof JTextComponent){ JTextComponent comp = (JTextComponent)c; BaseDocument doc = Utilities.getDocument(comp); if (doc != null) { doc.removeDocumentListener(this); } comp.setKeymap(null); comp.setCaret(null); getEditorUI().uninstallUI(comp); Registry.removeComponent(comp); } // Clear the editorUI so it will be recreated according to the kit // of the component for which the installUI() is called editorUI = null; }
protected void modelChanged(BaseDocument oldDoc, BaseDocument newDoc) { oldDoc.removeDocumentListener(this); oldDoc.removeAtomicLockListener(this);