Java Utililty Methods Graphics Environment

List of utility methods to do Graphics Environment

Description

The list of methods to do Graphics Environment are organized into topic(s).

Method

GraphicsConfigurationgetDefaultGraphicsConfig()
get Default Graphics Config
return defGraphicsConfig;
DimensiongetDesktopSize()
get Desktop Size
return desktopBounds.getSize();
GraphicsEnvironmentgetLocalGraphicsEnvironment()
get Local Graphics Environment
return GraphicsEnvironment.getLocalGraphicsEnvironment();
RectanglegetMaximumWindowBounds()
GraphicsEnvironment#getMaximumWindowBounds()
return getLocalGraphicsEnvironment().getMaximumWindowBounds();
DimensiongetMaximumWindowDimension()
get Maximum Window Dimension
GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
Rectangle bounds = env.getMaximumWindowBounds();
return new Dimension(bounds.width, bounds.height);
intgetMenuShortCutKeyMask()
need to guard against headlessExceptions when testing.
if (GraphicsEnvironment.isHeadless()) {
    return ((getOperatingSystem() & OS_MAC) != 0) ? KeyEvent.META_MASK : KeyEvent.CTRL_MASK;
return Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
RectanglegetWindowMaxBounds()
get Window Max Bounds
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
return ge.getMaximumWindowBounds();
booleanisInteractive()
is Interactive
String envVar = System.getProperty("WINTERWELL_HEADLESS");
if (envVar == null)
    return !GraphicsEnvironment.isHeadless();
return !envVar.toLowerCase().equals("true");