FileDocCategorySizeDatePackage
MacOSUITest.javaAPI DocExample2347Sun Mar 07 18:19:02 GMT 2004regress

MacOSUITest

public class MacOSUITest extends Object
Interactive test for "macosui" package. Class can not extend JFrame; must invoke setMacOS() before first call to any Swing constructor.
version
$Id: MacOSUITest.java,v 1.5 2004/03/08 00:19:02 ian Exp $

Fields Summary
com.darwinsys.macosui.AboutBoxHandler
abouter
com.darwinsys.macosui.PrefsHandler
prefser
com.darwinsys.macosui.PrintHandler
printer
com.darwinsys.macosui.ShutdownHandler
shutter
Constructors Summary
public MacOSUITest()

		JFrame jf = new JFrame("MacOSUITest");
		JButton button = new JButton("Exit");
		button.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				System.exit(0);
			}
		});
		jf.getContentPane().add(button);
		// Tester: see that Application->About produces our popup
		// Ditto for Preferences and Shutdown.
		MacOSAppAdapter adapter =
			new MacOSAppAdapter(jf, abouter, prefser, printer, shutter);
		adapter.register();
		jf.setSize(300, 200);
		jf.setVisible(true);
	
Methods Summary
public static voidmain(java.lang.String[] args)

		// Tester: check that this string appears in the Application Menu.
		MacOSUtil.setMacOS("MacOSUITest");
		new MacOSUITest();