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 Igor V. Stolyarov 19 * @version $Revision$ 20 */ 21 22package java.awt.image; 23 24import java.awt.Image; 25 26/** 27 * the ImageObserver interface is an asynchronous update interface for receiving 28 * notifications about Image construction status. 29 * 30 * @since Android 1.0 31 */ 32public interface ImageObserver { 33 34 /** 35 * The Constant WIDTH indicates that the width of the image is available. 36 */ 37 public static final int WIDTH = 1; 38 39 /** 40 * The Constant HEIGHT indicates that the width of the image is available. 41 */ 42 public static final int HEIGHT = 2; 43 44 /** 45 * The Constant PROPERTIES indicates that the properties of the image are 46 * available. 47 */ 48 public static final int PROPERTIES = 4; 49 50 /** 51 * The Constant SOMEBITS indicates that more bits needed for drawing a 52 * scaled variation of the image pixels are available. 53 */ 54 public static final int SOMEBITS = 8; 55 56 /** 57 * The Constant FRAMEBITS indicates that complete frame of a image which was 58 * previously drawn is now available for drawing again. 59 */ 60 public static final int FRAMEBITS = 16; 61 62 /** 63 * The Constant ALLBITS indicates that an image which was previously drawn 64 * is now complete and can be drawn again. 65 */ 66 public static final int ALLBITS = 32; 67 68 /** 69 * The Constant ERROR indicates that error occurred. 70 */ 71 public static final int ERROR = 64; 72 73 /** 74 * The Constant ABORT indicates that the image producing is aborted. 75 */ 76 public static final int ABORT = 128; 77 78 /** 79 * This method is called when information about an Image interface becomes 80 * available. This method returns true if further updates are needed, false 81 * if not. 82 * 83 * @param img 84 * the image to be observed. 85 * @param infoflags 86 * the bitwise OR combination of information flags: ABORT, 87 * ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, 88 * WIDTH. 89 * @param x 90 * the X coordinate. 91 * @param y 92 * the Y coordinate. 93 * @param width 94 * the width. 95 * @param height 96 * the height. 97 * @return true if further updates are needed, false if not. 98 */ 99 public boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height); 100 101} 102