In BasicTextUI we need to unregister the document handler in order to
clean up correctly on UI change.
2006-08-13 Roman Kennke <[EMAIL PROTECTED]>
* javax/swing/plaf/basic/BasicTextUI.java
(uninstallListeners): Unregister document listener.
/Roman
Index: javax/swing/plaf/basic/BasicTextUI.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicTextUI.java,v
retrieving revision 1.90
diff -u -1 -2 -r1.90 BasicTextUI.java
--- javax/swing/plaf/basic/BasicTextUI.java 12 Aug 2006 22:16:12 -0000 1.90
+++ javax/swing/plaf/basic/BasicTextUI.java 13 Aug 2006 13:07:29 -0000
@@ -857,24 +857,25 @@
protected void uninstallDefaults()
{
// Do nothing here.
}
/**
* Uninstalls all listeners that have previously been installed by
* this UI.
*/
protected void uninstallListeners()
{
textComponent.removeFocusListener(focuslistener);
+ textComponent.getDocument().removeDocumentListener(documentHandler);
}
/**
* Uninstalls all keyboard actions that have previously been installed by
* this UI.
*/
protected void uninstallKeyboardActions()
{
SwingUtilities.replaceUIInputMap(textComponent, JComponent.WHEN_FOCUSED,
null);
SwingUtilities.replaceUIActionMap(textComponent, null);
}