edu.northwestern.at.utils.swing
Class MacUtils

java.lang.Object
  extended by edu.northwestern.at.utils.swing.MacUtils

public class MacUtils
extends java.lang.Object

Macintosh utilites.


Constructor Summary
protected MacUtils()
          Don't allow instantiation but do allow overrides.
 
Method Summary
static void initMac(java.lang.String programName, boolean useScreenMenuBar)
          Initializes the Mac OS X environment variables.
static void initMac(XFrame mainFrame, boolean havePrefs)
          Initializes the Mac OS X environment application handlers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MacUtils

protected MacUtils()
Don't allow instantiation but do allow overrides.

Method Detail

initMac

public static void initMac(java.lang.String programName,
                           boolean useScreenMenuBar)
Initializes the Mac OS X environment variables.

Parameters:
programName - The program name.
useScreenMenuBar - True to use the screen menu bar.

Sets the following two system properties:

  • com.apple.mrj.application.apple.menu.about.name to programName
  • apple.laf.useScreenMenuBar to useScreenMenuBar

initMac

public static void initMac(XFrame mainFrame,
                           boolean havePrefs)
Initializes the Mac OS X environment application handlers.

Parameters:
mainFrame - The main program frame.
havePrefs - True to add a Preferences item to the application menu.

Registers a quit handler, a prefs handler, and an about handler.