src/share/classes/java/awt/image/ImageConsumer.java

Print this page


   1 /*
   2  * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  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 java.awt.image;
  27 
  28 import java.util.Hashtable;
  29 
  30 import javax.tools.annotation.GenerateNativeHeader;
  31 
  32 /**
  33  * The interface for objects expressing interest in image data through
  34  * the ImageProducer interfaces.  When a consumer is added to an image
  35  * producer, the producer delivers all of the data about the image
  36  * using the method calls defined in this interface.
  37  *
  38  * @see ImageProducer
  39  *
  40  * @author      Jim Graham
  41  */
  42 /* No native methods here, but the constants are needed in the supporting JNI code */
  43 @GenerateNativeHeader
  44 public interface ImageConsumer {
  45     /**
  46      * The dimensions of the source image are reported using the
  47      * setDimensions method call.
  48      * @param width the width of the source image
  49      * @param height the height of the source image
  50      */
  51     void setDimensions(int width, int height);
  52 
  53     /**
  54      * Sets the extensible list of properties associated with this image.
  55      * @param props the list of properties to be associated with this
  56      *        image
  57      */
  58     void setProperties(Hashtable<?,?> props);
  59 
  60     /**
  61      * Sets the ColorModel object used for the majority of
  62      * the pixels reported using the setPixels method
  63      * calls.  Note that each set of pixels delivered using setPixels


   1 /*
   2  * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  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 java.awt.image;
  27 
  28 import java.util.Hashtable;
  29 

  30 
  31 /**
  32  * The interface for objects expressing interest in image data through
  33  * the ImageProducer interfaces.  When a consumer is added to an image
  34  * producer, the producer delivers all of the data about the image
  35  * using the method calls defined in this interface.
  36  *
  37  * @see ImageProducer
  38  *
  39  * @author      Jim Graham
  40  */


  41 public interface ImageConsumer {
  42     /**
  43      * The dimensions of the source image are reported using the
  44      * setDimensions method call.
  45      * @param width the width of the source image
  46      * @param height the height of the source image
  47      */
  48     void setDimensions(int width, int height);
  49 
  50     /**
  51      * Sets the extensible list of properties associated with this image.
  52      * @param props the list of properties to be associated with this
  53      *        image
  54      */
  55     void setProperties(Hashtable<?,?> props);
  56 
  57     /**
  58      * Sets the ColorModel object used for the majority of
  59      * the pixels reported using the setPixels method
  60      * calls.  Note that each set of pixels delivered using setPixels