Added a menu bar to test overlapping widgets.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1297 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: ViewerApp.java,v 1.30 2002/04/23 01:19:04 mdb Exp $
|
||||
// $Id: ViewerApp.java,v 1.31 2002/04/27 02:34:28 mdb Exp $
|
||||
|
||||
package com.threerings.miso.viewer;
|
||||
|
||||
@@ -9,6 +9,8 @@ import java.awt.GraphicsDevice;
|
||||
import java.awt.GraphicsEnvironment;
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.swing.JPopupMenu;
|
||||
|
||||
import com.samskivert.swing.util.SwingUtil;
|
||||
|
||||
import com.threerings.resource.ResourceManager;
|
||||
@@ -45,6 +47,9 @@ public class ViewerApp
|
||||
System.exit(-1);
|
||||
}
|
||||
|
||||
Log.info("Turning off popups.");
|
||||
JPopupMenu.setDefaultLightWeightPopupEnabled(false);
|
||||
|
||||
// get the graphics environment
|
||||
GraphicsEnvironment env =
|
||||
GraphicsEnvironment.getLocalGraphicsEnvironment();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: ViewerFrame.java,v 1.32 2002/04/06 04:53:05 mdb Exp $
|
||||
// $Id: ViewerFrame.java,v 1.33 2002/04/27 02:34:29 mdb Exp $
|
||||
|
||||
package com.threerings.miso.viewer;
|
||||
|
||||
@@ -9,6 +9,10 @@ import java.awt.Component;
|
||||
import java.awt.GraphicsConfiguration;
|
||||
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JMenu;
|
||||
import javax.swing.JMenuBar;
|
||||
|
||||
import com.samskivert.swing.util.MenuUtil;
|
||||
|
||||
/**
|
||||
* The viewer frame is the main application window.
|
||||
@@ -30,6 +34,18 @@ public class ViewerFrame extends JFrame
|
||||
// set the frame and content panel background to black
|
||||
setBackground(Color.black);
|
||||
getContentPane().setBackground(Color.black);
|
||||
|
||||
// create the "Settings" menu
|
||||
JMenu menuSettings = new JMenu("Settings");
|
||||
MenuUtil.addMenuItem(
|
||||
menuSettings, "Preferences", this, "handlePreferences");
|
||||
|
||||
// create the menu bar
|
||||
JMenuBar bar = new JMenuBar();
|
||||
bar.add(menuSettings);
|
||||
|
||||
// add the menu bar to the frame
|
||||
setJMenuBar(bar);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user