Commit 6c54b16c by Tom Tromey Committed by Tom Tromey

GridLayout.java (layoutContainer): Use number of rows to compute height of each cell...

	* 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.

From-SVN: r49320
parent d09f7cb2
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> 2002-01-28 Tom Tromey <tromey@redhat.com>
* verify.cc (class _Jv_BytecodeVerifier) [op_invokeinterface]: * verify.cc (class _Jv_BytecodeVerifier) [op_invokeinterface]:
......
...@@ -212,8 +212,8 @@ public class FlowLayout implements LayoutManager, Serializable ...@@ -212,8 +212,8 @@ public class FlowLayout implements LayoutManager, Serializable
if (comps[k].visible) if (comps[k].visible)
{ {
Dimension c = comps[k].getPreferredSize (); Dimension c = comps[k].getPreferredSize ();
comps[k].setLocation (x, y); comps[k].setBounds (x, y, c.width, new_h);
x += c.width + vgap; x += c.width + hgap;
} }
} }
......
...@@ -172,9 +172,9 @@ public class GridLayout implements LayoutManager, Serializable ...@@ -172,9 +172,9 @@ public class GridLayout implements LayoutManager, Serializable
// Compute width and height of each cell in the grid. // Compute width and height of each cell in the grid.
int tw = d.width - ins.left - ins.right; 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; 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 the cells are too small, still try to do something.
if (tw < 0) if (tw < 0)
......
...@@ -303,7 +303,7 @@ public class Window extends Container ...@@ -303,7 +303,7 @@ public class Window extends Container
{ {
// FIXME: return array containing all the windows this window currently // FIXME: return array containing all the windows this window currently
// owns. // owns.
return null; return new Window[0];
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment