Hi,

gcj had some trouble with the creative use of inner classes using outer
class accessors in ZoneView/Zone. This patch makes Zone just take the
axis as a parameter which also means we can turn it into a static class:

2006-08-31  Mark Wielaard  <[EMAIL PROTECTED]>

    * javax/swing/text/ZoneView.java (Zone): Make static class.        
    Constructor takes axis parameter.
    (createZone): Create Zone with getAxis() as major axis.

Compiles fine with everything.

Committed,

Mark
Index: javax/swing/text/ZoneView.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/text/ZoneView.java,v
retrieving revision 1.2
diff -u -r1.2 ZoneView.java
--- javax/swing/text/ZoneView.java	30 Aug 2006 20:10:00 -0000	1.2
+++ javax/swing/text/ZoneView.java	31 Aug 2006 10:49:54 -0000
@@ -62,7 +62,7 @@
    * The default zone view implementation. The specs suggest that this is
    * a subclass of AsyncBoxView, so do we.
    */
-  private class Zone
+  static class Zone
     extends AsyncBoxView
   {
     /**
@@ -81,10 +81,11 @@
      * @param el the element
      * @param pos0 the start position
      * @param pos1 the end position
+     * @param axis the major axis
      */
-    Zone(Element el, Position pos0, Position pos1)
+    Zone(Element el, Position pos0, Position pos1, int axis)
     {
-      super(el, ZoneView.this.getAxis());
+      super(el, axis);
       p0 = pos0;
       p1 = pos1;
     }
@@ -261,7 +262,7 @@
       {
         assert false : "Must not happen";
       }
-    Zone zone = new Zone(getElement(), pos0, pos1);
+    Zone zone = new Zone(getElement(), pos0, pos1, getAxis());
     return zone;
   }
 

Reply via email to