home *** CD-ROM | disk | FTP | other *** search
/ S283 Planetary Science &n…he Search for Life DVD 2 / DVD-ROM.iso / install / jre1_3 / lib / rt.jar / sun / java2d / PeekGraphics$ImageWaiter.class (.txt) < prev    next >
Encoding:
Java Class File  |  1979-12-31  |  931 b   |  48 lines

  1. package sun.java2d;
  2.  
  3. import java.awt.Image;
  4. import java.awt.image.ImageObserver;
  5.  
  6. public class PeekGraphics$ImageWaiter implements ImageObserver {
  7.    private int mWidth;
  8.    private int mHeight;
  9.    // $FF: synthetic field
  10.    private final PeekGraphics this$0;
  11.  
  12.    PeekGraphics$ImageWaiter(PeekGraphics var1, Image var2) {
  13.       this.this$0 = var1;
  14.       this.waitForDimensions(var2);
  15.    }
  16.  
  17.    public int getWidth() {
  18.       return this.mWidth;
  19.    }
  20.  
  21.    public int getHeight() {
  22.       return this.mHeight;
  23.    }
  24.  
  25.    private synchronized void waitForDimensions(Image var1) {
  26.       this.mHeight = var1.getHeight(this);
  27.  
  28.       for(this.mWidth = var1.getWidth(this); this.mWidth < 0 || this.mHeight < 0; this.mWidth = var1.getWidth(this)) {
  29.          try {
  30.             this.wait();
  31.          } catch (InterruptedException var3) {
  32.          }
  33.  
  34.          this.mHeight = var1.getHeight(this);
  35.       }
  36.  
  37.    }
  38.  
  39.    public synchronized boolean imageUpdate(Image var1, int var2, int var3, int var4, int var5, int var6) {
  40.       boolean var7 = (var2 & 194) != 0;
  41.       if (var7) {
  42.          this.notify();
  43.       }
  44.  
  45.       return var7;
  46.    }
  47. }
  48.