SunGraphicsEnvironment.java revision 3358
2362N/A * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * This is an implementation of a GraphicsEnvironment object for the 0N/A * default local GraphicsEnvironment. 0N/A * @see GraphicsDevice 0N/A * @see GraphicsConfiguration /* Establish the default font to be used by SG2D etc */ * Returns an array of all of the screen devices. for (
int i =
0; i <
num; i++) {
* Returns the number of screen devices of this graphics environment. * @return the number of screen devices of this graphics environment * Create and return the screen device with the specified number. The * device with number <code>0</code> will be the default device (returned * by {@link #getDefaultScreenDevice()}. * @param screennum the number of the screen to create * @return the created screen device * Returns the default screen graphics device. * Returns a Graphics2D object for rendering into the * @throws NullPointerException if BufferedImage argument is null * Returns all fonts available in this environment. /* Use a new TreeMap as used in getInstalledFontFamilyNames * and insert all the keys in lower case, so that the sort order * is the same as the installed families. This preserves historical * behaviour and inserts new families in the right place. * It would have been marginally more efficient to directly obtain * the tree map and just insert new entries, but not so much as * to justify the extra internal interface. * Return the bounds of a GraphicsDevice, less its screen insets. * See also java.awt.GraphicsEnvironment.getUsableBounds(); * From the DisplayChangedListener interface; called * when the display mode has been changed. // notify screens in device array to do display update stuff // notify SunDisplayChanger list (e.g. VolatileSurfaceManagers and // SurfaceDataProxies) about the display change event * Part of the DisplayChangedListener interface: * propagate this event to listeners * Returns true when the display is local, false for remote displays. * @return true when the display is local, false for remote displays * ----DISPLAY CHANGE SUPPORT---- * Add a DisplayChangeListener to be notified when the display settings * Remove a DisplayChangeListener from Win32GraphicsEnvironment * ----END DISPLAY CHANGE SUPPORT---- * Returns true if FlipBufferStrategy with COPIED buffer contents * is preferred for this peer's GraphicsConfiguration over * BlitBufferStrategy, false otherwise. * The reason FlipBS could be preferred is that in some configurations * an accelerated copy to the screen is supported (like Direct3D 9) * @return true if flip strategy should be used, false otherwise