Now creates a bundled component repository and fixed up some other stuff.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@645 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// $Id: TestApp.java,v 1.6 2001/11/21 02:42:16 mdb Exp $
|
// $Id: TestApp.java,v 1.7 2001/11/27 08:41:49 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.cast.tools.builder;
|
package com.threerings.cast.builder;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import javax.swing.JFrame;
|
import javax.swing.JFrame;
|
||||||
@@ -14,6 +14,7 @@ import com.threerings.resource.ResourceManager;
|
|||||||
import com.threerings.cast.Log;
|
import com.threerings.cast.Log;
|
||||||
import com.threerings.cast.CharacterManager;
|
import com.threerings.cast.CharacterManager;
|
||||||
import com.threerings.cast.ComponentRepository;
|
import com.threerings.cast.ComponentRepository;
|
||||||
|
import com.threerings.cast.bundle.BundledComponentRepository;
|
||||||
|
|
||||||
import com.threerings.miso.scene.MisoCharacterSprite;
|
import com.threerings.miso.scene.MisoCharacterSprite;
|
||||||
import com.threerings.miso.util.MisoUtil;
|
import com.threerings.miso.util.MisoUtil;
|
||||||
@@ -21,6 +22,7 @@ import com.threerings.miso.util.MisoUtil;
|
|||||||
public class TestApp
|
public class TestApp
|
||||||
{
|
{
|
||||||
public TestApp (String[] args)
|
public TestApp (String[] args)
|
||||||
|
throws IOException
|
||||||
{
|
{
|
||||||
_frame = new TestFrame();
|
_frame = new TestFrame();
|
||||||
_frame.setSize(800, 600);
|
_frame.setSize(800, 600);
|
||||||
@@ -29,15 +31,14 @@ public class TestApp
|
|||||||
// create the handles on our various services
|
// create the handles on our various services
|
||||||
_config = MisoUtil.createConfig();
|
_config = MisoUtil.createConfig();
|
||||||
|
|
||||||
ResourceManager rsrcmgr = new ResourceManager(null, "rsrc");
|
ResourceManager rmgr = new ResourceManager(null, "rsrc");
|
||||||
|
ComponentRepository crepo =
|
||||||
// TBD: sort out component repository
|
new BundledComponentRepository(rmgr, "components");
|
||||||
ComponentRepository crepo = null;
|
|
||||||
CharacterManager charmgr = new CharacterManager(crepo);
|
CharacterManager charmgr = new CharacterManager(crepo);
|
||||||
charmgr.setCharacterClass(MisoCharacterSprite.class);
|
charmgr.setCharacterClass(MisoCharacterSprite.class);
|
||||||
|
|
||||||
// initialize the frame
|
// initialize the frame
|
||||||
((TestFrame)_frame).init(charmgr);
|
((TestFrame)_frame).init(charmgr, crepo);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void run ()
|
public void run ()
|
||||||
@@ -48,8 +49,13 @@ public class TestApp
|
|||||||
|
|
||||||
public static void main (String[] args)
|
public static void main (String[] args)
|
||||||
{
|
{
|
||||||
TestApp app = new TestApp(args);
|
try {
|
||||||
app.run();
|
TestApp app = new TestApp(args);
|
||||||
|
app.run();
|
||||||
|
} catch (IOException ioe) {
|
||||||
|
System.err.println("Error initializing app.");
|
||||||
|
ioe.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** The test frame. */
|
/** The test frame. */
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
//
|
//
|
||||||
// $Id: TestFrame.java,v 1.3 2001/11/18 04:09:20 mdb Exp $
|
// $Id: TestFrame.java,v 1.4 2001/11/27 08:41:49 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.cast.tools.builder;
|
package com.threerings.cast.builder;
|
||||||
|
|
||||||
import javax.swing.JFrame;
|
import javax.swing.JFrame;
|
||||||
|
|
||||||
import com.threerings.cast.CharacterManager;
|
import com.threerings.cast.CharacterManager;
|
||||||
|
import com.threerings.cast.ComponentRepository;
|
||||||
|
|
||||||
public class TestFrame extends JFrame
|
public class TestFrame extends JFrame
|
||||||
{
|
{
|
||||||
@@ -17,8 +18,8 @@ public class TestFrame extends JFrame
|
|||||||
setDefaultCloseOperation(EXIT_ON_CLOSE);
|
setDefaultCloseOperation(EXIT_ON_CLOSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void init (CharacterManager charmgr)
|
public void init (CharacterManager charmgr, ComponentRepository crepo)
|
||||||
{
|
{
|
||||||
getContentPane().add(new BuilderPanel(charmgr));
|
getContentPane().add(new BuilderPanel(charmgr, crepo));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user