X11GraphicsConfig.java revision 1221
1045N/A * Copyright 1997-2009 Sun Microsystems, Inc. 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 0N/A * published by the Free Software Foundation. Sun designates this 0N/A * particular file as subject to the "Classpath" exception as provided 0N/A * by Sun 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. 0N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 0N/A * CA 95054 USA or visit www.sun.com if you need additional information or 0N/A * have any questions. 0N/A * This is an implementation of a GraphicsConfiguration object for a 0N/A * single X11 visual. 0N/A * @see GraphicsEnvironment 0N/A * @see GraphicsDevice 0N/A // will be set on native level from init() 0N/A * Note this method is currently here for backward compatability 0N/A * as this was the method used in jdk 1.2 beta4 to create the 0N/A * X11GraphicsConfig objects. Java3D code had called this method 0N/A * explicitly so without this, if a user tries to use JDK1.2 fcs 0N/A * with Java3D beta1, a NoSuchMethod execption is thrown and 0N/A * the program exits. REMOVE this method after Java3D fcs is 0N/A // add a record to the Disposer so that we destroy the native 0N/A // AwtGraphicsConfigData when this object goes away (i.e. after a 0N/A // display change event) 0N/A * Return the graphics device associated with this configuration. 0N/A * Returns the visual id associated with this configuration. 0N/A * Returns the depth associated with this configuration. 0N/A * Returns the colormap associated with this configuration. 0N/A * Returns a number of bits allocated per pixel 0N/A * (might be different from depth) 0N/A * Return the RenderLoops this type of destination uses for 0N/A * solid fills and strokes. 0N/A * Returns the color model associated with this configuration. 0N/A // Force SystemColors to be resolved before we create the CM 0N/A // This method, makeColorModel(), can return null if the 0N/A // toolkit is not initialized yet. 0N/A // The toolkit will then call back to this routine after it 0N/A // is initialized and makeColorModel() should return a non-null 0N/A * Returns the color model associated with this configuration that 0N/A * supports the specified transparency. 0N/A * Returns the default Transform for this configuration. This 0N/A * Transform is typically the Identity transform for most normal 0N/A * screens. Device coordinates for screen and printer devices will 0N/A * have the origin in the upper left-hand corner of the target region of 0N/A * the device, with X coordinates 0N/A * increasing to the right and Y coordinates increasing downwards. 0N/A * For image buffers, this Transform will be the Identity transform. 0N/A * Returns a Transform that can be composed with the default Transform 0N/A * of a Graphics2D so that 72 units in user space will equal 1 inch 0N/A * Given a Graphics2D, g, one can reset the transformation to create 0N/A * such a mapping by using the following pseudocode: 0N/A * GraphicsConfiguration gc = g.getGraphicsConfiguration(); 0N/A * g.setTransform(gc.getDefaultTransform()); 0N/A * g.transform(gc.getNormalizingTransform()); 0N/A * Note that sometimes this Transform will be identity (e.g. for 0N/A * printers or metafile output) and that this Transform is only 0N/A * as accurate as the information supplied by the underlying system. 0N/A * For image buffers, this Transform will be the Identity transform, 0N/A * since there is no valid distance measurement. 0N/A * Initialize JNI field and method IDs for fields that may be 0N/A * implementations hardcoded in those classes. This way the appropriate 0N/A * actions are taken based on the peer's GraphicsConfig, whether it is 0N/A * an X11GraphicsConfig or a GLXGraphicsConfig. 0N/A * Creates a new SurfaceData that will be associated with the given 0N/A * Creates a new hidden-acceleration image of the given width and height 0N/A * that is associated with the target Component. 0N/A // As of 1.7 we no longer create pmoffscreens here... 0N/A * The following methods correspond to the multibuffering methods in 0N/A * Attempts to create an XDBE-based backbuffer for the given peer. If 0N/A * the requested configuration is not natively supported, an AWTException 0N/A * is thrown. Otherwise, if the backbuffer creation is successful, a 0N/A * handle to the native backbuffer is returned. 0N/A "Only double or single buffering is supported");
0N/A * Destroys the backbuffer object represented by the given handle value. 0N/A * Creates a VolatileImage that essentially wraps the target Component's 0N/A * backbuffer, using the provided backbuffer handle. 0N/A * Performs the native XDBE flip operation for the given target Component. 0N/A * Maps the given FlipContents constant to the associated XDBE swap 0N/A return 0x00;
// UNDEFINED