This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gui] Patch: javax.swing.


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi list,


I just commited the attached patch to remove two classes from Swing 
which where never intended to be in it.


Michael


2004-06-29  Michael Koch  <konqueror@gmx.de>

	* javax/swing/JEditorPane.java
	(createDefaultEditorKit): Use javax.swing.text.DefaultEditorKit.
	(createEditorKitForContentType): Likewise.
	* javax/swing/text/DefaultEditorKit.java
	(serialVersionUID): Added constant field.
	(EndOfLineStringPropery): Fixed typo.
	(DefaultEditorKit): New constructor.
	* javax/swing/text/Segment.java:
	Import java.text.CharacterIterator.
	* javax/swing/text/CharacterIterator.java,
	javax/swing/text/PlainEditorKit.java: Removed.
	* Makefile.am: Removed javax/swing/text/CharacterIterator.java and
	javax/swing/text/PlainEditorKit.java.
	* Makefile.in: Regenerated.
- -- 
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFA4R/hWSOgCCdjSDsRAoLlAJ97umP2xkSVHjTL9fjkC2TNl3TqWQCdH+sN
jUtU9ivIaUhBsZKnn2IdTfg=
=goup
-----END PGP SIGNATURE-----
Index: javax/swing/JEditorPane.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/JEditorPane.java,v
retrieving revision 1.5.2.3
diff -u -b -B -r1.5.2.3 JEditorPane.java
--- javax/swing/JEditorPane.java	11 Jun 2004 06:38:42 -0000	1.5.2.3
+++ javax/swing/JEditorPane.java	29 Jun 2004 07:48:01 -0000
@@ -39,9 +39,10 @@
 
 import java.awt.Dimension;
 import java.awt.event.KeyEvent;
-import java.io.IOException;
 import java.io.InputStream;
+import java.io.IOException;
 import java.net.URL;
+
 import javax.accessibility.AccessibleContext;
 import javax.swing.event.HyperlinkEvent;
 import javax.swing.event.HyperlinkListener;
@@ -45,9 +46,9 @@
 import javax.accessibility.AccessibleContext;
 import javax.swing.event.HyperlinkEvent;
 import javax.swing.event.HyperlinkListener;
+import javax.swing.text.DefaultEditorKit;
 import javax.swing.text.EditorKit;
 import javax.swing.text.JTextComponent;
-import javax.swing.text.PlainEditorKit;
 
 
 public class JEditorPane extends JTextComponent
