* java/awt/GridLayout.java (layoutContainer): Use number of rows
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 29 Jan 2002 16:31:24 +0000 (16:31 +0000)
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 29 Jan 2002 16:31:24 +0000 (16:31 +0000)
to compute height of each cell, and number of columns to compute
width of each cell.
* java/awt/Window.java (getOwnedWindows): Don't return null.
* java/awt/FlowLayout.java (layoutContainer): Set width and height
of component.  Increment x using horizontal gap, not vertical
gap.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49320 138bc75d-0d04-0410-961f-82ee72b054a4

libjava/ChangeLog
libjava/java/awt/FlowLayout.java
libjava/java/awt/GridLayout.java
libjava/java/awt/Window.java

index 1dedce8..ab514f9 100644 (file)
@@ -1,3 +1,13 @@
+2002-01-29  Tom Tromey  <tromey@redhat.com>
+
+       * java/awt/GridLayout.java (layoutContainer): Use number of rows
+       to compute height of each cell, and number of columns to compute
+       width of each cell.
+       * java/awt/Window.java (getOwnedWindows): Don't return null.
+       * java/awt/FlowLayout.java (layoutContainer): Set width and height
+       of component.  Increment x using horizontal gap, not vertical
+       gap.
+
 2002-01-28  Tom Tromey  <tromey@redhat.com>
 
        * verify.cc (class _Jv_BytecodeVerifier) [op_invokeinterface]:
index a432a51..e328d63 100644 (file)
@@ -212,8 +212,8 @@ public class FlowLayout implements LayoutManager, Serializable
            if (comps[k].visible)
              {
                Dimension c = comps[k].getPreferredSize ();
-               comps[k].setLocation (x, y);
-               x += c.width + vgap;
+               comps[k].setBounds (x, y, c.width, new_h);
+               x += c.width + hgap;
              }
          }
 
index e6cf1ec..3471865 100644 (file)
@@ -172,9 +172,9 @@ public class GridLayout implements LayoutManager, Serializable
 
     // Compute width and height of each cell in the grid.
     int tw = d.width - ins.left - ins.right;
-    tw = (tw - (real_rows - 1) * hgap) / real_rows;
+    tw = (tw - (real_cols - 1) * hgap) / real_cols;
     int th = d.height - ins.top - ins.bottom;
-    th = (th - (real_cols - 1) * vgap) / real_cols;
+    th = (th - (real_rows - 1) * vgap) / real_rows;
 
     // If the cells are too small, still try to do something.
     if (tw < 0)
index b95dc8e..6af7c34 100644 (file)
@@ -303,7 +303,7 @@ public class Window extends Container
   {
     // FIXME: return array containing all the windows this window currently 
     // owns.
-    return null;
+    return new Window[0];
   }
 
   /**