diff options
author | Roman Kennke <roman@kennke.org> | 2005-06-24 14:39:46 +0000 |
---|---|---|
committer | Roman Kennke <roman@kennke.org> | 2005-06-24 14:39:46 +0000 |
commit | b6c7aed0b7af990c987bd09d4a8844e03d369c74 (patch) | |
tree | f54bd4c35a2e962bafe6323a559bd0f25f0b8592 /javax/swing/BoxLayout.java | |
parent | cde520886a4f82782ac097e1202fdf13dd42682a (diff) | |
download | classpath-b6c7aed0b7af990c987bd09d4a8844e03d369c74.tar.gz |
2005-06-24 Roman Kennke <roman@kennke.org>
* gnu/java/awt/AWTUtilities.java:
Added new utility class. This provides a method for fetching
the visible children of a Container.
* javax/swing/BoxLayout.java:
Use AWTUtilities.getVisibleChildren() instead of
Container.getComponents(). LayoutManagers must not layout invisible
children.
Diffstat (limited to 'javax/swing/BoxLayout.java')
-rw-r--r-- | javax/swing/BoxLayout.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/javax/swing/BoxLayout.java b/javax/swing/BoxLayout.java index 2d4abf944..91d5a4bfd 100644 --- a/javax/swing/BoxLayout.java +++ b/javax/swing/BoxLayout.java @@ -46,6 +46,8 @@ import java.awt.Insets; import java.awt.LayoutManager2; import java.io.Serializable; +import gnu.java.awt.AWTUtilities; + /** * A layout for swing components. * @@ -151,7 +153,7 @@ public class BoxLayout implements LayoutManager2, Serializable int x = 0; int y = 0; - Component[] children = parent.getComponents(); + Component[] children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { @@ -201,7 +203,7 @@ public class BoxLayout implements LayoutManager2, Serializable int x = insets.left + insets.right; int y = insets.bottom + insets.top; - Component[] children = parent.getComponents(); + Component[] children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { @@ -246,7 +248,7 @@ public class BoxLayout implements LayoutManager2, Serializable Dimension innerSize = new Dimension(size.width - insets.left - insets.right, size.height - insets.bottom - insets.top); - Component[] children = parent.getComponents(); + Component[] children = AWTUtilities.getVisibleChildren(parent); boolean[] laidOut = new boolean[children.length]; for (int index = 0; index < laidOut.length; index++) laidOut[index] = false; @@ -465,7 +467,7 @@ public class BoxLayout implements LayoutManager2, Serializable int x = insets.left + insets.right; int y = insets.top + insets.bottom; - Component[] children = parent.getComponents(); + Component[] children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { |