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.text.AbstractDocument


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

Hi list,


I just commited the attached patch to fix 
javax.swing.text.AbstractDocument a bit.


Michael


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

	* javax/swing/text/AbstractDocument.java
	(AbstracElement): Made public, implements java.io.Serializable.
	(AttributeContext): Made public.
	(BranchElement): Likewise.
	(Content): Likewise.
	(DefaultDocumentEvent): Made public, extends
	javax.swing.undo.CompoundEdit.
	(ElementEdit): Made public, extends
	javax.swing.undo.AbstractUndoableEdit.
	(LeafElement): Made public.
	(LeafElement.LeafElement): Made public.

- -- 
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFA0DKdWSOgCCdjSDsRAnl2AJ9lIHKe2k4Sczr3FcdEV7VJdK9oLwCfXzK2
AEVuvVVbA1j2920RLT3cduw=
=Q9+k
-----END PGP SIGNATURE-----
Index: javax/swing/text/AbstractDocument.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/text/AbstractDocument.java,v
retrieving revision 1.3.8.4
diff -u -b -B -r1.3.8.4 AbstractDocument.java
--- javax/swing/text/AbstractDocument.java	16 Jun 2004 10:22:27 -0000	1.3.8.4
+++ javax/swing/text/AbstractDocument.java	16 Jun 2004 11:41:35 -0000
@@ -49,15 +49,16 @@
 import javax.swing.event.UndoableEditEvent;
 import javax.swing.event.UndoableEditListener;
 import javax.swing.tree.TreeNode;
+import javax.swing.undo.AbstractUndoableEdit;
+import javax.swing.undo.CompoundEdit;
 import javax.swing.undo.UndoableEdit;
 
 
 public abstract class AbstractDocument
   implements Document, Serializable
 {
-  // some inner classes sun says I should have:
-  abstract class AbstractElement
-    implements Element, TreeNode
+  public abstract class AbstractElement
+    implements Element, TreeNode, Serializable
   {
     private static final long serialVersionUID = 1265312733007397733L;
     
@@ -142,11 +143,11 @@
     public abstract int getStartOffset();
   }
 
-  interface AttributeContext
+  public interface AttributeContext
   {
   }
 
-  class BranchElement extends AbstractElement
+  public class BranchElement extends AbstractElement
   {
     private static final long serialVersionUID = -8595176318868717313L;
     
@@ -181,7 +182,7 @@
     }
   }
 
-  interface Content
+  public interface Content
   {
     Position createPosition(int offset) throws BadLocationException;
 
@@ -197,7 +198,7 @@
     void getChars(int where, int len, Segment txt) throws BadLocationException;
   }
 
-  class DefaultDocumentEvent
+  public class DefaultDocumentEvent extends CompoundEdit
     implements DocumentEvent
   {
     private static final long serialVersionUID = -7406103236022413522L;
@@ -231,16 +232,16 @@
     }
   }
 
-  static class ElementEdit
+  public static class ElementEdit extends AbstractUndoableEdit
   {
     private static final long serialVersionUID = -1216620962142928304L;
   }
 
-  class LeafElement extends AbstractElement
+  public class LeafElement extends AbstractElement
   {
     private static final long serialVersionUID = 5115368706941283802L;
     
-    LeafElement(Element e, AttributeSet a, int s, int end)
+    public LeafElement(Element e, AttributeSet a, int s, int end)
     {
       super(e, a);
     }

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