[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] FYI: various fixes for JFormattedTextField
From: |
Roman Kennke |
Subject: |
[cp-patches] FYI: various fixes for JFormattedTextField |
Date: |
Wed, 08 Jun 2005 16:17:01 +0200 |
User-agent: |
Mozilla Thunderbird 1.0.2 (X11/20050317) |
This fixes some smaller issues with JFormattedTextField and makes this
usable to a certain degree.
2005-06-08 Roman Kennke <address@hidden>
* javax/swing/JFormattedTextField.java
(getActions): Call super.getActions instead of throwing an exception.
This is safe here.
(processFocusEvent): Likewise.
* javax/swing/plaf/basic/BasicTextUI.java
(createKeymap): Construct new bindings array if UIDefaults does return
a null object for this.
/Roman
Index: javax/swing/JFormattedTextField.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JFormattedTextField.java,v
retrieving revision 1.12
diff -u -r1.12 JFormattedTextField.java
--- javax/swing/JFormattedTextField.java 26 Apr 2005 18:56:19 -0000
1.12
+++ javax/swing/JFormattedTextField.java 8 Jun 2005 14:10:42 -0000
@@ -197,7 +197,8 @@
public Action[] getActions ()
{
- throw new InternalError ("not implemented");
+ // FIXME: Add JFormattedTextField specific actions
+ return super.getActions();
}
public int getFocusLostBehavior()
@@ -240,7 +241,10 @@
protected void processFocusEvent (FocusEvent evt)
{
- throw new InternalError ("not implemented");
+ // it's safe to simply call super for now, until it gets clear
+ // what this method is supposed to do
+ // throw new InternalError ("not implemented");
+ super.processFocusEvent(evt);
}
public void setDocument(Document newDocument)
Index: javax/swing/plaf/basic/BasicTextUI.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicTextUI.java,v
retrieving revision 1.23
diff -u -r1.23 BasicTextUI.java
--- javax/swing/plaf/basic/BasicTextUI.java 6 Jun 2005 11:29:49 -0000
1.23
+++ javax/swing/plaf/basic/BasicTextUI.java 8 Jun 2005 14:10:44 -0000
@@ -375,6 +375,12 @@
UIDefaults defaults = UIManager.getLookAndFeelDefaults();
JTextComponent.KeyBinding[] bindings =
(JTextComponent.KeyBinding[]) defaults.get(prefix + ".keyBindings");
+ if (bindings == null)
+ {
+ bindings = new JTextComponent.KeyBinding[0];
+ defaults.put(prefix + ".keyBindings", bindings);
+ }
+
Keymap km = JTextComponent.addKeymap(getKeymapName(),
JTextComponent.getKeymap(JTextComponent.DEFAULT_KEYMAP));
JTextComponent.loadKeymap(km, bindings, textComponent.getActions());
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] FYI: various fixes for JFormattedTextField,
Roman Kennke <=