gnu.awt.xlib

Class XGraphicsEnvironment


public class XGraphicsEnvironment
extends GraphicsEnvironment

Method Summary

Graphics2D
createGraphics(BufferedImage image)
Return a Graphics2D object which will render into the specified image.
Font[]
getAllFonts()
Returns an array of the one-point size fonts available in this environment.
String[]
getAvailableFontFamilyNames()
Returns an array of the font family names available in this environment.
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.
GraphicsDevice
getDefaultScreenDevice()
Get the default screen GraphicsDevice object.
GraphicsDevice[]
getScreenDevices()
Get an array of all the GraphicsDevice objects.

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

Method Details

createGraphics

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

getAllFonts

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, using deriveFont. 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

getAvailableFontFamilyNames

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

getAvailableFontFamilyNames

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

getDefaultScreenDevice

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

getScreenDevices

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

Copyright (C) 2005 Free Software Foundation This file is part of libgcj. This software is copyrighted work licensed under the terms of the Libgcj License. Please consult the file "LIBGCJ_LICENSE" for details.