Methods Summary |
---|
public abstract java.awt.Graphics2D | createGraphics(java.awt.image.BufferedImage bufferedImage)Creates the Graphics2D object for rendering to the specified
BufferedImage.
|
public abstract java.awt.Font[] | getAllFonts()Gets the array of all available fonts instances in this
GraphicsEnviroments.
|
public abstract java.lang.String[] | getAvailableFontFamilyNames()Gets the array of all available font family names.
|
public abstract java.lang.String[] | getAvailableFontFamilyNames(java.util.Locale locale)Gets the array of all available font family names for the specified
locale.
|
public java.awt.Point | getCenterPoint()Gets the Point which should defines the center of system window.
Rectangle mwb = getMaximumWindowBounds();
return new Point(mwb.width >> 1, mwb.height >> 1);
|
public abstract java.awt.GraphicsDevice | getDefaultScreenDevice()Gets the default screen device as GraphicDevice object.
|
public static java.awt.GraphicsEnvironment | getLocalGraphicsEnvironment()Gets the local GraphicsEnvironment.
synchronized (ContextStorage.getContextLock()) {
if (ContextStorage.getGraphicsEnvironment() == null) {
if (isHeadless()) {
ContextStorage.setGraphicsEnvironment(new HeadlessGraphicsEnvironment());
} else {
CommonGraphics2DFactory g2df = (CommonGraphics2DFactory)Toolkit
.getDefaultToolkit().getGraphicsFactory();
ContextStorage.setGraphicsEnvironment(g2df
.createGraphicsEnvironment(ContextStorage.getWindowFactory()));
}
}
return ContextStorage.getGraphicsEnvironment();
}
|
public java.awt.Rectangle | getMaximumWindowBounds()Gets the maximum bounds of system centered windows.
return getDefaultScreenDevice().getDefaultConfiguration().getBounds();
|
public abstract java.awt.GraphicsDevice[] | getScreenDevices()Gets an array of all available screen devices.
|
public static boolean | isHeadless()Checks whether or not a display, keyboard, and mouse are supported in
this environment.
return "true".equals(System.getProperty("java.awt.headless"));
|
public boolean | isHeadlessInstance()Returns whether or not a display, keyboard, and mouse are supported in
this graphics environment.
return false;
|
public void | preferLocaleFonts()Indicates that the primary font should be used. Primary font is specified
by initial system locale or default encoding).
// Note: API specification says following:
// "The actual change in font rendering behavior resulting
// from a call to this method is implementation dependent;
// it may have no effect at all." So, doing nothing is an
// acceptable behavior for this method.
// For now FontManager uses 1.4 font.properties scheme for font mapping,
// so
// this method doesn't make any sense. The implementation of this method
// which will influence font mapping is postponed until
// 1.5 mapping scheme not implemented.
// todo - Implement non-default behavior with 1.5 font mapping scheme
|
public void | preferProportionalFonts()Indicates that a proportional preference of the font should be used.
// Note: API specification says following:
// "The actual change in font rendering behavior resulting
// from a call to this method is implementation dependent;
// it may have no effect at all." So, doing nothing is an
// acceptable behavior for this method.
// For now FontManager uses 1.4 font.properties scheme for font mapping,
// so
// this method doesn't make any sense. The implementation of this method
// which will influence font mapping is postponed until
// 1.5 mapping scheme not implemented.
// todo - Implement non-default behavior with 1.5 font mapping scheme
|