1 /* IIOReadUpdateListener.java -- 2 Copyright (C) 2004 Free Software Foundation, Inc. 3 4 This file is part of GNU Classpath. 5 6 GNU Classpath is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2, or (at your option) 9 any later version. 10 11 GNU Classpath is distributed in the hope that it will be useful, but 12 WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with GNU Classpath; see the file COPYING. If not, write to the 18 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 19 02110-1301 USA. 20 21 Linking this library statically or dynamically with other modules is 22 making a combined work based on this library. Thus, the terms and 23 conditions of the GNU General Public License cover the whole 24 combination. 25 26 As a special exception, the copyright holders of this library give you 27 permission to link this library with independent modules to produce an 28 executable, regardless of the license terms of these independent 29 modules, and to copy and distribute the resulting executable under 30 terms of your choice, provided that you also meet, for each linked 31 independent module, the terms and conditions of the license of that 32 module. An independent module is a module which is not derived from 33 or based on this library. If you modify this library, you may extend 34 this exception to your version of the library, but you are not 35 obligated to do so. If you do not wish to do so, delete this 36 exception statement from your version. */ 37 38 39 package javax.imageio.event; 40 41 import java.awt.image.BufferedImage; 42 import java.util.EventListener; 43 44 import javax.imageio.ImageReader; 45 46 public interface IIOReadUpdateListener extends EventListener 47 { 48 /** 49 * Reports that a given region of the image has been updated. 50 * 51 * @param source the <code>ImageReader</code> object calling this method 52 * @param image the BufferedImage being updated 53 * @param minX the X coordinate of the leftmost updated column of pixels 54 * @param minY the Y coordinate of the uppermost updated row of pixels 55 * @param width the number of updated pixels horizontally 56 * @param height the number of updated pixels vertically 57 * @param periodX the horizontal spacing between updated pixels; a value of 1 means no gaps 58 * @param periodY the vertical spacing between updated pixels; a value of 1 means no gaps 59 * @param bands an array of <code>int</code>s indicating which bands are being updated 60 */ imageUpdate(ImageReader source, BufferedImage image, int minX, int minY, int width, int height, int periodX, int periodY, int[] bands)61 void imageUpdate(ImageReader source, BufferedImage image, int minX, 62 int minY, int width, int height, int periodX, int periodY, 63 int[] bands); 64 65 /** 66 * Reports that the current read operation has completed a progressive pass. 67 * 68 * @param source the <code>ImageReader</code> object calling this method 69 * @param image the BufferedImage being updated 70 */ passComplete(ImageReader source, BufferedImage image)71 void passComplete(ImageReader source, BufferedImage image); 72 73 /** 74 * Reports that the current read operation is about to begin a progressive pass. 75 * 76 * @param source the <code>ImageReader</code> object calling this method 77 * @param image the BufferedImage being updated 78 * @param pass the numer of the pass that is about to begin, starting with 0 79 * @param minPass the index of the first pass that will be decoded 80 * @param maxPass the index of the last pass that will be decoded 81 * @param minX the X coordinate of the leftmost updated column of pixels 82 * @param minY the Y coordinate of the uppermost updated row of pixels 83 * @param periodX the horizontal spacing between updated pixels; a value of 1 means no gaps 84 * @param periodY the vertical spacing between updated pixels; a value of 1 means no gaps 85 * @param bands an array of <code>int</code>s indicating which bands are being updated 86 */ passStarted(ImageReader source, BufferedImage image, int pass, int minPass, int maxPass, int minX, int minY, int periodX, int periodY, int[] bands)87 void passStarted(ImageReader source, BufferedImage image, int pass, 88 int minPass, int maxPass, int minX, int minY, int periodX, 89 int periodY, int[] bands); 90 91 /** 92 * Reports that the current thumbnail read operation has completed a progressive pass. 93 * 94 * @param source the <code>ImageReader</code> object calling this method 95 * @param image the BufferedImage being updated 96 */ thumbnailPassComplete(ImageReader source, BufferedImage image)97 void thumbnailPassComplete(ImageReader source, BufferedImage image); 98 99 /** 100 * Reports that the current thumbnail read operation is about to begin a progressive pass. 101 * 102 * @param source the <code>ImageReader</code> object calling this method 103 * @param image the BufferedImage being updated 104 * @param pass the numer of the pass that is about to begin, starting with 0 105 * @param minPass the index of the first pass that will be decoded 106 * @param maxPass the index of the last pass that will be decoded 107 * @param minX the X coordinate of the leftmost updated column of pixels 108 * @param minY the Y coordinate of the uppermost updated row of pixels 109 * @param periodX the horizontal spacing between updated pixels; a value of 1 means no gaps 110 * @param periodY the vertical spacing between updated pixels; a value of 1 means no gaps 111 * @param bands an array of <code>int</code>s indicating which bands are being updated 112 */ thumbnailPassStarted(ImageReader source, BufferedImage image, int pass, int minPass, int maxPass, int minX, int minY, int periodX, int periodY, int[] bands)113 void thumbnailPassStarted(ImageReader source, BufferedImage image, int pass, 114 int minPass, int maxPass, int minX, int minY, 115 int periodX, int periodY, int[] bands); 116 117 /** 118 * Reports that a given region of a thumbnail image has been updated. 119 * 120 * @param source the <code>ImageReader</code> object calling this method 121 * @param image the BufferedImage being updated 122 * @param minX the X coordinate of the leftmost updated column of pixels 123 * @param minY the Y coordinate of the uppermost updated row of pixels 124 * @param width the number of updated pixels horizontally 125 * @param height the number of updated pixels vertically 126 * @param periodX the horizontal spacing between updated pixels; a value of 1 means no gaps 127 * @param periodY the vertical spacing between updated pixels; a value of 1 means no gaps 128 * @param bands an array of <code>int</code>s indicating which bands are being updated 129 */ thumbnailUpdate(ImageReader source, BufferedImage image, int minX, int minY, int width, int height, int periodX, int periodY, int[] bands)130 void thumbnailUpdate(ImageReader source, BufferedImage image, int minX, 131 int minY, int width, int height, int periodX, 132 int periodY, int[] bands); 133 } 134