One of my last fixes showed up a problem with WrappedPlainView, which is
fixed by this patch.

2006-02-21  Roman Kennke  <[EMAIL PROTECTED]>

        * javax/swing/text/WrappedPlainView.java
        (calculateBreakPosition): Changed to use the view's allocation
instead
        of the container's preferredSize.

/Roman
Index: javax/swing/text/WrappedPlainView.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/text/WrappedPlainView.java,v
retrieving revision 1.9
diff -u -r1.9 WrappedPlainView.java
--- javax/swing/text/WrappedPlainView.java	23 Nov 2005 14:23:14 -0000	1.9
+++ javax/swing/text/WrappedPlainView.java	21 Feb 2006 15:35:57 -0000
@@ -270,8 +270,7 @@
   protected int calculateBreakPosition(int p0, int p1)
   {
     Container c = getContainer();
-    Rectangle alloc = c.isValid() ? c.getBounds()
-                                 : new Rectangle(c.getPreferredSize());
+    Rectangle alloc = new Rectangle(0, 0, getWidth(), getHeight());
     updateMetrics();
     try
       {

Reply via email to