Test application for the scrolling isometric view.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1014 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2002-02-17 23:48:38 +00:00
parent 7fa37c5837
commit 718ca0de17
4 changed files with 335 additions and 0 deletions
@@ -0,0 +1,61 @@
//
// $Id: ScrollingFrame.java,v 1.1 2002/02/17 23:48:37 mdb Exp $
package com.threerings.miso.scene;
import java.awt.Color;
import java.awt.Component;
import java.awt.GraphicsConfiguration;
import javax.swing.JFrame;
import com.samskivert.swing.GroupLayout;
import com.samskivert.swing.VGroupLayout;
/**
* The main application window.
*/
public class ScrollingFrame extends JFrame
{
/**
* Creates a frame in which the scrolling test app can operate.
*/
public ScrollingFrame (GraphicsConfiguration gc)
{
super(gc);
// set up the frame options
setTitle("Scene scrolling test");
// setUndecorated(true);
setIgnoreRepaint(true);
setResizable(false);
setDefaultCloseOperation(EXIT_ON_CLOSE);
// center the scene view within the frame
GroupLayout gl = new VGroupLayout();
gl.setJustification(GroupLayout.CENTER);
gl.setOffAxisJustification(GroupLayout.CENTER);
getContentPane().setLayout(gl);
// set the frame and content panel background to black
setBackground(Color.black);
getContentPane().setBackground(Color.black);
}
/**
* Sets the panel displayed by this frame.
*/
public void setPanel (Component panel)
{
// if we had an old panel, remove it
if (_panel != null) {
getContentPane().remove(_panel);
}
// now add the new one
_panel = panel;
getContentPane().add(_panel);
}
protected Component _panel;
}