diff options
author | Roman Kennke <roman@kennke.org> | 2005-12-06 14:31:07 +0000 |
---|---|---|
committer | Roman Kennke <roman@kennke.org> | 2005-12-06 14:31:07 +0000 |
commit | 62c8ea77ceaaf605944a7aa1e53473bcf02f5b50 (patch) | |
tree | d6341cb80d1f5f403c7bf651af8158ad891cf383 /javax/swing/ViewportLayout.java | |
parent | c64639f40ac9952714014448d964395db87c7e95 (diff) | |
download | classpath-62c8ea77ceaaf605944a7aa1e53473bcf02f5b50.tar.gz |
2005-12-06 Roman Kennke <kennke@aicas.com>
* javax/swing/ViewportLayout.java
(layoutContainer): Don't set the view to it's minimumSize when the
port is larger than the view. Rather it should left at it's
preferred size. Also, I added a comment explaining a possible bug
in this method.
Diffstat (limited to 'javax/swing/ViewportLayout.java')
-rw-r--r-- | javax/swing/ViewportLayout.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/javax/swing/ViewportLayout.java b/javax/swing/ViewportLayout.java index 884f7cb27..5ae85a7dc 100644 --- a/javax/swing/ViewportLayout.java +++ b/javax/swing/ViewportLayout.java @@ -153,7 +153,6 @@ public class ViewportLayout implements LayoutManager, Serializable } else { - viewPref.height = viewMinimum.height; int overextension = portLowerRight.y - viewPref.height; if (overextension > 0) portBounds.y -= overextension; @@ -168,13 +167,17 @@ public class ViewportLayout implements LayoutManager, Serializable } else { - viewPref.width = viewMinimum.width; int overextension = portLowerRight.x - viewPref.width; if (overextension > 0) portBounds.x -= overextension; } port.setViewPosition(portBounds.getLocation()); + // TODO: I doubt that the size should really be touched here, except when + // the view is somehow smaller than its minimumSize. I would think that + // when the size of a view is set manually to a fixed value, that this + // value should be left unchanged, and not reset to the preferred or + // minimum size. -- Roman Kennke port.setViewSize(viewPref); } } |