@@ -82,12 +83,12 @@
 
   protected EditorKit createDefaultEditorKit()
   {
-    return new PlainEditorKit();
+    return new DefaultEditorKit();
   }
 
   protected static EditorKit createEditorKitForContentType(String type)
   {
-    return new PlainEditorKit();
+    return new DefaultEditorKit();
   }
 
   /**
Index: javax/swing/text/DefaultEditorKit.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/text/DefaultEditorKit.java,v
retrieving revision 1.4
diff -u -b -B -r1.4 DefaultEditorKit.java
--- javax/swing/text/DefaultEditorKit.java	10 Jan 2004 21:07:44 -0000	1.4
+++ javax/swing/text/DefaultEditorKit.java	29 Jun 2004 07:48:01 -0000
@@ -46,6 +46,8 @@
 
 public class DefaultEditorKit extends EditorKit
 {
+  private static final long serialVersionUID = 9017245433028523428L;
+  
   public static final String backwardAction = "caret-backward";
   public static final String beepAction = "beep";
   public static final String beginAction = "caret-begin";
@@ -60,7 +62,7 @@
   public static final String downAction = "caret-down";
   public static final String endAction = "caret-end";
   public static final String endLineAction = "caret-end-line";
-  public static final String endOfLineStringProperty = "__EndOfLine__";
+  public static final String EndOfLineStringProperty = "__EndOfLine__";
   public static final String endParagraphAction = "caret-end-paragraph";
   public static final String endWordAction = "caret-end-word";
   public static final String forwardAction = "caret-forward";
@@ -94,6 +96,10 @@
   public static final String upAction = "caret-up";
   public static final String writableAction = "set-writable";
 
+  public DefaultEditorKit()
+  {
+  }
+  
     void deinstall(JEditorPane c)
     {
 	//      Called when the kit is being removed from the JEditorPane. 
Index: javax/swing/text/Segment.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/text/Segment.java,v
retrieving revision 1.2
diff -u -b -B -r1.2 Segment.java
--- javax/swing/text/Segment.java	10 Jan 2004 21:07:44 -0000	1.2
+++ javax/swing/text/Segment.java	29 Jun 2004 07:48:01 -0000
@@ -37,6 +37,8 @@
 
 package javax.swing.text;
 
+import java.text.CharacterIterator;
+
 public class Segment implements Cloneable, CharacterIterator
 {
     char[] array;
Index: javax/swing/text/CharacterIterator.java
===================================================================
RCS file: javax/swing/text/CharacterIterator.java
diff -N javax/swing/text/CharacterIterator.java
--- javax/swing/text/CharacterIterator.java	9 Aug 2002 04:26:12 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,53 +0,0 @@
-/* CharacterIterator.java -- 
-   Copyright (C) 2002 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.text;
-
-
-public interface CharacterIterator extends Cloneable
-{
-    Object clone();
-    char current();
-    char first();
-    int getBeginIndex();
-    int getEndIndex();
-    int getIndex();
-    char last();
-    char next();
-    char previous();
-    char setIndex(int position);    
-}
Index: javax/swing/text/PlainEditorKit.java
===================================================================
RCS file: javax/swing/text/PlainEditorKit.java
diff -N javax/swing/text/PlainEditorKit.java
--- javax/swing/text/PlainEditorKit.java	10 Jan 2004 21:07:44 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,103 +0,0 @@
-/* PlainEditorKit.java -- 
-   Copyright (C) 2002, 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.text;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.Reader;
-import java.io.Writer;
-import javax.swing.Action;
-import javax.swing.JEditorPane;
-
-public class PlainEditorKit extends EditorKit
-{
-    public PlainEditorKit()
-    {
-    }
-
-    public PlainEditorKit(PlainEditorKit kit)
-    {
-	super(kit);
-    }
-
-    protected Object clone()  
-    {
-	return new PlainEditorKit(this);
-    }
-    void deinstall(JEditorPane c)
-    {
-	//      Called when the kit is being removed from the JEditorPane. 
-    }
-    void install(JEditorPane c)
-    {
-    }
-
-    Caret createCaret()
-    {
-	return null;
-    }
-    Document createDefaultDocument()
-    {
-	return null;
-    }
-    Action[] getActions()
-    {
-	return null;
-    }
-    String getContentType()
-    {
-	return null;
-    }
-    ViewFactory getViewFactory()
-    {
-	return null;
-    }
-    void read(InputStream in, Document doc, int pos)
-    {	
-    }
-    void read(Reader in, Document doc, int pos)
-    {
-    }
-    void write(OutputStream out, Document doc, int pos, int len)
-    {
-    }
-    void write(Writer out, Document doc, int pos, int len)
-    {
-    }
-}
-
Index: Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libjava/Makefile.am,v
retrieving revision 1.361.2.21
diff -u -b -B -r1.361.2.21 Makefile.am
--- Makefile.am	24 Jun 2004 17:40:27 -0000	1.361.2.21
+++ Makefile.am	29 Jun 2004 07:48:03 -0000
@@ -1493,7 +1493,6 @@
 javax/swing/text/AttributeSet.java \
 javax/swing/text/BadLocationException.java \
 javax/swing/text/Caret.java \
-javax/swing/text/CharacterIterator.java \
 javax/swing/text/ComponentView.java \
 javax/swing/text/DefaultCaret.java \
 javax/swing/text/DefaultEditorKit.java \
@@ -1507,7 +1506,6 @@
 javax/swing/text/Keymap.java \
 javax/swing/text/LayeredHighlighter.java \
 javax/swing/text/PlainDocument.java \
-javax/swing/text/PlainEditorKit.java \
 javax/swing/text/Position.java \
 javax/swing/text/Segment.java \
 javax/swing/text/Style.java \
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/libjava/Makefile.in,v
retrieving revision 1.385.2.21
diff -u -b -B -r1.385.2.21 Makefile.in
--- Makefile.in	24 Jun 2004 17:40:28 -0000	1.385.2.21
+++ Makefile.in	29 Jun 2004 07:48:05 -0000
@@ -1171,7 +1171,6 @@
 javax/swing/text/AttributeSet.java \
 javax/swing/text/BadLocationException.java \
 javax/swing/text/Caret.java \
-javax/swing/text/CharacterIterator.java \
 javax/swing/text/ComponentView.java \
 javax/swing/text/DefaultCaret.java \
 javax/swing/text/DefaultEditorKit.java \
@@ -1185,7 +1184,6 @@
 javax/swing/text/Keymap.java \
 javax/swing/text/LayeredHighlighter.java \
 javax/swing/text/PlainDocument.java \
-javax/swing/text/PlainEditorKit.java \
 javax/swing/text/Position.java \
 javax/swing/text/Segment.java \
 javax/swing/text/Style.java \
@@ -3241,18 +3239,16 @@
 javax/swing/event/TreeWillExpandListener.lo javax/swing/ActionMap.lo \
 javax/swing/text/AbstractDocument.lo javax/swing/text/AttributeSet.lo \
 javax/swing/text/BadLocationException.lo javax/swing/text/Caret.lo \
-javax/swing/text/CharacterIterator.lo javax/swing/text/ComponentView.lo \
-javax/swing/text/DefaultCaret.lo javax/swing/text/DefaultEditorKit.lo \
-javax/swing/text/Document.lo javax/swing/text/DocumentFilter.lo \
-javax/swing/text/EditorKit.lo javax/swing/text/Element.lo \
-javax/swing/text/GapContent.lo javax/swing/text/Highlighter.lo \
-javax/swing/text/JTextComponent.lo javax/swing/text/Keymap.lo \
-javax/swing/text/LayeredHighlighter.lo \
-javax/swing/text/PlainDocument.lo javax/swing/text/PlainEditorKit.lo \
-javax/swing/text/Position.lo javax/swing/text/Segment.lo \
-javax/swing/text/Style.lo javax/swing/text/TabExpander.lo \
-javax/swing/text/View.lo javax/swing/text/ViewFactory.lo \
-javax/swing/text/MutableAttributeSet.lo \
+javax/swing/text/ComponentView.lo javax/swing/text/DefaultCaret.lo \
+javax/swing/text/DefaultEditorKit.lo javax/swing/text/Document.lo \
+javax/swing/text/DocumentFilter.lo javax/swing/text/EditorKit.lo \
+javax/swing/text/Element.lo javax/swing/text/GapContent.lo \
+javax/swing/text/Highlighter.lo javax/swing/text/JTextComponent.lo \
+javax/swing/text/Keymap.lo javax/swing/text/LayeredHighlighter.lo \
+javax/swing/text/PlainDocument.lo javax/swing/text/Position.lo \
+javax/swing/text/Segment.lo javax/swing/text/Style.lo \
+javax/swing/text/TabExpander.lo javax/swing/text/View.lo \
+javax/swing/text/ViewFactory.lo javax/swing/text/MutableAttributeSet.lo \
 javax/swing/text/NavigationFilter.lo javax/swing/text/StyledDocument.lo \
 javax/swing/text/StyledEditorKit.lo javax/swing/text/TextAction.lo \
 javax/swing/text/html/HTML.lo \
@@ -5315,9 +5311,7 @@
 .deps/javax/swing/text/AbstractDocument.P \
 .deps/javax/swing/text/AttributeSet.P \
 .deps/javax/swing/text/BadLocationException.P \
-.deps/javax/swing/text/Caret.P \
-.deps/javax/swing/text/CharacterIterator.P \
-.deps/javax/swing/text/ComponentView.P \
+.deps/javax/swing/text/Caret.P .deps/javax/swing/text/ComponentView.P \
 .deps/javax/swing/text/DefaultCaret.P \
 .deps/javax/swing/text/DefaultEditorKit.P \
 .deps/javax/swing/text/Document.P \
@@ -5330,7 +5324,6 @@
 .deps/javax/swing/text/MutableAttributeSet.P \
 .deps/javax/swing/text/NavigationFilter.P \
 .deps/javax/swing/text/PlainDocument.P \
-.deps/javax/swing/text/PlainEditorKit.P \
 .deps/javax/swing/text/Position.P .deps/javax/swing/text/Segment.P \
 .deps/javax/swing/text/Style.P .deps/javax/swing/text/StyledDocument.P \
 .deps/javax/swing/text/StyledEditorKit.P \

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]