| java.lang.Object java.awt.GraphicsEnvironment
All known Subclasses: sun.awt.gtk.GdkGraphicsEnvironment, java.awt.X11GraphicsEnvironment, java.awt.QtGraphicsEnvironment, java.awt.MWGraphicsEnvironment, sun.awt.pocketpc.PPCGraphicsEnvironment, sun.awt.qt.QtGraphicsEnvironment,
GraphicsEnvironment | abstract public class GraphicsEnvironment (Code) | | The GraphicsEnvironment class describes the collection
of
GraphicsDevice objects and
java.awt.Font objects
available to a Java(tm) application on a particular platform.
The resources in this GraphicsEnvironment might be local
or on a remote machine. GraphicsDevice objects can be
screens, printers or image buffers and are the destination of
Graphics2D drawing methods. Each GraphicsDevice
has a number of
GraphicsConfiguration objects associated with
it. These objects specify the different configurations in which the
GraphicsDevice can be used.
See Also: GraphicsDevice See Also: GraphicsConfiguration version: 1.42, 02/02/00 |
Constructor Summary | |
protected | GraphicsEnvironment() This is an abstract class and cannot be instantiated directly. |
GraphicsEnvironment | protected GraphicsEnvironment()(Code) | | This is an abstract class and cannot be instantiated directly.
Instances must be obtained from a suitable factory or query method.
|
getAvailableFontFamilyNames | abstract public String[] getAvailableFontFamilyNames()(Code) | | Returns an array containing the names of all font families available
in this GraphicsEnvironment .
Typical usage would be to allow a user to select a particular family
name and allow the application to choose related variants of the
same family when the user specifies style attributes such
as Bold or Italic.
This method provides for the application some control over which
Font instance is used to render text, but allows the
Font object more flexibility in choosing its own best
match among multiple fonts in the same font family.
an array of String containing names of fontfamilies. See Also: GraphicsEnvironment.getAllFonts See Also: java.awt.Font See Also: java.awt.Font.getFamily since: 1.2 |
getAvailableFontFamilyNames | abstract public String[] getAvailableFontFamilyNames(Locale l)(Code) | | Returns an array containing the localized names of all font families
available in this GraphicsEnvironment .
Typical usage would be to allow a user to select a particular family
name and allow the application to choose related variants of the
same family when the user specifies style attributes such
as Bold or Italic.
This method provides for the application some control over which
Font instance used to render text, but allows the
Font object more flexibility in choosing its own best
match among multiple fonts in the same font family.
If l is null , this method returns an
array containing all font family names available in this
GraphicsEnvironment .
Parameters: l - a Locale object that represents aparticular geographical, political, or cultural region an array of String objects containing names offont families specific to the specified Locale . See Also: GraphicsEnvironment.getAllFonts See Also: java.awt.Font See Also: java.awt.Font.getFamily since: 1.2 |
getDefaultScreenDevice | abstract public GraphicsDevice getDefaultScreenDevice()(Code) | | Returns the default screen GraphicsDevice .
the GraphicsDevice that represents thedefault screen device. |
getLocalGraphicsEnvironment | public static synchronized GraphicsEnvironment getLocalGraphicsEnvironment()(Code) | | Returns the local GraphicsEnvironment .
this GraphicsEnvironment . |
getScreenDevices | abstract public GraphicsDevice[] getScreenDevices()(Code) | | Returns an array of all of the screen GraphicsDevice
objects.
an array containing all the GraphicsDevice objects that represent screen devices. |
isHeadless | public static boolean isHeadless()(Code) | | Tests whether or not a display, keyboard, and mouse can be
supported in this environment. If this method returns true,
a HeadlessException is thrown from areas of the Toolkit
and GraphicsEnvironment that are dependent on a display,
keyboard, or mouse.
true if this environment cannot supporta display, keyboard, and mouse; false otherwise See Also: java.awt.HeadlessException since: 1.4 |
|
|