1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one or more 3 * contributor license agreements. See the NOTICE file distributed with 4 * this work for additional information regarding copyright ownership. 5 * The ASF licenses this file to You under the Apache License, Version 2.0 6 * (the "License"); you may not use this file except in compliance with 7 * the License. You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 /** 18 * @author Sergey I. Salishev 19 * @version $Revision: 1.2 $ 20 */ 21 22 package javax.imageio.event; 23 24 import java.awt.image.BufferedImage; 25 import java.util.EventListener; 26 import javax.imageio.ImageReader; 27 28 /* 29 * @author Sergey I. Salishev 30 * @version $Revision: 1.2 $ 31 */ 32 33 /** 34 * The IIOReadUpdateListener interface provides functionality to receive 35 * notification of pixel updates during image and thumbnail reading operations. 36 * 37 * @since Android 1.0 38 */ 39 public interface IIOReadUpdateListener extends EventListener { 40 41 /** 42 * Notifies this listener that the specified area of the image has been 43 * updated. 44 * 45 * @param source 46 * the ImageReader object which calls this method. 47 * @param theImage 48 * the image to be updated. 49 * @param minX 50 * the minimum X coordinate of the pixels in the updated area. 51 * @param minY 52 * the minimum Y coordinate of the pixels in the updated area. 53 * @param width 54 * the width of updated area. 55 * @param height 56 * the height of updated area. 57 * @param periodX 58 * the horizontal spacing period between updated pixels, if it 59 * equals 1, there is no space between pixels. 60 * @param periodY 61 * the vertical spacing period between updated pixels, if it 62 * equals 1, there is no space between pixels. 63 * @param bands 64 * the array of integer values indicating the bands being 65 * updated. 66 */ 67 void imageUpdate(ImageReader source, BufferedImage theImage, int minX, int minY, int width, 68 int height, int periodX, int periodY, int[] bands); 69 70 /** 71 * Notifies this listener that the current read operation has completed a 72 * progressive pass. 73 * 74 * @param source 75 * the ImageReader object which calls this method. 76 * @param theImage 77 * the image to be updated. 78 */ 79 void passComplete(ImageReader source, BufferedImage theImage); 80 81 /** 82 * Notifies this listener that the current read operation has begun a 83 * progressive pass. 84 * 85 * @param source 86 * the ImageReader object which calls this method. 87 * @param theImage 88 * the image to be updated. 89 * @param pass 90 * the number of the pass. 91 * @param minPass 92 * the index of the first pass that will be decoded. 93 * @param maxPass 94 * the index of the last pass that will be decoded. 95 * @param minX 96 * the minimum X coordinate of the pixels in the updated area. 97 * @param minY 98 * the minimum Y coordinate of the pixels in the updated area. 99 * @param periodX 100 * the horizontal spacing period between updated pixels, if it 101 * equals 1, there is no space between pixels. 102 * @param periodY 103 * the vertical spacing period between updated pixels, if it 104 * equals 1, there is no space between pixels. 105 * @param bands 106 * the array of integer values indicating the bands being 107 * updated. 108 */ 109 void passStarted(ImageReader source, BufferedImage theImage, int pass, int minPass, 110 int maxPass, int minX, int minY, int periodX, int periodY, int[] bands); 111 112 /** 113 * Notifies this listener that the current thumbnail read operation has 114 * completed a progressive pass. 115 * 116 * @param source 117 * the ImageReader object which calls this method. 118 * @param theImage 119 * the thumbnail to be updated. 120 */ 121 void thumbnailPassComplete(ImageReader source, BufferedImage theImage); 122 123 /** 124 * Notifies this listener that the current thumbnail read operation has 125 * begun a progressive pass. 126 * 127 * @param source 128 * the ImageReader object which calls this method. 129 * @param theThumbnail 130 * the thumbnail to be updated. 131 * @param pass 132 * the number of the pass. 133 * @param minPass 134 * the index of the first pass that will be decoded. 135 * @param maxPass 136 * the index of the last pass that will be decoded. 137 * @param minX 138 * the minimum X coordinate of the pixels in the updated area. 139 * @param minY 140 * the minimum Y coordinate of the pixels in the updated area. 141 * @param periodX 142 * the horizontal spacing period between updated pixels, if it 143 * equals 1, there is no space between pixels. 144 * @param periodY 145 * the vertical spacing period between updated pixels, if it 146 * equals 1, there is no space between pixels. 147 * @param bands 148 * the array of integer values indicating the bands being 149 * updated. 150 */ 151 void thumbnailPassStarted(ImageReader source, BufferedImage theThumbnail, int pass, 152 int minPass, int maxPass, int minX, int minY, int periodX, int periodY, int[] bands); 153 154 /** 155 * Notifies this listener that a specified area of a thumbnail image has 156 * been updated. 157 * 158 * @param source 159 * the ImageReader object which calls this method. 160 * @param theThumbnail 161 * the thumbnail to be updated. 162 * @param minX 163 * the minimum X coordinate of the pixels in the updated area. 164 * @param minY 165 * the minimum Y coordinate of the pixels in the updated area. 166 * @param width 167 * the width of updated area. 168 * @param height 169 * the height of updated area. 170 * @param periodX 171 * the horizontal spacing period between updated pixels, if it 172 * equals 1, there is no space between pixels. 173 * @param periodY 174 * the vertical spacing period between updated pixels, if it 175 * equals 1, there is no space between pixels. 176 * @param bands 177 * the array of integer values indicating the bands being 178 * updated. 179 */ 180 void thumbnailUpdate(ImageReader source, BufferedImage theThumbnail, int minX, int minY, 181 int width, int height, int periodX, int periodY, int[] bands); 182 } 183