src/share/classes/sun/awt/image/ImageRepresentation.java

Print this page
rev 9717 : 8039642: Fix raw and unchecked warnings in sun.awt.*
Reviewed-by:


 168     ColorModel getColorModel() {
 169         return cmodel;
 170     }
 171 
 172     BufferedImage getBufferedImage() {
 173         return bimage;
 174     }
 175 
 176     /**
 177      * Returns the BufferedImage that will be used as the representation of
 178      * the pixel data.  Subclasses can override this method to return
 179      * platform specific subclasses of BufferedImage that may or may not be
 180      * accelerated.
 181      *
 182      * It is subclass' responsibility to propagate acceleration priority
 183      * to the newly created image.
 184      */
 185     protected BufferedImage createImage(ColorModel cm,
 186                                         WritableRaster raster,
 187                                         boolean isRasterPremultiplied,
 188                                         Hashtable properties)
 189     {
 190         BufferedImage bi =
 191             new BufferedImage(cm, raster, isRasterPremultiplied, null);
 192         bi.setAccelerationPriority(image.getAccelerationPriority());
 193         return bi;
 194     }
 195 
 196     public void setProperties(Hashtable<?,?> props) {
 197         if (src != null) {
 198             src.checkSecurity(null, false);
 199         }
 200         image.setProperties(props);
 201         newInfo(image, ImageObserver.PROPERTIES, 0, 0, 0, 0);
 202     }
 203 
 204     public void setColorModel(ColorModel model) {
 205         if (src != null) {
 206             src.checkSecurity(null, false);
 207         }
 208         srcModel = model;




 168     ColorModel getColorModel() {
 169         return cmodel;
 170     }
 171 
 172     BufferedImage getBufferedImage() {
 173         return bimage;
 174     }
 175 
 176     /**
 177      * Returns the BufferedImage that will be used as the representation of
 178      * the pixel data.  Subclasses can override this method to return
 179      * platform specific subclasses of BufferedImage that may or may not be
 180      * accelerated.
 181      *
 182      * It is subclass' responsibility to propagate acceleration priority
 183      * to the newly created image.
 184      */
 185     protected BufferedImage createImage(ColorModel cm,
 186                                         WritableRaster raster,
 187                                         boolean isRasterPremultiplied,
 188                                         Hashtable<?,?> properties)
 189     {
 190         BufferedImage bi =
 191             new BufferedImage(cm, raster, isRasterPremultiplied, null);
 192         bi.setAccelerationPriority(image.getAccelerationPriority());
 193         return bi;
 194     }
 195 
 196     public void setProperties(Hashtable<?,?> props) {
 197         if (src != null) {
 198             src.checkSecurity(null, false);
 199         }
 200         image.setProperties(props);
 201         newInfo(image, ImageObserver.PROPERTIES, 0, 0, 0, 0);
 202     }
 203 
 204     public void setColorModel(ColorModel model) {
 205         if (src != null) {
 206             src.checkSecurity(null, false);
 207         }
 208         srcModel = model;