Here is a patch that fixes the viewport painting problem. Viewport is no
longer being cutoff at the top or bottom.

2005-08-11  Lillian Angel <[EMAIL PROTECTED]>

        * javax/swing/plaf/basic/BasicViewportUI.java
        (paintSimple): Changed to paint the portBounds from (0,0).


On Thu, 2005-08-11 at 10:05 -0400, Lillian Angel wrote:
> I basically reversed this patch. Though, the scrollpane now has the old
> bug in it. :(
> 
> 2005-08-11  Lillian Angel  <[EMAIL PROTECTED]>
> 
>         * javax/swing/plaf/basic/BasicViewportUI.java
>         (paintSimple): This line was causing problems with the JTable 
>       viewport. However, the scrollpane still needs to be fixed. 
>       It is still not painting beyond the view's bounds.
> 
> 
> On Wed, 2005-08-03 at 22:45 +0200, Roman Kennke wrote:
> > Hi,
> > 
> > I finally found that bug that caused JScrollPane to not work correctly.
> > Now it should be possible to actually scroll things in a JScrollPane
> > (like in the ODB) :-)
> > 
> > 2005-08-03  Roman Kennke  <[EMAIL PROTECTED]>
> > 
> >         * javax/swing/plaf/basic/BasicViewportUI.java
> >         (paintSimple): Corrected the clip that is used to draw the
> >         viewport's content. This fixes scrolling in JScrollPane and
> >         JViewport.
> > 
> > /Roman
> > 
> > _______________________________________________
> > Classpath-patches mailing list
> > [email protected]
> > http://lists.gnu.org/mailman/listinfo/classpath-patches
> _______________________________________________
> Classpath-patches mailing list
> [email protected]
> http://lists.gnu.org/mailman/listinfo/classpath-patches
Index: javax/swing/plaf/basic/BasicViewportUI.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicViewportUI.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- javax/swing/plaf/basic/BasicViewportUI.java	11 Aug 2005 14:03:02 -0000	1.16
+++ javax/swing/plaf/basic/BasicViewportUI.java	11 Aug 2005 19:59:09 -0000	1.17
@@ -161,17 +161,17 @@
                            Rectangle portBounds)
   {
     Rectangle oldClip = g.getClipBounds();
-    g.setClip(oldClip.intersection(viewBounds));
+    g.setClip(new Rectangle(0, 0, portBounds.width, portBounds.height));
     g.translate (-pos.x, -pos.y);
     try
-      {   
+      {
         view.paint(g);
       } 
     finally 
       {
         g.translate (pos.x, pos.y);
         g.setClip (oldClip);
-      }        
+      }
   }
 
   private void paintBackingStore(Graphics g, 
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to