|
|||||||||
| Home >> All >> com >> virtuosotechnologies >> lib >> [ platform overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.virtuosotechnologies.lib.platform
Class PlatformUtils

java.lang.Objectcom.virtuosotechnologies.lib.platform.PlatformUtils
- public final class PlatformUtils
- extends java.lang.Object
Utilities for dealing with cross-platform issues.
| Field Summary | |
private static com.virtuosotechnologies.lib.util.EventBroadcastHelper |
broadcaster_
|
static PlatformID |
JAVA_COMPATIBLE_PLATFORM
|
static PlatformID |
LINUX_PLATFORM
|
private static java.lang.Object |
lock_
|
static PlatformID |
MAC_OS_PLATFORM
|
static PlatformID |
MAC_OS_X_PLATFORM
|
static java.lang.String |
MAC_OS_X_PROVIDERNAME
|
static PlatformEvent.Type |
OPEN_ABOUTBOX_EVENT
|
static PlatformEvent.Type |
OPEN_PREFERENCES_EVENT
|
private static PlatformID |
platform_
|
private static java.util.Map |
providersByName_
|
private static boolean |
providersInitialized_
|
static PlatformEvent.Type |
QUIT_EVENT
|
static PlatformID |
UNIX_PLATFORM
|
static PlatformID |
WINDOWS_PLATFORM
|
| Constructor Summary | |
private |
PlatformUtils()
Prevent instantiation |
| Method Summary | |
static void |
addPlatformListener(PlatformListener listener)
Add a listener for platform events |
static void |
firePlatformEvent(PlatformEvent event)
Fire a platform event |
static PlatformID |
getCurrentPlatformID()
Returns a PlatformID describing the current platform |
static PlatformProvider |
getNamedPlatformProvider(java.lang.String name)
Returns the platform provider with the given name if it is available, or null if it is not. |
private static void |
initPlatformProviders()
|
static boolean |
isSystemPreferencesMenuItemEnabled()
Returns true if there is a system-provided "Preferences" menu item and it is enabled. |
static boolean |
isUsingMacOSXScreenMenuBar()
Returns true if swing menu bars are currently being merged into the Mac OS X screen-wide menu bar. |
static void |
removePlatformListener(PlatformListener listener)
Remove a listener for platform events |
static boolean |
setSystemPreferencesMenuItemEnabled(boolean enabled)
Enable or disable the system-provided "Preferences" menu item. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
platform_
private static PlatformID platform_
broadcaster_
private static com.virtuosotechnologies.lib.util.EventBroadcastHelper broadcaster_
providersInitialized_
private static boolean providersInitialized_
providersByName_
private static java.util.Map providersByName_
lock_
private static final java.lang.Object lock_
OPEN_ABOUTBOX_EVENT
public static final PlatformEvent.Type OPEN_ABOUTBOX_EVENT
QUIT_EVENT
public static final PlatformEvent.Type QUIT_EVENT
OPEN_PREFERENCES_EVENT
public static final PlatformEvent.Type OPEN_PREFERENCES_EVENT
JAVA_COMPATIBLE_PLATFORM
public static final PlatformID JAVA_COMPATIBLE_PLATFORM
UNIX_PLATFORM
public static final PlatformID UNIX_PLATFORM
MAC_OS_PLATFORM
public static final PlatformID MAC_OS_PLATFORM
WINDOWS_PLATFORM
public static final PlatformID WINDOWS_PLATFORM
MAC_OS_X_PLATFORM
public static final PlatformID MAC_OS_X_PLATFORM
LINUX_PLATFORM
public static final PlatformID LINUX_PLATFORM
MAC_OS_X_PROVIDERNAME
public static final java.lang.String MAC_OS_X_PROVIDERNAME
- See Also:
- Constant Field Values
| Constructor Detail |
PlatformUtils
private PlatformUtils()
- Prevent instantiation
| Method Detail |
getCurrentPlatformID
public static PlatformID getCurrentPlatformID()
- Returns a PlatformID describing the current platform
addPlatformListener
public static void addPlatformListener(PlatformListener listener)
- Add a listener for platform events
removePlatformListener
public static void removePlatformListener(PlatformListener listener)
- Remove a listener for platform events
firePlatformEvent
public static void firePlatformEvent(PlatformEvent event)
- Fire a platform event
initPlatformProviders
private static void initPlatformProviders()
getNamedPlatformProvider
public static PlatformProvider getNamedPlatformProvider(java.lang.String name)
- Returns the platform provider with the given name if it is available, or
null if it is not.
Note that even if we're running on that platform, this may still return null
if the platform provider wasn't compiled in by whoever built this program--
in such a case, functionality specific to that platform will still not be
available.
isUsingMacOSXScreenMenuBar
public static boolean isUsingMacOSXScreenMenuBar()
- Returns true if swing menu bars are currently being merged into the Mac OS X
screen-wide menu bar. If this is the case, a system menu is present that
automatically provides "About", "Preferences" and "Quit" items, among others.
In this case, the program should generally not provide those facilities itself.
isSystemPreferencesMenuItemEnabled
public static boolean isSystemPreferencesMenuItemEnabled()
- Returns true if there is a system-provided "Preferences" menu item
and it is enabled.
setSystemPreferencesMenuItemEnabled
public static boolean setSystemPreferencesMenuItemEnabled(boolean enabled)
- Enable or disable the system-provided "Preferences" menu item.
|
|||||||||
| Home >> All >> com >> virtuosotechnologies >> lib >> [ platform overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.virtuosotechnologies.lib.platform.PlatformUtils