Package org.jdesktop.swingx.util
Class OS
- java.lang.Object
-
- org.jdesktop.swingx.util.OS
-
public class OS extends java.lang.ObjectProvides methods related to the runtime environment.
-
-
Field Summary
Fields Modifier and Type Field Description private static booleanosIsLinuxprivate static booleanosIsMacOsXprivate static booleanosIsWindowsprivate static booleanosIsWindows2003private static booleanosIsWindowsVistaprivate static booleanosIsWindowsXP
-
Constructor Summary
Constructors Constructor Description OS()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringgetWindowsVisualStyle()Returns the name of the current Windows visual style.static booleanisLinux()static booleanisMacOSX()static booleanisUsingWindowsVisualStyles()static booleanisWindows()static booleanisWindows2003()static booleanisWindowsVista()static booleanisWindowsXP()
-
-
-
Field Detail
-
osIsMacOsX
private static final boolean osIsMacOsX
-
osIsWindows
private static final boolean osIsWindows
-
osIsWindowsXP
private static final boolean osIsWindowsXP
-
osIsWindows2003
private static final boolean osIsWindows2003
-
osIsWindowsVista
private static final boolean osIsWindowsVista
-
osIsLinux
private static final boolean osIsLinux
-
-
Method Detail
-
isMacOSX
public static boolean isMacOSX()
- Returns:
- true if this VM is running on Mac OS X
-
isWindows
public static boolean isWindows()
- Returns:
- true if this VM is running on Windows
-
isWindowsXP
public static boolean isWindowsXP()
- Returns:
- true if this VM is running on Windows XP
-
isWindows2003
public static boolean isWindows2003()
- Returns:
- true if this VM is running on Windows 2003
-
isWindowsVista
public static boolean isWindowsVista()
- Returns:
- true if this VM is running on Windows Vista
-
isLinux
public static boolean isLinux()
- Returns:
- true if this VM is running on a Linux distribution
-
isUsingWindowsVisualStyles
public static boolean isUsingWindowsVisualStyles()
- Returns:
- true if the VM is running Windows and the Java application is rendered using XP Visual Styles.
-
getWindowsVisualStyle
public static java.lang.String getWindowsVisualStyle()
Returns the name of the current Windows visual style.- it looks for a property name "win.xpstyle.name" in UIManager and if not found
- it queries the win.xpstyle.colorName desktop property (
Toolkit.getDesktopProperty(java.lang.String))
- Returns:
- the name of the current Windows visual style if any.
-
-