Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
java.awt.GraphicsEnvironment
gnu.awt.xlib.XGraphicsEnvironment
public class XGraphicsEnvironment
extends GraphicsEnvironment
Method Summary | |
Graphics2D |
|
Font[] |
|
String[] |
|
String[] |
|
GraphicsDevice |
|
GraphicsDevice[] |
|
Methods inherited from class java.awt.GraphicsEnvironment | |
createGraphics , getAllFonts , getAvailableFontFamilyNames , getAvailableFontFamilyNames , getCenterPoint , getDefaultScreenDevice , getLocalGraphicsEnvironment , getMaximumWindowBounds , getScreenDevices , isHeadless , isHeadlessInstance |
Methods inherited from class java.lang.Object | |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
public Graphics2D createGraphics(BufferedImage image)
Return a Graphics2D object which will render into the specified image.
- Overrides:
- createGraphics in interface GraphicsEnvironment
- Parameters:
image
- the image to render into
- Returns:
- the object that renders into the image
public Font[] getAllFonts()
Returns an array of the one-point size fonts available in this environment. From there, the user can select the font and derive the correct one of proper size and attributes, usingderiveFont
. Only one master version of each font appears in this array; if a font can be derived from another, it must be created in that way.
- Overrides:
- getAllFonts in interface GraphicsEnvironment
- Returns:
- the array of available fonts
- Since:
- 1.2
public String[] getAvailableFontFamilyNames()
Returns an array of the font family names available in this environment. This allows flexibility in choosing the style of font, while still letting the Font class decide its best match.
- Overrides:
- getAvailableFontFamilyNames in interface GraphicsEnvironment
- Returns:
- the array of available font families
- Since:
- 1.2
public String[] getAvailableFontFamilyNames(Locale l)
Returns an array of the font family names available in this environment, localized to the current Locale if l is non-null. This allows flexibility in choosing the style of font, while still letting the Font class decide its best match.
- Overrides:
- getAvailableFontFamilyNames in interface GraphicsEnvironment
- Parameters:
l
- the locale to use
- Returns:
- the array of available font families, localized
- Since:
- 1.2
public GraphicsDevice getDefaultScreenDevice()
Get the default screen GraphicsDevice object.
- Overrides:
- getDefaultScreenDevice in interface GraphicsEnvironment
- Returns:
- the default screen device
- Throws:
HeadlessException
- if the environment is headless
public GraphicsDevice[] getScreenDevices()
Get an array of all the GraphicsDevice objects.
- Overrides:
- getScreenDevices in interface GraphicsEnvironment
- Returns:
- the available graphics devices, may be 0 length
- Throws:
HeadlessException
- if the environment is headless