001 /* IIOReadUpdateListener.java -- 002 Copyright (C) 2004 Free Software Foundation, Inc. 003 004 This file is part of GNU Classpath. 005 006 GNU Classpath is free software; you can redistribute it and/or modify 007 it under the terms of the GNU General Public License as published by 008 the Free Software Foundation; either version 2, or (at your option) 009 any later version. 010 011 GNU Classpath is distributed in the hope that it will be useful, but 012 WITHOUT ANY WARRANTY; without even the implied warranty of 013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 014 General Public License for more details. 015 016 You should have received a copy of the GNU General Public License 017 along with GNU Classpath; see the file COPYING. If not, write to the 018 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 019 02110-1301 USA. 020 021 Linking this library statically or dynamically with other modules is 022 making a combined work based on this library. Thus, the terms and 023 conditions of the GNU General Public License cover the whole 024 combination. 025 026 As a special exception, the copyright holders of this library give you 027 permission to link this library with independent modules to produce an 028 executable, regardless of the license terms of these independent 029 modules, and to copy and distribute the resulting executable under 030 terms of your choice, provided that you also meet, for each linked 031 independent module, the terms and conditions of the license of that 032 module. An independent module is a module which is not derived from 033 or based on this library. If you modify this library, you may extend 034 this exception to your version of the library, but you are not 035 obligated to do so. If you do not wish to do so, delete this 036 exception statement from your version. */ 037 038 039 package javax.imageio.event; 040 041 import java.awt.image.BufferedImage; 042 import java.util.EventListener; 043 044 import javax.imageio.ImageReader; 045 046 public interface IIOReadUpdateListener extends EventListener 047 { 048 /** 049 * Reports that a given region of the image has been updated. 050 * 051 * @param source the <code>ImageReader</code> object calling this method 052 * @param image the BufferedImage being updated 053 * @param minX the X coordinate of the leftmost updated column of pixels 054 * @param minY the Y coordinate of the uppermost updated row of pixels 055 * @param width the number of updated pixels horizontally 056 * @param height the number of updated pixels vertically 057 * @param periodX the horizontal spacing between updated pixels; a value of 1 means no gaps 058 * @param periodY the vertical spacing between updated pixels; a value of 1 means no gaps 059 * @param bands an array of <code>int</code>s indicating which bands are being updated 060 */ 061 void imageUpdate(ImageReader source, BufferedImage image, int minX, 062 int minY, int width, int height, int periodX, int periodY, 063 int[] bands); 064 065 /** 066 * Reports that the current read operation has completed a progressive pass. 067 * 068 * @param source the <code>ImageReader</code> object calling this method 069 * @param image the BufferedImage being updated 070 */ 071 void passComplete(ImageReader source, BufferedImage image); 072 073 /** 074 * Reports that the current read operation is about to begin a progressive pass. 075 * 076 * @param source the <code>ImageReader</code> object calling this method 077 * @param image the BufferedImage being updated 078 * @param pass the numer of the pass that is about to begin, starting with 0 079 * @param minPass the index of the first pass that will be decoded 080 * @param maxPass the index of the last pass that will be decoded 081 * @param minX the X coordinate of the leftmost updated column of pixels 082 * @param minY the Y coordinate of the uppermost updated row of pixels 083 * @param periodX the horizontal spacing between updated pixels; a value of 1 means no gaps 084 * @param periodY the vertical spacing between updated pixels; a value of 1 means no gaps 085 * @param bands an array of <code>int</code>s indicating which bands are being updated 086 */ 087 void passStarted(ImageReader source, BufferedImage image, int pass, 088 int minPass, int maxPass, int minX, int minY, int periodX, 089 int periodY, int[] bands); 090 091 /** 092 * Reports that the current thumbnail read operation has completed a progressive pass. 093 * 094 * @param source the <code>ImageReader</code> object calling this method 095 * @param image the BufferedImage being updated 096 */ 097 void thumbnailPassComplete(ImageReader source, BufferedImage image); 098 099 /** 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 */ 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 */ 130 void thumbnailUpdate(ImageReader source, BufferedImage image, int minX, 131 int minY, int width, int height, int periodX, 132 int periodY, int[] bands); 133 }