92e46c6eae
distance parameters to tile sets. Removed constant tile width/height references except, for now, for isometric tile rendering which still requires tiles that are 32x16. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@130 542714f4-19e9-0310-aa3c-eee0fc999fb1
54 lines
1.3 KiB
Java
54 lines
1.3 KiB
Java
//
|
|
// $Id: ViewerFrame.java,v 1.2 2001/07/28 01:31:51 shaper Exp $
|
|
|
|
package com.threerings.miso.viewer;
|
|
|
|
import com.samskivert.swing.*;
|
|
import com.threerings.miso.Log;
|
|
import com.threerings.miso.scene.Scene;
|
|
import com.threerings.miso.sprite.AnimationManager;
|
|
import com.threerings.miso.sprite.SpriteManager;
|
|
import com.threerings.miso.viewer.util.ViewerContext;
|
|
|
|
import java.awt.*;
|
|
import java.io.*;
|
|
import javax.swing.*;
|
|
|
|
/**
|
|
* The ViewerFrame is the main application window that constructs and
|
|
* contains the application menu bar and panels and responds to menu
|
|
* events.
|
|
*/
|
|
class ViewerFrame extends JFrame
|
|
{
|
|
public ViewerFrame ()
|
|
{
|
|
super("Scene Viewer");
|
|
}
|
|
|
|
/**
|
|
* Initialize the frame with the context object.
|
|
*/
|
|
public void init (ViewerContext ctx)
|
|
{
|
|
_ctx = ctx;
|
|
|
|
// set up the scene view panel with a default scene
|
|
SceneViewPanel svpanel = new SceneViewPanel(_ctx);
|
|
|
|
// create the animation manager for the panel
|
|
SpriteManager spritemgr = new SpriteManager();
|
|
|
|
AnimationManager animmgr = new AnimationManager(spritemgr, svpanel);
|
|
|
|
// add the scene view panel
|
|
getContentPane().add(svpanel, BorderLayout.CENTER);
|
|
}
|
|
|
|
/** The panel displaying the scene. */
|
|
SceneViewPanel _svpanel;
|
|
|
|
/** The context object. */
|
|
protected ViewerContext _ctx;
|
|
}
|