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
This commit is contained in:
Ray Greenwell
2005-06-22 18:43:43 +00:00
parent 6fbdc4e568
commit 681561c4bf
@@ -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);