Miscellaneous clean-up.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@477 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: ViewerApp.java,v 1.8 2001/09/05 00:45:27 shaper Exp $
|
||||
// $Id: ViewerApp.java,v 1.9 2001/10/17 22:16:04 shaper Exp $
|
||||
|
||||
package com.threerings.miso.viewer;
|
||||
|
||||
@@ -108,6 +108,7 @@ public class ViewerApp
|
||||
*/
|
||||
public void run ()
|
||||
{
|
||||
_frame.pack();
|
||||
_frame.show();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,18 +1,15 @@
|
||||
//
|
||||
// $Id: ViewerFrame.java,v 1.21 2001/10/15 23:53:43 shaper Exp $
|
||||
// $Id: ViewerFrame.java,v 1.22 2001/10/17 22:16:04 shaper Exp $
|
||||
|
||||
package com.threerings.miso.viewer;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.io.*;
|
||||
import javax.swing.*;
|
||||
|
||||
import com.samskivert.swing.*;
|
||||
|
||||
import com.threerings.media.sprite.*;
|
||||
import com.threerings.media.tile.TileManager;
|
||||
import com.threerings.media.tile.TileException;
|
||||
|
||||
import com.threerings.miso.Log;
|
||||
import com.threerings.miso.scene.AmbulatorySprite;
|
||||
@@ -25,12 +22,13 @@ import com.threerings.miso.viewer.util.ViewerContext;
|
||||
* contains the application menu bar and panels and responds to menu
|
||||
* events.
|
||||
*/
|
||||
class ViewerFrame extends JFrame implements WindowListener
|
||||
public class ViewerFrame extends JFrame
|
||||
{
|
||||
public ViewerFrame ()
|
||||
{
|
||||
super("Scene Viewer");
|
||||
addWindowListener(this);
|
||||
|
||||
setDefaultCloseOperation(EXIT_ON_CLOSE);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -56,38 +54,16 @@ class ViewerFrame extends JFrame implements WindowListener
|
||||
Log.info("Created sprite [sprite=" + sprite + "].");
|
||||
}
|
||||
|
||||
// create a top-level panel to manage everything
|
||||
JPanel top = new JPanel();
|
||||
GroupLayout gl = new HGroupLayout(GroupLayout.STRETCH);
|
||||
gl.setOffAxisPolicy(GroupLayout.STRETCH);
|
||||
top.setLayout(gl);
|
||||
|
||||
top.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
|
||||
|
||||
// set up the scene view panel with a default scene
|
||||
ViewerSceneViewPanel svpanel =
|
||||
new ViewerSceneViewPanel(_ctx, spritemgr, sprite);
|
||||
top.add(svpanel, GroupLayout.FIXED);
|
||||
|
||||
// add the main panel to the frame
|
||||
getContentPane().add(top, BorderLayout.CENTER);
|
||||
getContentPane().add(svpanel);
|
||||
}
|
||||
|
||||
/** WindowListener interface methods */
|
||||
|
||||
public void windowClosing (WindowEvent e) {
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
public void windowOpened (WindowEvent e) { }
|
||||
public void windowClosed (WindowEvent e) { }
|
||||
public void windowIconified (WindowEvent e) { }
|
||||
public void windowDeiconified (WindowEvent e) { }
|
||||
public void windowActivated (WindowEvent e) { }
|
||||
public void windowDeactivated (WindowEvent e) { }
|
||||
|
||||
/** The tileset id for the character tiles. */
|
||||
protected static final int TSID_CHAR = 1003;
|
||||
protected static final int TSID_CHAR = 1011;
|
||||
|
||||
/** The panel displaying the scene. */
|
||||
ViewerSceneViewPanel _svpanel;
|
||||
|
||||
Reference in New Issue
Block a user