edu.mit.csail.sdg.alloy4
Class MacUtil

java.lang.Object
  extended by edu.mit.csail.sdg.alloy4.MacUtil

public final class MacUtil
extends java.lang.Object

This class provides better integration on Mac OS X.

You must not call any methods here if you're not on Mac OS X, since that triggers the loading of com.apple.eawt.* which are not available on other platforms.

Thread Safety: Safe.


Method Summary
static void registerApplicationListener(java.lang.Runnable reopen, java.lang.Runnable about, Runner open, java.lang.Runnable quit)
          Register a Mac OS X "ApplicationListener"; if there was a previous listener, it will be removed first.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

registerApplicationListener

public static void registerApplicationListener(java.lang.Runnable reopen,
                                               java.lang.Runnable about,
                                               Runner open,
                                               java.lang.Runnable quit)
Register a Mac OS X "ApplicationListener"; if there was a previous listener, it will be removed first.

Parameters:
reopen - - when the user clicks on the Dock icon, we'll call reopen.run() using SwingUtilities.invokeLater
about - - when the user clicks on About Alloy4, we'll call about.run() using SwingUtilities.invokeLater
open - - when a file needs to be opened, we'll call open.run(filename) using SwingUtilities.invokeLater
quit - - when the user clicks on Quit, we'll call quit.run() using SwingUtilities.invokeAndWait