This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[gui] Patch: javax.swing.text
- From: Michael Koch <konqueror at gmx dot de>
- To: java-patches at gcc dot gnu dot org
- Date: Wed, 11 Aug 2004 15:36:46 +0200
- Subject: [gui] Patch: javax.swing.text
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi list,
I just commited the attached patch add some new classes for swing and
to fix one method in FieldView.
Michael
2004-08-11 Michael Koch <konqueror@gmx.de>
* javax/swing/plaf/basic/BasicFormattedTextFieldUI.java,
javax/swing/plaf/basic/BasicPasswordFieldUI.java,
javax/swing/plaf/basic/BasicTextAreaUI.java: New files.
* javax/swing/text/FieldView.java
(paint): Just call super method for now.
* Makefile.am: Added new files.
* Makefile.in: Regenerated.
- --
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFBGiDyWSOgCCdjSDsRAuyLAJ9sT87pO1nRT6FACkkSha1PvnxOLgCfUUmP
MJof1RXtemwfRIeROA2NqHA=
=4+qN
-----END PGP SIGNATURE-----
Index: javax/swing/plaf/basic/BasicFormattedTextFieldUI.java
===================================================================
RCS file: javax/swing/plaf/basic/BasicFormattedTextFieldUI.java
diff -N javax/swing/plaf/basic/BasicFormattedTextFieldUI.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ javax/swing/plaf/basic/BasicFormattedTextFieldUI.java 11 Aug 2004 13:30:47 -0000
@@ -0,0 +1,62 @@
+/* BasicFormattedTextFieldUI.java
+ Copyright (C) 2004 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.plaf.basic;
+
+import javax.swing.JComponent;
+import javax.swing.plaf.ComponentUI;
+
+/**
+ * @since 1.4
+ */
+public class BasicFormattedTextFieldUI extends BasicTextFieldUI
+{
+ public BasicFormattedTextFieldUI()
+ {
+ }
+
+ public static ComponentUI createUI(JComponent c)
+ {
+ return new BasicFormattedTextFieldUI();
+ }
+
+ protected String getPropertyPrefix()
+ {
+ return "FormattedTextField";
+ }
+}
\ No newline at end of file
Index: javax/swing/plaf/basic/BasicPasswordFieldUI.java
===================================================================
RCS file: javax/swing/plaf/basic/BasicPasswordFieldUI.java
diff -N javax/swing/plaf/basic/BasicPasswordFieldUI.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ javax/swing/plaf/basic/BasicPasswordFieldUI.java 11 Aug 2004 13:30:47 -0000
@@ -0,0 +1,61 @@
+/* BasicPasswordFieldUI.java
+ Copyright (C) 2004 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.plaf.basic;
+
+import javax.swing.JComponent;
+import javax.swing.plaf.ComponentUI;
+import javax.swing.text.Element;
+import javax.swing.text.View;
+
+public class BasicPasswordFieldUI extends BasicTextFieldUI
+{
+ public BasicPasswordFieldUI()
+ {
+ }
+
+ public static ComponentUI createUI(JComponent c)
+ {
+ return new BasicPasswordFieldUI();
+ }
+
+ protected String getPropertyPrefix()
+ {
+ return "PasswordField";
+ }
+}
Index: javax/swing/plaf/basic/BasicTextAreaUI.java
===================================================================
RCS file: javax/swing/plaf/basic/BasicTextAreaUI.java
diff -N javax/swing/plaf/basic/BasicTextAreaUI.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ javax/swing/plaf/basic/BasicTextAreaUI.java 11 Aug 2004 13:30:47 -0000
@@ -0,0 +1,61 @@
+/* BasicTextAreaUI.java --
+ Copyright (C) 2004 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.plaf.basic;
+
+import java.beans.PropertyChangeEvent;
+
+import javax.swing.JComponent;
+import javax.swing.plaf.ComponentUI;
+
+public class BasicTextAreaUI extends BasicTextUI
+{
+ public static ComponentUI createUI(JComponent comp)
+ {
+ return new BasicTextAreaUI();
+ }
+
+ public BasicTextAreaUI()
+ {
+ }
+
+ protected String getPropertyPrefix()
+ {
+ return "TextArea";
+ }
+}
Index: Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libjava/Makefile.am,v
retrieving revision 1.361.2.38
diff -u -b -B -r1.361.2.38 Makefile.am
--- Makefile.am 11 Aug 2004 13:19:04 -0000 1.361.2.38
+++ Makefile.am 11 Aug 2004 13:30:48 -0000
@@ -1306,6 +1306,7 @@
javax/swing/plaf/basic/BasicCheckBoxUI.java \
javax/swing/plaf/basic/BasicDesktopIconUI.java \
javax/swing/plaf/basic/BasicDesktopPaneUI.java \
+javax/swing/plaf/basic/BasicFormattedTextFieldUI.java \
javax/swing/plaf/basic/BasicGraphicsUtils.java \
javax/swing/plaf/basic/BasicInternalFrameTitlePane.java \
javax/swing/plaf/basic/BasicInternalFrameUI.java \
@@ -1316,6 +1317,7 @@
javax/swing/plaf/basic/BasicMenuItemUI.java \
javax/swing/plaf/basic/BasicOptionPaneUI.java \
javax/swing/plaf/basic/BasicPanelUI.java \
+javax/swing/plaf/basic/BasicPasswordFieldUI.java \
javax/swing/plaf/basic/BasicPopupMenuUI.java \
javax/swing/plaf/basic/BasicPopupMenuSeparatorUI.java \
javax/swing/plaf/basic/BasicProgressBarUI.java \
@@ -1331,6 +1333,7 @@
javax/swing/plaf/basic/BasicSplitPaneDivider.java \
javax/swing/plaf/basic/BasicSplitPaneUI.java \
javax/swing/plaf/basic/BasicTabbedPaneUI.java \
+javax/swing/plaf/basic/BasicTextAreaUI.java \
javax/swing/plaf/basic/BasicTextFieldUI.java \
javax/swing/plaf/basic/BasicTextUI.java \
javax/swing/plaf/basic/BasicToggleButtonUI.java \
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/libjava/Makefile.in,v
retrieving revision 1.385.2.38
diff -u -b -B -r1.385.2.38 Makefile.in
--- Makefile.in 11 Aug 2004 13:19:04 -0000 1.385.2.38
+++ Makefile.in 11 Aug 2004 13:30:50 -0000
@@ -984,6 +984,7 @@
javax/swing/plaf/basic/BasicCheckBoxUI.java \
javax/swing/plaf/basic/BasicDesktopIconUI.java \
javax/swing/plaf/basic/BasicDesktopPaneUI.java \
+javax/swing/plaf/basic/BasicFormattedTextFieldUI.java \
javax/swing/plaf/basic/BasicGraphicsUtils.java \
javax/swing/plaf/basic/BasicInternalFrameTitlePane.java \
javax/swing/plaf/basic/BasicInternalFrameUI.java \
@@ -994,6 +995,7 @@
javax/swing/plaf/basic/BasicMenuItemUI.java \
javax/swing/plaf/basic/BasicOptionPaneUI.java \
javax/swing/plaf/basic/BasicPanelUI.java \
+javax/swing/plaf/basic/BasicPasswordFieldUI.java \
javax/swing/plaf/basic/BasicPopupMenuUI.java \
javax/swing/plaf/basic/BasicPopupMenuSeparatorUI.java \
javax/swing/plaf/basic/BasicProgressBarUI.java \
@@ -1009,6 +1011,7 @@
javax/swing/plaf/basic/BasicSplitPaneDivider.java \
javax/swing/plaf/basic/BasicSplitPaneUI.java \
javax/swing/plaf/basic/BasicTabbedPaneUI.java \
+javax/swing/plaf/basic/BasicTextAreaUI.java \
javax/swing/plaf/basic/BasicTextFieldUI.java \
javax/swing/plaf/basic/BasicTextUI.java \
javax/swing/plaf/basic/BasicToggleButtonUI.java \
@@ -3132,6 +3135,7 @@
javax/swing/plaf/basic/BasicCheckBoxUI.lo \
javax/swing/plaf/basic/BasicDesktopIconUI.lo \
javax/swing/plaf/basic/BasicDesktopPaneUI.lo \
+javax/swing/plaf/basic/BasicFormattedTextFieldUI.lo \
javax/swing/plaf/basic/BasicGraphicsUtils.lo \
javax/swing/plaf/basic/BasicInternalFrameTitlePane.lo \
javax/swing/plaf/basic/BasicInternalFrameUI.lo \
@@ -3142,6 +3146,7 @@
javax/swing/plaf/basic/BasicMenuItemUI.lo \
javax/swing/plaf/basic/BasicOptionPaneUI.lo \
javax/swing/plaf/basic/BasicPanelUI.lo \
+javax/swing/plaf/basic/BasicPasswordFieldUI.lo \
javax/swing/plaf/basic/BasicPopupMenuUI.lo \
javax/swing/plaf/basic/BasicPopupMenuSeparatorUI.lo \
javax/swing/plaf/basic/BasicProgressBarUI.lo \
@@ -3157,6 +3162,7 @@
javax/swing/plaf/basic/BasicSplitPaneDivider.lo \
javax/swing/plaf/basic/BasicSplitPaneUI.lo \
javax/swing/plaf/basic/BasicTabbedPaneUI.lo \
+javax/swing/plaf/basic/BasicTextAreaUI.lo \
javax/swing/plaf/basic/BasicTextFieldUI.lo \
javax/swing/plaf/basic/BasicTextUI.lo \
javax/swing/plaf/basic/BasicToggleButtonUI.lo \
@@ -5322,6 +5328,7 @@
.deps/javax/swing/plaf/basic/BasicCheckBoxUI.P \
.deps/javax/swing/plaf/basic/BasicDesktopIconUI.P \
.deps/javax/swing/plaf/basic/BasicDesktopPaneUI.P \
+.deps/javax/swing/plaf/basic/BasicFormattedTextFieldUI.P \
.deps/javax/swing/plaf/basic/BasicGraphicsUtils.P \
.deps/javax/swing/plaf/basic/BasicIconFactory.P \
.deps/javax/swing/plaf/basic/BasicInternalFrameTitlePane.P \
@@ -5334,6 +5341,7 @@
.deps/javax/swing/plaf/basic/BasicMenuUI.P \
.deps/javax/swing/plaf/basic/BasicOptionPaneUI.P \
.deps/javax/swing/plaf/basic/BasicPanelUI.P \
+.deps/javax/swing/plaf/basic/BasicPasswordFieldUI.P \
.deps/javax/swing/plaf/basic/BasicPopupMenuSeparatorUI.P \
.deps/javax/swing/plaf/basic/BasicPopupMenuUI.P \
.deps/javax/swing/plaf/basic/BasicProgressBarUI.P \
@@ -5348,6 +5356,7 @@
.deps/javax/swing/plaf/basic/BasicSplitPaneDivider.P \
.deps/javax/swing/plaf/basic/BasicSplitPaneUI.P \
.deps/javax/swing/plaf/basic/BasicTabbedPaneUI.P \
+.deps/javax/swing/plaf/basic/BasicTextAreaUI.P \
.deps/javax/swing/plaf/basic/BasicTextFieldUI.P \
.deps/javax/swing/plaf/basic/BasicTextUI.P \
.deps/javax/swing/plaf/basic/BasicToggleButtonUI.P \
Index: javax/swing/text/FieldView.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/text/FieldView.java,v
retrieving revision 1.1.2.1
diff -u -b -B -r1.1.2.1 FieldView.java
--- javax/swing/text/FieldView.java 29 Jun 2004 11:30:50 -0000 1.1.2.1
+++ javax/swing/text/FieldView.java 11 Aug 2004 13:30:50 -0000
@@ -92,6 +92,6 @@
public void paint(Graphics g, Shape s)
{
- drawLine(0, g, 0, 0);
+ super.paint(g, s);
}
}