Create our game configurator directly rather than returning a class and

forcing the caller to instantiate it.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3248 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2004-11-27 21:24:33 +00:00
parent 421ed5126e
commit d492d541b3
3 changed files with 13 additions and 15 deletions
@@ -1,5 +1,5 @@
//
// $Id: TableListView.java,v 1.8 2004/08/27 02:12:51 mdb Exp $
// $Id$
//
// Narya library - tools for developing networked games
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
@@ -93,18 +93,14 @@ public class TableListView extends JPanel
_matchList.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
panel.add(new JScrollPane(_matchList));
// create our configurator interface
// create and initialize the configurator interface
GameConfig gconfig = null;
try {
gconfig = config.getGameConfig();
Class cclass = gconfig.getConfiguratorClass();
if (cclass != null) {
// create and initialize the configurator interface
_figger = (GameConfigurator)cclass.newInstance();
_figger = gconfig.createConfigurator();
if (_figger != null) {
_figger.init(_ctx);
// give it the game config
_figger.setGameConfig(gconfig);
// and add the whole business to the main UI
panel.add(_figger, VGroupLayout.FIXED);
}