home *** CD-ROM | disk | FTP | other *** search
Java Source | 1998-03-20 | 2.5 KB | 85 lines |
- /*
- * @(#)GraphicsDevice.java 1.12 98/03/18
- *
- * Copyright 1997, 1998 by Sun Microsystems, Inc.,
- * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
- * All rights reserved.
- *
- * This software is the confidential and proprietary information
- * of Sun Microsystems, Inc. ("Confidential Information"). You
- * shall not disclose such Confidential Information and shall use
- * it only in accordance with the terms of the license agreement
- * you entered into with Sun.
- */
-
-
- package java.awt;
-
- /**
- * This class describes the graphics devices that may be available
- * in a graphics environment. These include screen and printer devices.
- * Note that there may be many screens and many printers in an instance
- * of GraphicsEnvironment. Each graphics
- * device has one or more GraphicsConfiguration objects associated with it.
- * These specify the different configurations in which the GraphicsDevice
- * can be used.
- * @see GraphicsEnvironment
- * @see GraphicsConfiguration
- * @version 10 Feb 1997
- */
- public abstract class GraphicsDevice {
- /**
- * Device is a raster screen.
- */
- public final static int TYPE_RASTER_SCREEN = 0;
-
- /**
- * Device is a printer.
- */
- public final static int TYPE_PRINTER = 1;
-
- /**
- * Device is an image buffer. This buffer may reside in device
- * or system memory but it is not visible to the user.
- */
- public final static int TYPE_IMAGE_BUFFER = 2;
-
- /**
- * Returns the type of the graphics device.
- * @see #TYPE_RASTER_SCREEN
- * @see #TYPE_PRINTER
- * @see #TYPE_IMAGE_BUFFER
- */
- public abstract int getType();
-
- /**
- * Returns the identification string associated with this graphics
- * device.
- */
- public abstract String getIDstring();
-
- /**
- * Returns all of the graphics
- * configurations associated with this graphics device.
- */
- public abstract GraphicsConfiguration[] getConfigurations();
-
- /**
- * Returns the default graphics configuration
- * associated with this graphics device.
- */
- public abstract GraphicsConfiguration getDefaultConfiguration();
-
- /**
- * Returns the "best" configuration possible that passes the
- * criteria defined in the GraphicsTemplate.
- * @see GraphicsConfigTemplate
- */
- public GraphicsConfiguration
- getBestConfiguration(GraphicsConfigTemplate gct) {
- GraphicsConfiguration[] configs = getConfigurations();
- return gct.getBestConfiguration(configs);
- }
-
- }
-