Hi there,
This ViewportLayout fix makes Scrollable view components always have the
viewport size, when they return true on
getScrollableTracksViewportHeight() and ...Width(), independent of their
preferred size.
2006-01-10 Roman Kennke <[EMAIL PROTECTED]>
* javax/swing/ViewportLayout.java
(layoutContainer): Fixed condition, so that Scrollable components
are always forced to have to Viewport size, when they
return true for getScrollableTracksViewportHeight() and ..Width().
/Roman
Index: javax/swing/ViewportLayout.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/ViewportLayout.java,v
retrieving revision 1.21
diff -u -r1.21 ViewportLayout.java
--- javax/swing/ViewportLayout.java 15 Dec 2005 18:32:15 -0000 1.21
+++ javax/swing/ViewportLayout.java 10 Jan 2006 13:07:44 -0000
@@ -145,9 +145,8 @@
portBounds.y + portBounds.height);
// vertical implementation of the above rules
- if ((! (view instanceof Scrollable)
- || ((Scrollable) view).getScrollableTracksViewportHeight())
- && viewPref.height < portBounds.height)
+ if ((! (view instanceof Scrollable) && viewPref.height < portBounds.height
+ || ((Scrollable) view).getScrollableTracksViewportHeight()))
viewPref.height = portBounds.height;
if (portBounds.height >= viewMinimum.height)
@@ -160,9 +159,8 @@
}
// horizontal implementation of the above rules
- if ((! (view instanceof Scrollable)
- || ((Scrollable) view).getScrollableTracksViewportWidth())
- && viewPref.width < portBounds.width)
+ if ((! (view instanceof Scrollable) && viewPref.width < portBounds.width
+ || ((Scrollable) view).getScrollableTracksViewportWidth()))
viewPref.width = portBounds.width;
if (portBounds.width >= viewMinimum.width)
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches