Hi there,

I fixed another bug. This bug has led multiline TextComponents to render the first line of text oevr and over again, instead of the correct lines.

2005-05-04  Roman Kennke  <[EMAIL PROTECTED]>

   * javax/swing/text/PlainView.java
   (drawUnselectedText): Call Utilities.drawTabbedText() with correct
   offset parameter.
   * javax/swing/text/Utilities.java
   (drawTabbedText): Initilialize local variable pos correctly.


/Roman

Index: javax/swing/text/PlainView.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/text/PlainView.java,v
retrieving revision 1.5
diff -u -r1.5 PlainView.java
--- javax/swing/text/PlainView.java     25 Jan 2005 07:07:25 -0000      1.5
+++ javax/swing/text/PlainView.java     4 May 2005 15:08:18 -0000
@@ -148,7 +148,7 @@
     g.setColor(unselectedColor);
     Segment segment = new Segment();
     getDocument().getText(p0, p1 - p0, segment);
-    return Utilities.drawTabbedText(segment, x, y, g, this, 0);
+    return Utilities.drawTabbedText(segment, x, y, g, this, segment.offset);
   }
 
   public void paint(Graphics g, Shape s)
Index: javax/swing/text/Utilities.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/text/Utilities.java,v
retrieving revision 1.5
diff -u -r1.5 Utilities.java
--- javax/swing/text/Utilities.java     16 Feb 2005 11:41:16 -0000      1.5
+++ javax/swing/text/Utilities.java     4 May 2005 15:08:18 -0000
@@ -92,7 +92,7 @@
     int ascent = metrics.getAscent();
 
     int pixelWidth = 0;
-    int pos = 0;
+    int pos = s.offset;
     int len = 0;
 
     for (int offset = s.offset; offset < (s.offset + s.count); ++offset)
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to