|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.alee.utils.SystemUtils
public final class SystemUtils
This class provides a set of utilities to retrieve various operating system information. Futher on operating system called shortly - OS.
Field Summary | |
---|---|
static java.lang.String |
MAC
Mac OS short name. |
static java.lang.String |
SOLARIS
Solaris short name. |
static java.lang.String |
UNIX
Unix short name. |
static java.lang.String |
WINDOWS
Windows short name. |
Constructor Summary | |
---|---|
SystemUtils()
|
Method Summary | |
---|---|
static void |
copyToClipboard(java.lang.String text)
Copies text to system clipboard. |
static java.awt.GraphicsConfiguration |
getGraphicsConfiguration()
Returns default GraphicsConfiguration for main screen. |
static java.util.List<java.awt.GraphicsDevice> |
getGraphicsDevices()
Returns list of available screen devices. |
static java.lang.String |
getJavaName()
Returns java vm name. |
static java.lang.String |
getJavaVendor()
Returns java vm vendor. |
static JavaVersion |
getJavaVersion()
Returns java version application is running on. |
static java.lang.String |
getJavaVersionString()
Returns java version. |
static java.lang.String |
getJreArch()
Returns JRE architecture. |
static java.lang.String |
getJreArchName()
Returns JRE architecture name. |
static java.lang.String |
getOsArch()
Returns OS architecture. |
static javax.swing.ImageIcon |
getOsIcon()
Returns OS icon. |
static javax.swing.ImageIcon |
getOsIcon(boolean color)
Returns colored or grayscale OS icon. |
static javax.swing.ImageIcon |
getOsIcon(int size)
Returns OS icon of specified size if such exists; returns 16x16 icon otherwise. |
static javax.swing.ImageIcon |
getOsIcon(int size,
boolean color)
Returns colored or grayscale OS icon of specified size if such exists; returns 16x16 icon otherwise. |
static java.lang.String |
getOsName()
Returns OS name. |
static int |
getOsProcessors()
Returns the number of processors available to the Java virtual machine. |
static java.lang.String |
getOsSite()
|
static java.lang.String |
getOsVersion()
Returns OS version. |
static java.lang.String |
getShortOsName()
Returns short OS name. |
static java.lang.String |
getStringFromClipboard()
Returns string clipboard content. |
static java.awt.Cursor |
getTransparentCursor()
|
static boolean |
isCapsLock()
Returns whether Caps Lock is on or not. |
static boolean |
isJava6orAbove()
Returns whether applicaton is running on java 6 version and above or not. |
static boolean |
isJava7orAbove()
Returns whether applicaton is running on java 7 version and above or not. |
static boolean |
isJava8orAbove()
Returns whether applicaton is running on java 8 version and above or not. |
static boolean |
isJavaVersion(double version,
int update)
Returns whether applicaton is running on the specified java version and above or not. |
static boolean |
isJavaVersion(double major,
int minor,
int update)
Returns whether applicaton is running on the specified java version and above or not. |
static boolean |
isMac()
Returns whether current OS is mac or not. |
static boolean |
isNumLock()
Returns whether Num Lock is on or not. |
static boolean |
isScrollLock()
Returns whether Scroll Lock is on or not. |
static boolean |
isSolaris()
Returns whether current OS is solaris or not. |
static boolean |
isUnix()
Returns whether current OS is unix or not. |
static boolean |
isWindows()
Returns whether current OS is windows or not. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String WINDOWS
public static final java.lang.String MAC
public static final java.lang.String UNIX
public static final java.lang.String SOLARIS
Constructor Detail |
---|
public SystemUtils()
Method Detail |
---|
public static void copyToClipboard(java.lang.String text)
text
- text to copy into clipboardpublic static java.lang.String getStringFromClipboard()
public static java.lang.String getJavaVersionString()
public static JavaVersion getJavaVersion()
public static boolean isJavaVersion(double version, int update)
public static boolean isJavaVersion(double major, int minor, int update)
public static boolean isJava6orAbove()
public static boolean isJava7orAbove()
public static boolean isJava8orAbove()
public static java.lang.String getJavaName()
public static java.lang.String getJavaVendor()
public static java.lang.String getShortOsName()
public static javax.swing.ImageIcon getOsIcon()
public static javax.swing.ImageIcon getOsIcon(boolean color)
color
- whether return colored icon or not
public static javax.swing.ImageIcon getOsIcon(int size)
size
- preferred icon size
public static javax.swing.ImageIcon getOsIcon(int size, boolean color)
size
- preferred icon sizecolor
- whether return colored icon or not
public static boolean isWindows()
public static boolean isMac()
public static boolean isUnix()
public static boolean isSolaris()
public static java.lang.String getOsArch()
public static java.lang.String getOsName()
public static java.lang.String getOsSite()
public static java.lang.String getOsVersion()
public static int getOsProcessors()
public static java.lang.String getJreArch()
public static java.lang.String getJreArchName()
public static boolean isCapsLock()
public static boolean isNumLock()
public static boolean isScrollLock()
public static java.awt.GraphicsConfiguration getGraphicsConfiguration()
public static java.util.List<java.awt.GraphicsDevice> getGraphicsDevices()
public static java.awt.Cursor getTransparentCursor()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |