public final class GraphicsEnvironment extends Object
Constructor and Description |
---|
GraphicsEnvironment() |
Modifier and Type | Method and Description |
---|---|
static GraphicsConfiguration |
getGraphicsConfiguration(Point point)
Returns the
GraphicsConfiguration object which belongs to the given point. |
static int |
getScreenResolution()
Returns the screen resolution in dots-per-inch.
|
static Clipboard |
getSystemClipboard()
Gets the system clipboard which interfaces with clipboard facilities provided by the native
platform.
|
static boolean |
isSystemClipboardAccessible()
Returns an indicator whether system clipboard is accessible.
|
static void |
setUserDefinedScreenResolution(int resolution)
Set a user-defined resolution in dots-per-inch to be used for all sizing-calculations instead
of the resolution returned from
Toolkit.getScreenResolution() . |
public static final int getScreenResolution()
Toolkit.getScreenResolution()
is used. If the graphics environment is headless, a default value of 72 will be returned.
If a user-defined resolution has been set to a positive value via
setUserDefinedScreenResolution(int)
, this value will be used instead.public static final void setUserDefinedScreenResolution(int resolution)
Toolkit.getScreenResolution()
.
If set to zero or a negative value, the default resolution as provided by
Toolkit.getScreenResolution()
will be used.public static final Clipboard getSystemClipboard()
Toolkit.getSystemClipboard()
this method will not
throw an exception if GraphicsEnvironment.isHeadless().public static final boolean isSystemClipboardAccessible()
public static final GraphicsConfiguration getGraphicsConfiguration(Point point)
GraphicsConfiguration
object which belongs to the given point. If the given
point is null
the GraphicsConfiguration of the default screen will be returned.point
- look up pointGraphicsConfiguration
object which belongs to the given or
null
if the point is null
Copyright © 2024 levigo holding gmbh. All rights reserved.