com.darwinsys.macosui
Class MacOSUtil

java.lang.Object
  extended by com.darwinsys.macosui.MacOSUtil

public class MacOSUtil
extends java.lang.Object

Utilities for GUI work.

Version:
$Id: MacOSUtil.java,v 1.16 2006/08/13 17:53:06 ian Exp $

Constructor Summary
MacOSUtil()
           
 
Method Summary
 java.lang.Process exec(java.lang.String[] command)
          Handle Apple's continuing failure to make their Java implementation's version of Runtime.exec() match normal users' behaviour, that is, make Runtime.exec("Foo.app") actually run "Foo".
static boolean isMacOS()
          Return true if we are running MacOS; need a few GUI tweaks if so.
static void setMacOS(java.lang.String appName)
          Set a few common properties for the given application if running under MacOS.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MacOSUtil

public MacOSUtil()
Method Detail

isMacOS

public static boolean isMacOS()
Return true if we are running MacOS; need a few GUI tweaks if so. See http://developer.apple.com/technotes/tn2002/tn2110.html.


setMacOS

public static void setMacOS(java.lang.String appName)
Set a few common properties for the given application if running under MacOS. Must be invoked before you construct any Swing components, even JFrame. Usage Example:
        if (MacOSUtil.isMacOS()) {
                MacOSUtil.setMacOS("JabaDex");
        }
 

Parameters:
appName - - the name of the Application.

exec

public java.lang.Process exec(java.lang.String[] command)
                       throws java.io.IOException
Handle Apple's continuing failure to make their Java implementation's version of Runtime.exec() match normal users' behaviour, that is, make Runtime.exec("Foo.app") actually run "Foo".

Parameters:
command - The commands array
Returns:
The newly-created Process
Throws:
java.io.IOException - If anything goes wrong.
See Also:
Runtime.exec(java.lang.String)


Copyright © 1996-2004 Ian F. Darwin. See license.html for usage license.