org.vizzini.util
Class SystemUtilities

java.lang.Object
  extended by org.vizzini.util.SystemUtilities

public final class SystemUtilities
extends Object

Provides some commonly used system utility methods.

Since:
v0.1
Version:
v0.3
Author:
Jeffrey M. Thompson

Method Summary
static SystemUtilities getInstance()
          Return the singleton instance.
 boolean isApplet()
          Return true if this is running in an applet environment.
 boolean isApplication()
          Return true if this is running in an application environment.
 boolean isJava3DAvailable()
          Return true if Java 3D is available.
 boolean isLinuxPlatform()
          Return true if this application is running on a Linux OS.
 boolean isMacPlatform()
          Return true if this application is running on a Macintosh OS.
 boolean isSystemLAF()
          Return true if this is using the system look and feel.
 boolean isWindowsPlatform()
          Return true if this application is running on a Windows OS.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static SystemUtilities getInstance()
Return the singleton instance.

Since:
v0.2

isApplet

public boolean isApplet()
Return true if this is running in an applet environment.

Since:
v0.2

isApplication

public boolean isApplication()
Return true if this is running in an application environment.

This is kind of a hack. The java runtime name property cannot be accessed from an applet environment due to security restrictions. A call for this property causes:

java.security.AccessControlException: access denied (java.util.PropertyPermission java.runtime.name read)

to be thrown. This approach may fail if the user has monkeyed with their java.policy file and the security permissions therein.

Since:
v0.2

isJava3DAvailable

public boolean isJava3DAvailable()
Return true if Java 3D is available.

Since:
v0.3

isLinuxPlatform

public boolean isLinuxPlatform()
Return true if this application is running on a Linux OS.

Since:
v0.1

isMacPlatform

public boolean isMacPlatform()
Return true if this application is running on a Macintosh OS.

Since:
v0.1

isSystemLAF

public boolean isSystemLAF()
Return true if this is using the system look and feel.

Since:
v0.1

isWindowsPlatform

public boolean isWindowsPlatform()
Return true if this application is running on a Windows OS.

Since:
v0.1


Copyright 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02