Wasn't taking into account off-axis insets in certain cases.

git-svn-id: https://samskivert.googlecode.com/svn/trunk@130 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
mdb
2001-05-28 18:26:27 +00:00
parent 48dedcfbcc
commit 03c140cb38
2 changed files with 6 additions and 6 deletions
@@ -1,5 +1,5 @@
//
// $Id: HGroupLayout.java,v 1.3 2001/03/03 21:19:48 mdb Exp $
// $Id: HGroupLayout.java,v 1.4 2001/05/28 18:26:27 mdb Exp $
package com.samskivert.swing;
@@ -113,7 +113,7 @@ public class HGroupLayout extends GroupLayout
break;
case EQUALIZE:
sy = (b.height - info.maxhei)/2;
sy = insets.top + (b.height - info.maxhei)/2;
defhei = info.maxhei;
break;
@@ -150,7 +150,7 @@ public class HGroupLayout extends GroupLayout
if (_offpolicy == NONE) {
newhei = info.dimens[i].height;
sy = (b.height - newhei)/2;
sy = insets.top + (b.height - newhei)/2;
}
child.setBounds(sx, sy, newwid, newhei);
@@ -1,5 +1,5 @@
//
// $Id: VGroupLayout.java,v 1.3 2001/03/03 21:19:48 mdb Exp $
// $Id: VGroupLayout.java,v 1.4 2001/05/28 18:26:27 mdb Exp $
package com.samskivert.swing;
@@ -113,7 +113,7 @@ public class VGroupLayout extends GroupLayout
break;
case EQUALIZE:
sx = (b.width - info.maxwid)/2;
sx = insets.left + (b.width - info.maxwid)/2;
defwid = info.maxwid;
break;
@@ -150,7 +150,7 @@ public class VGroupLayout extends GroupLayout
if (_offpolicy == NONE) {
newwid = info.dimens[i].width;
sx = (b.width - newwid)/2;
sx = insets.left + (b.width - newwid)/2;
}
child.setBounds(sx, sy, newwid, newhei);