|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--acm.util.Platform
public class Platform extends Object
This class contains methods to support platform-specific code.
Field Summary | |
int | MAC |
int | UNIX |
int | UNKNOWN |
int | WINDOWS |
Constructor Summary |
Platform() |
Method Summary | |
boolean | areCollectionsAvailable() |
boolean | areStandardFontFamiliesAvailable() |
int | compareVersion(String version) |
int | compareVersion(String v1,
String v2) |
int | getPlatform() |
boolean | isJMFAvailable() |
boolean | isMac() |
boolean | isSunAudioAvailable() |
boolean | isSwingAvailable() |
boolean | isUnix() |
boolean | isWindows() |
void | setFileTypeAndCreator(File file,
String type,
String creator) |
void | setFileTypeAndCreator(String filename,
String type,
String creator) |
Field Detail |
public static final int MAC
public static final int UNIX
public static final int UNKNOWN
public static final int WINDOWS
Constructor Detail |
public Platform()
Method Detail |
public static boolean areCollectionsAvailable()
Usage: | if (Platform.areCollectionsAvailable()) . . . |
Returns: | true if collections are available, false otherwise |
public static boolean areStandardFontFamiliesAvailable()
Usage: | if (Platform.areStandardFontFamiliesAvailable()) . . . |
Returns: | true if the standard fonts are available, false otherwise |
public static int compareVersion(String version)
|
Usage: | int cmp = Platform.compareVersion(version); | ||
Parameter: |
| ||
Returns: | -1, 0, or +1 depending on whether the system version is earlier than, equal to, or later than the specified one |
public static int compareVersion(String v1,
String v2)
Usage: | int cmp = Platform.compareVersion(v1, v2); | ||||
Parameters: |
| ||||
Returns: | -1, 0, or +1 depending on whether v1 is earlier than, equal to, or later than v2 |
public static int getPlatform()
Usage: | int platform = Platform.getPlatform(); |
Returns: | A constant specifying the platform type |
public static boolean isJMFAvailable()
Usage: | if (Platform.isJMFAvailable()) . . . |
Returns: | true if the JMF package is available, false otherwise |
public static boolean isMac()
Usage: | if (Platform.isMac()) . . . |
Returns: | true if the platform is a Macintosh, false otherwise |
public static boolean isSunAudioAvailable()
Usage: | if (Platform.isSunAudioAvailable()) . . . |
Returns: | true if the sun.audio package is available, false otherwise |
public static boolean isSwingAvailable()
Usage: | if (Platform.isSwingAvailable()) . . . |
Returns: | true if Swing is available, false otherwise |
public static boolean isUnix()
Usage: | if (Platform.isUnix()) . . . |
Returns: | true if the platform is Unix, false otherwise |
public static boolean isWindows()
Usage: | if (Platform.isWindows()) . . . |
Returns: | true if the platform is a Windows machine, false otherwise |
public static void setFileTypeAndCreator(File file,
String type,
String creator)
Usage: | setFileTypeAndCreator(file, type, creator); | ||||||
Parameters: |
|
public static void setFileTypeAndCreator(String filename,
String type,
String creator)
Usage: | setFileTypeAndCreator(filename, type, creator); | ||||||
Parameters: |
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |