[kaffe] CVS kaffe (robilad): Resynced with GNU Claspath: JTextField fixes
Kaffe CVS
cvs-commits at kaffe.org
Sat Jan 22 11:00:51 PST 2005
PatchSet 5894
Date: 2005/01/22 18:51:52
Author: robilad
Branch: HEAD
Tag: (none)
Log:
Resynced with GNU Claspath: JTextField fixes
2005-01-22 Dalibor Topic <robilad at kaffe.org>
Resynced with GNU Classpath.
2005-01-20 Michael Koch <konqueror at gmx.de>
* javax/swing/JTextField.java
(actions): New field.
(static): Initalize actions field.
(getActions): New method.
Members:
ChangeLog:1.3433->1.3434
libraries/javalib/javax/swing/JTextField.java:1.6->1.7
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3433 kaffe/ChangeLog:1.3434
--- kaffe/ChangeLog:1.3433 Sat Jan 22 18:50:24 2005
+++ kaffe/ChangeLog Sat Jan 22 18:51:52 2005
@@ -2,6 +2,17 @@
Resynced with GNU Classpath.
+ 2005-01-20 Michael Koch <konqueror at gmx.de>
+
+ * javax/swing/JTextField.java
+ (actions): New field.
+ (static): Initalize actions field.
+ (getActions): New method.
+
+2005-01-22 Dalibor Topic <robilad at kaffe.org>
+
+ Resynced with GNU Classpath.
+
2005-01-20 Mark Wielaard <mark at klomp.org>
* javax/naming/directory/BasicAttributes.java (equals): Compare to any
Index: kaffe/libraries/javalib/javax/swing/JTextField.java
diff -u kaffe/libraries/javalib/javax/swing/JTextField.java:1.6 kaffe/libraries/javalib/javax/swing/JTextField.java:1.7
--- kaffe/libraries/javalib/javax/swing/JTextField.java:1.6 Thu Dec 23 01:58:52 2004
+++ kaffe/libraries/javalib/javax/swing/JTextField.java Sat Jan 22 18:52:01 2005
@@ -47,9 +47,11 @@
import java.beans.PropertyChangeListener;
import javax.accessibility.AccessibleStateSet;
+import javax.swing.Action;
import javax.swing.text.Document;
import javax.swing.text.JTextComponent;
import javax.swing.text.PlainDocument;
+import javax.swing.text.TextAction;
public class JTextField extends JTextComponent
implements SwingConstants
@@ -80,12 +82,25 @@
private static final long serialVersionUID = 353853209832607592L;
+ private static final Action[] actions;
+
public static final String notifyAction = "notify-field-accept";
+ static
+ {
+ actions = new Action[1];
+ actions[0] = new TextAction(notifyAction)
+ {
+ public void actionPerformed(ActionEvent event)
+ {
+ JTextField textField = (JTextField) event.getSource();
+ textField.fireActionPerformed();
+ }
+ };
+ }
+
private int columns;
-
private int align;
-
private int scrollOffset;
/** @since 1.3 */
@@ -298,6 +313,11 @@
public void setScrollOffset(int offset)
{
scrollOffset = offset;
+ }
+
+ public Action[] getActions()
+ {
+ return TextAction.augmentList(super.getActions(), actions);
}
public void postActionEvent()
More information about the kaffe
mailing list