home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2000 March / pcp161a.iso / handson / files / copyjava.exe / com / sun / java / swing / text / html / HTMLRootView$HTMLRootImageObserver.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-02-26  |  1.2 KB  |  41 lines

  1. package com.sun.java.swing.text.html;
  2.  
  3. import java.awt.Image;
  4. import java.awt.image.ImageObserver;
  5.  
  6. class HTMLRootView$HTMLRootImageObserver implements ImageObserver {
  7.    // $FF: synthetic field
  8.    private final HTMLRootView this$0;
  9.  
  10.    public HTMLRootView$HTMLRootImageObserver(HTMLRootView var1) {
  11.       this.this$0 = var1;
  12.       this.this$0 = var1;
  13.    }
  14.  
  15.    public boolean imageUpdate(Image var1, int var2, int var3, int var4, int var5, int var6) {
  16.       if ((var2 & 64) > 0 || (var2 & 128) > 0) {
  17.          this.this$0.bImageLoadFailed = true;
  18.       }
  19.  
  20.       if ((var2 & 1) > 0) {
  21.          this.this$0.imgWidth = var5;
  22.       }
  23.  
  24.       if ((var2 & 2) > 0) {
  25.          this.this$0.imgHeight = var6;
  26.       }
  27.  
  28.       if ((var2 & 8) > 0 || (var2 & 32) > 0) {
  29.          this.this$0.drawWidth = var5 > this.this$0.drawWidth ? var5 : this.this$0.drawWidth;
  30.          this.this$0.drawHeight = var6 > this.this$0.drawHeight ? var6 : this.this$0.drawHeight;
  31.       }
  32.  
  33.       if (this.this$0.imgWidth > 0 && this.this$0.imgHeight > 0 && this.this$0.imgWidth == this.this$0.drawWidth && this.this$0.imgHeight == this.this$0.drawHeight) {
  34.          this.this$0.bImageLoaded = true;
  35.          this.this$0.getContainer().repaint();
  36.       }
  37.  
  38.       return !this.this$0.bImageLoaded;
  39.    }
  40. }
  41.