MacOSAppAdapterpublic class MacOSAppAdapter extends com.apple.eawt.Application The only os-dependant part of com.darwinsys, this is the
adapter class to handle MacOS's "different" way of doing About Box,
Quit item in App menu, Preferences, and so on. |
Fields Summary |
---|
com.apple.eawt.ApplicationListener | appListener | JFrame | parent | AboutBoxHandler | abouter | PrefsHandler | prefser | PrintHandler | printer | ShutdownHandler | shutter |
Constructors Summary |
---|
public MacOSAppAdapter(JFrame theParent, AboutBoxHandler about, PrefsHandler prefs, PrintHandler print, ShutdownHandler shut)Construct a MacOSAppAdapter.
appListener = new MyAppEventHandler();
parent = theParent;
if (about != null) {
abouter = about;
setEnabledAboutMenu(true);
addAboutMenuItem();
}
if (prefs != null) {
prefser = prefs;
setEnabledPreferencesMenu(true);
addPreferencesMenuItem();
}
printer = print;
shutter = shut;
|
Methods Summary |
---|
public void | register()Method to register this handler with Apple's event manager, calling
addApplicationListener in parent class.
addApplicationListener(appListener);
|
|