< prev index next >

src/java.desktop/share/classes/java/awt/image/ImageObserver.java

Print this page




  38     /**
  39      * This method is called when information about an image which was
  40      * previously requested using an asynchronous interface becomes
  41      * available.  Asynchronous interfaces are method calls such as
  42      * getWidth(ImageObserver) and drawImage(img, x, y, ImageObserver)
  43      * which take an ImageObserver object as an argument.  Those methods
  44      * register the caller as interested either in information about
  45      * the overall image itself (in the case of getWidth(ImageObserver))
  46      * or about an output version of an image (in the case of the
  47      * drawImage(img, x, y, [w, h,] ImageObserver) call).
  48      *
  49      * <p>This method
  50      * should return true if further updates are needed or false if the
  51      * required information has been acquired.  The image which was being
  52      * tracked is passed in using the img argument.  Various constants
  53      * are combined to form the infoflags argument which indicates what
  54      * information about the image is now available.  The interpretation
  55      * of the x, y, width, and height arguments depends on the contents
  56      * of the infoflags argument.
  57      * <p>
  58      * The <code>infoflags</code> argument should be the bitwise inclusive
  59      * <b>OR</b> of the following flags: <code>WIDTH</code>,
  60      * <code>HEIGHT</code>, <code>PROPERTIES</code>, <code>SOMEBITS</code>,
  61      * <code>FRAMEBITS</code>, <code>ALLBITS</code>, <code>ERROR</code>,
  62      * <code>ABORT</code>.
  63      *
  64      * @param     img   the image being observed.
  65      * @param     infoflags   the bitwise inclusive OR of the following
  66      *               flags:  <code>WIDTH</code>, <code>HEIGHT</code>,
  67      *               <code>PROPERTIES</code>, <code>SOMEBITS</code>,
  68      *               <code>FRAMEBITS</code>, <code>ALLBITS</code>,
  69      *               <code>ERROR</code>, <code>ABORT</code>.
  70      * @param     x   the <i>x</i> coordinate.
  71      * @param     y   the <i>y</i> coordinate.
  72      * @param     width    the width.
  73      * @param     height   the height.
  74      * @return    <code>false</code> if the infoflags indicate that the
  75      *            image is completely loaded; <code>true</code> otherwise.
  76      *
  77      * @see #WIDTH
  78      * @see #HEIGHT
  79      * @see #PROPERTIES
  80      * @see #SOMEBITS
  81      * @see #FRAMEBITS
  82      * @see #ALLBITS
  83      * @see #ERROR
  84      * @see #ABORT
  85      * @see Image#getWidth
  86      * @see Image#getHeight
  87      * @see java.awt.Graphics#drawImage
  88      */
  89     public boolean imageUpdate(Image img, int infoflags,
  90                                int x, int y, int width, int height);
  91 
  92     /**
  93      * This flag in the infoflags argument to imageUpdate indicates that
  94      * the width of the base image is now available and can be taken
  95      * from the width argument to the imageUpdate callback method.




  38     /**
  39      * This method is called when information about an image which was
  40      * previously requested using an asynchronous interface becomes
  41      * available.  Asynchronous interfaces are method calls such as
  42      * getWidth(ImageObserver) and drawImage(img, x, y, ImageObserver)
  43      * which take an ImageObserver object as an argument.  Those methods
  44      * register the caller as interested either in information about
  45      * the overall image itself (in the case of getWidth(ImageObserver))
  46      * or about an output version of an image (in the case of the
  47      * drawImage(img, x, y, [w, h,] ImageObserver) call).
  48      *
  49      * <p>This method
  50      * should return true if further updates are needed or false if the
  51      * required information has been acquired.  The image which was being
  52      * tracked is passed in using the img argument.  Various constants
  53      * are combined to form the infoflags argument which indicates what
  54      * information about the image is now available.  The interpretation
  55      * of the x, y, width, and height arguments depends on the contents
  56      * of the infoflags argument.
  57      * <p>
  58      * The {@code infoflags} argument should be the bitwise inclusive
  59      * <b>OR</b> of the following flags: {@code WIDTH},
  60      * {@code HEIGHT}, {@code PROPERTIES}, {@code SOMEBITS},
  61      * {@code FRAMEBITS}, {@code ALLBITS}, {@code ERROR},
  62      * {@code ABORT}.
  63      *
  64      * @param     img   the image being observed.
  65      * @param     infoflags   the bitwise inclusive OR of the following
  66      *               flags:  {@code WIDTH}, {@code HEIGHT},
  67      *               {@code PROPERTIES}, {@code SOMEBITS},
  68      *               {@code FRAMEBITS}, {@code ALLBITS},
  69      *               {@code ERROR}, {@code ABORT}.
  70      * @param     x   the <i>x</i> coordinate.
  71      * @param     y   the <i>y</i> coordinate.
  72      * @param     width    the width.
  73      * @param     height   the height.
  74      * @return    {@code false} if the infoflags indicate that the
  75      *            image is completely loaded; {@code true} otherwise.
  76      *
  77      * @see #WIDTH
  78      * @see #HEIGHT
  79      * @see #PROPERTIES
  80      * @see #SOMEBITS
  81      * @see #FRAMEBITS
  82      * @see #ALLBITS
  83      * @see #ERROR
  84      * @see #ABORT
  85      * @see Image#getWidth
  86      * @see Image#getHeight
  87      * @see java.awt.Graphics#drawImage
  88      */
  89     public boolean imageUpdate(Image img, int infoflags,
  90                                int x, int y, int width, int height);
  91 
  92     /**
  93      * This flag in the infoflags argument to imageUpdate indicates that
  94      * the width of the base image is now available and can be taken
  95      * from the width argument to the imageUpdate callback method.


< prev index next >