[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] FYI: reimplemented BasicTextUI.getKeymapName
From: |
Roman Kennke |
Subject: |
[cp-patches] FYI: reimplemented BasicTextUI.getKeymapName |
Date: |
Mon, 06 Jun 2005 11:54:26 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021204 |
The method getKeymapName in BasicTextUI was slightly wrong implemented.
This caused bugs like:
https://savannah.gnu.org/bugs/?func=detailitem&item_id=13298
The attached patch fixes this.
2005-06-06 Roman Kennke <address@hidden>
* javax/swing/plaf/basic/BasicTextUI.java
(getKeymapName): Reimplemented to return the classname of
itself. This way subclasses don't have to override this
method.
/Roman
Index: javax/swing/plaf/basic/BasicTextUI.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicTextUI.java,v
retrieving revision 1.20
diff -u -r1.20 BasicTextUI.java
--- javax/swing/plaf/basic/BasicTextUI.java 3 Jun 2005 11:55:29 -0000
1.20
+++ javax/swing/plaf/basic/BasicTextUI.java 6 Jun 2005 09:48:11 -0000
@@ -354,7 +354,11 @@
protected String getKeymapName()
{
- return "BasicTextUI";
+ String fullClassName = getClass().getName();
+ int index = fullClassName.lastIndexOf('.');
+ String className = fullClassName.substring(index + 1);
+ System.err.println("getKeymapName: " + className);
+ return className;
}
protected Keymap createKeymap()
- [cp-patches] FYI: reimplemented BasicTextUI.getKeymapName,
Roman Kennke <=