java.lang.Object | ||
↳ | java.awt.GraphicsEnvironment | |
↳ | sun.java2d.SunGraphicsEnvironment |
This is an implementation of a GraphicsEnvironment object for the default local GraphicsEnvironment.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
SunGraphicsEnvironment.T1Filter | |||||||||||
SunGraphicsEnvironment.TTFilter | |||||||||||
SunGraphicsEnvironment.TTorT1Filter |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | lucidaFileName | ||||||||||
String | lucidaFontName |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
debugFonts | |||||||||||
displayChanger | |||||||||||
eudcFontFileName | |||||||||||
fontPath | |||||||||||
isLinux | |||||||||||
isSolaris | |||||||||||
isWindows | |||||||||||
jreFontDirName | |||||||||||
jreLibDirName | |||||||||||
logger | |||||||||||
noType1Font | |||||||||||
registeredFontFiles | |||||||||||
screens | |||||||||||
t1Filter | |||||||||||
ttFilter |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Add a DisplayChangeListener to be notified when the display settings
are changed.
| |||||||||||
Returns a Graphics2D object for rendering into the
given BufferedImage.
| |||||||||||
From the DisplayChangedListener interface; called
when the display mode has been changed.
| |||||||||||
This method is provided for internal and exclusive use by Swing.
| |||||||||||
Returns all fonts available in this environment.
| |||||||||||
Returns all fonts installed in this environment.
| |||||||||||
Returns an array containing the names of all font families in this
GraphicsEnvironment localized for the specified locale. | |||||||||||
Returns an array containing the names of all font families in this
GraphicsEnvironment localized for the default locale,
as returned by Locale.getDefault() . | |||||||||||
Returns face name for default font, or null if
no face names are used for CompositeFontDescriptors
for this platform.
| |||||||||||
Returns file name for default font, either absolute
or relative as needed by registerFontFile.
| |||||||||||
Returns the default screen graphics device.
| |||||||||||
Return the default font configuration.
| |||||||||||
Get all directories which contain installed fonts.
| |||||||||||
Returns an array of all of the screen devices.
| |||||||||||
Return the bounds of a GraphicsDevice, less its screen insets.
| |||||||||||
Determines whether the given font is a logical font.
| |||||||||||
A few things in Java 2D code are different in OpenJDK,
so need a way to tell which implementation this is.
| |||||||||||
Part of the DisplayChangedListener interface:
propagate this event to listeners
| |||||||||||
Remove a DisplayChangeListener from Win32GraphicsEnvironment
| |||||||||||
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Notifies graphics environment that the logical font configuration
uses the given platform font name.
| |||||||||||
Creates this environment's FontConfiguration.
| |||||||||||
Returns a file name for the physical font represented by this platform
font name.
| |||||||||||
Whether registerFontFile expects absolute or relative
font file names.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Add a DisplayChangeListener to be notified when the display settings are changed.
Returns a Graphics2D object for rendering into the given BufferedImage.
img | the specified BufferedImage |
---|
Graphics2D
to be used for rendering into
the specified BufferedImage
NullPointerException | if BufferedImage argument is null |
---|
From the DisplayChangedListener interface; called when the display mode has been changed.
This method is provided for internal and exclusive use by Swing. This method should no longer be called, instead directly call FontManager.fontSupportsDefaultEncoding(Font). This method will be removed once Swing is updated to no longer call it.
Returns all fonts available in this environment.
Font
objectsReturns an array containing the names of all font families in this
GraphicsEnvironment
localized for the specified locale.
Typical usage would be for presentation to a user for selection of a particular family name. An application can then specify this name when creating a font, in conjunction with a style, such as bold or italic, giving the font system flexibility in choosing its own best match among multiple fonts in the same font family.
requestedLocale | a Locale object that represents a
particular geographical, political, or cultural region.
Specifying null is equivalent to
specifying Locale.getDefault() . |
---|
String
containing font family names
localized for the specified Locale
, or a
suitable alternative name if no name exists for the specified locale.Returns an array containing the names of all font families in this
GraphicsEnvironment
localized for the default locale,
as returned by Locale.getDefault()
.
Typical usage would be for presentation to a user for selection of a particular family name. An application can then specify this name when creating a font, in conjunction with a style, such as bold or italic, giving the font system flexibility in choosing its own best match among multiple fonts in the same font family.
String
containing font family names
localized for the default locale, or a suitable alternative
name if no name exists for this locale.Returns face name for default font, or null if no face names are used for CompositeFontDescriptors for this platform.
Returns file name for default font, either absolute or relative as needed by registerFontFile.
Returns the default screen graphics device.
GraphicsDevice
that represents the
default screen deviceReturns an array of all of the screen devices.
GraphicsDevice
objects that represent screen devicesReturn the bounds of a GraphicsDevice, less its screen insets. See also java.awt.GraphicsEnvironment.getUsableBounds();
A few things in Java 2D code are different in OpenJDK, so need a way to tell which implementation this is. The absence of Lucida Sans Regular is the simplest way for now.
Part of the DisplayChangedListener interface: propagate this event to listeners
Remove a DisplayChangeListener from Win32GraphicsEnvironment
Notifies graphics environment that the logical font configuration uses the given platform font name. The graphics environment may use this for platform specific initialization.
Creates this environment's FontConfiguration.
Returns a file name for the physical font represented by this platform font name. The default implementation tries to obtain the file name from the font configuration. Subclasses may override to provide information from other sources.
Whether registerFontFile expects absolute or relative font file names.