Package ch.swingfx.awt
Class GraphicsEnvironmentUtil
java.lang.Object
ch.swingfx.awt.GraphicsEnvironmentUtil
Utility to help in OS specific graphics environment tasks.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final boolean
java.awt.graphicsenv=apple.awt.CGraphicsEnvironment (OS X)static final boolean
java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironmentstatic final boolean
java.awt.graphicsenv=sun.awt.X11GraphicsEnvironmentstatic final Insets
Depending on the JRE Toolkit.getScreenInsets() doesn't always work on OS X.
Because the menu bar is always 22 we can provide the screen insets for the screen with the menu bar in this constant. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Rectangle
Get the x11 net workarea from a call to
xprop -root -notype _NET_WORKAREA
On some systems (jvms) we can not get the real screen insets so we read _NET_WORKAREA from the command line.
The output is translated to an Rectangle Output: _NET_WORKAREA = 0, 0, 1680, 1025 Rectangle: x, y, width, height
-
Field Details
-
OSX_MENU_BAR_SCREEN_INSETS
Depending on the JRE Toolkit.getScreenInsets() doesn't always work on OS X.
Because the menu bar is always 22 we can provide the screen insets for the screen with the menu bar in this constant. -
isX11GraphicsEnvironment
public static final boolean isX11GraphicsEnvironmentjava.awt.graphicsenv=sun.awt.X11GraphicsEnvironment -
isCGraphicsEnvironment
public static final boolean isCGraphicsEnvironmentjava.awt.graphicsenv=apple.awt.CGraphicsEnvironment (OS X) -
isWin32GraphicsEnvironment
public static final boolean isWin32GraphicsEnvironmentjava.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment
-
-
Constructor Details
-
GraphicsEnvironmentUtil
private GraphicsEnvironmentUtil()
-
-
Method Details
-
getX11RootNetWorkarea
Get the x11 net workarea from a call to
xprop -root -notype _NET_WORKAREA
On some systems (jvms) we can not get the real screen insets so we read _NET_WORKAREA from the command line.
The output is translated to an Rectangle Output: _NET_WORKAREA = 0, 0, 1680, 1025 Rectangle: x, y, width, height- Returns:
- the x11 net workarea or null if we can't read it
-