From 681561c4bf8ffeecc412ed0aa3537a91c2d938d6 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Wed, 22 Jun 2005 18:43:43 +0000 Subject: [PATCH] Removed backwards compatability with things that don't understand that we're using a grid bag layout and they should use addControl(). Toybox is updated, and if there's anything else out there it's going to need to be updated anyway, because it likely extends GameConfigurator directly which is no longer a component. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3611 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../game/client/SwingGameConfigurator.java | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/java/com/threerings/parlor/game/client/SwingGameConfigurator.java b/src/java/com/threerings/parlor/game/client/SwingGameConfigurator.java index 92478142b..ba10e40e6 100644 --- a/src/java/com/threerings/parlor/game/client/SwingGameConfigurator.java +++ b/src/java/com/threerings/parlor/game/client/SwingGameConfigurator.java @@ -62,14 +62,8 @@ public abstract class SwingGameConfigurator extends GameConfigurator */ public void addControl (JComponent label, JComponent control) { - // BACKcompatible, newer code will call this method, and so - // we need to switch the layout to gridbag instead of vgroup - if (!(_panel.getLayout() instanceof GridBagLayout)) { - _panel.setLayout(new GridBagLayout()); - } - // Set up the constraints. There's really no point in saving - // this somewhere, as they're cloned anyway with every component + // these somewhere, as they're cloned anyway with every component // insertion. GridBagConstraints lc = new GridBagConstraints(); lc.gridx = 0; @@ -88,15 +82,7 @@ public abstract class SwingGameConfigurator extends GameConfigurator } /** The panel on which the config options are placed. */ - protected JPanel _panel = new JPanel(); - - { // initializer - // BACKcompatible, older code (and toybox) expects the layout - // to be a vgroup, so we default to that - VGroupLayout layout = new VGroupLayout(VGroupLayout.NONE); - layout.setOffAxisPolicy(VGroupLayout.STRETCH); - _panel.setLayout(layout); - } + protected JPanel _panel = new JPanel(new GridBagLayout()); /** Insets for configuration labels. */ protected Insets _labelInsets = new Insets(1, 0, 1, 4);