< prev index next >

src/java.desktop/share/classes/sun/awt/image/BufferedImageDevice.java

Print this page




  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package sun.awt.image;
  27 
  28 import java.awt.GraphicsDevice;
  29 import java.awt.GraphicsConfiguration;
  30 
  31 public class BufferedImageDevice extends GraphicsDevice
  32 {
  33     GraphicsConfiguration gc;
  34 
  35     public BufferedImageDevice(BufferedImageGraphicsConfig gc) {
  36         this.gc = gc;
  37     }
  38 
  39     /**
  40      * Returns the type of this <code>GraphicsDevice</code>.
  41      * @return the type of this <code>GraphicsDevice</code>, which can
  42      * either be TYPE_RASTER_SCREEN, TYPE_PRINTER or TYPE_IMAGE_BUFFER.
  43      * @see #TYPE_RASTER_SCREEN
  44      * @see #TYPE_PRINTER
  45      * @see #TYPE_IMAGE_BUFFER
  46      */
  47     public int getType() {
  48         return GraphicsDevice.TYPE_IMAGE_BUFFER;
  49     }
  50 
  51     /**
  52      * Returns the identification string associated with this
  53      * <code>GraphicsDevice</code>.
  54      * @return a <code>String</code> that is the identification
  55      * of this <code>GraphicsDevice</code>.
  56      */
  57     public String getIDstring() {
  58         return ("BufferedImage");
  59     }
  60 
  61     /**
  62      * Returns all of the <code>GraphicsConfiguration</code>
  63      * objects associated with this <code>GraphicsDevice</code>.
  64      * @return an array of <code>GraphicsConfiguration</code>
  65      * objects that are associated with this
  66      * <code>GraphicsDevice</code>.
  67      */
  68     public GraphicsConfiguration[] getConfigurations() {
  69         return new GraphicsConfiguration[] { gc };
  70     }
  71 
  72     /**
  73      * Returns the default <code>GraphicsConfiguration</code>
  74      * associated with this <code>GraphicsDevice</code>.
  75      * @return the default <code>GraphicsConfiguration</code>
  76      * of this <code>GraphicsDevice</code>.
  77      */
  78     public GraphicsConfiguration getDefaultConfiguration() {
  79         return gc;
  80     }
  81 }


  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package sun.awt.image;
  27 
  28 import java.awt.GraphicsDevice;
  29 import java.awt.GraphicsConfiguration;
  30 
  31 public class BufferedImageDevice extends GraphicsDevice
  32 {
  33     GraphicsConfiguration gc;
  34 
  35     public BufferedImageDevice(BufferedImageGraphicsConfig gc) {
  36         this.gc = gc;
  37     }
  38 
  39     /**
  40      * Returns the type of this {@code GraphicsDevice}.
  41      * @return the type of this {@code GraphicsDevice}, which can
  42      * either be TYPE_RASTER_SCREEN, TYPE_PRINTER or TYPE_IMAGE_BUFFER.
  43      * @see #TYPE_RASTER_SCREEN
  44      * @see #TYPE_PRINTER
  45      * @see #TYPE_IMAGE_BUFFER
  46      */
  47     public int getType() {
  48         return GraphicsDevice.TYPE_IMAGE_BUFFER;
  49     }
  50 
  51     /**
  52      * Returns the identification string associated with this
  53      * {@code GraphicsDevice}.
  54      * @return a {@code String} that is the identification
  55      * of this {@code GraphicsDevice}.
  56      */
  57     public String getIDstring() {
  58         return ("BufferedImage");
  59     }
  60 
  61     /**
  62      * Returns all of the {@code GraphicsConfiguration}
  63      * objects associated with this {@code GraphicsDevice}.
  64      * @return an array of {@code GraphicsConfiguration}
  65      * objects that are associated with this
  66      * {@code GraphicsDevice}.
  67      */
  68     public GraphicsConfiguration[] getConfigurations() {
  69         return new GraphicsConfiguration[] { gc };
  70     }
  71 
  72     /**
  73      * Returns the default {@code GraphicsConfiguration}
  74      * associated with this {@code GraphicsDevice}.
  75      * @return the default {@code GraphicsConfiguration}
  76      * of this {@code GraphicsDevice}.
  77      */
  78     public GraphicsConfiguration getDefaultConfiguration() {
  79         return gc;
  80     }
  81 }
< prev index next >