home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1999 April / DPPCPRO0499.ISO / April / Notes / 50b2wic.exe / DATA1.CAB / NotesProgramFilesJavaSupport / rt.jar / sun / awt / windows / WDrawingSurfaceInfo.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-04-23  |  1.5 KB  |  70 lines

  1. package sun.awt.windows;
  2.  
  3. import java.awt.Component;
  4. import java.awt.Rectangle;
  5. import java.awt.Shape;
  6. import java.awt.image.ColorModel;
  7. import sun.awt.DrawingSurfaceInfo;
  8. import sun.awt.PhysicalDrawingSurface;
  9. import sun.awt.Win32DrawingSurface;
  10. import sun.awt.image.ImageRepresentation;
  11.  
  12. public class WDrawingSurfaceInfo implements DrawingSurfaceInfo, Win32DrawingSurface {
  13.    private int pData;
  14.    int state;
  15.    // $FF: renamed from: w int
  16.    int field_0;
  17.    // $FF: renamed from: h int
  18.    int field_1;
  19.    WComponentPeer peer;
  20.    ImageRepresentation imgrep;
  21.  
  22.    WDrawingSurfaceInfo(WComponentPeer var1) {
  23.       this.peer = var1;
  24.    }
  25.  
  26.    WDrawingSurfaceInfo(ImageRepresentation var1) {
  27.       this.imgrep = var1;
  28.    }
  29.  
  30.    public native int lock();
  31.  
  32.    public native void unlock();
  33.  
  34.    public Rectangle getBounds() {
  35.       Rectangle var1;
  36.       if (this.peer != null) {
  37.          var1 = ((Component)this.peer.target).getBounds();
  38.          var1.setLocation(0, 0);
  39.       } else {
  40.          var1 = new Rectangle(0, 0, this.imgrep.width, this.imgrep.height);
  41.       }
  42.  
  43.       return var1;
  44.    }
  45.  
  46.    public PhysicalDrawingSurface getSurface() {
  47.       return this;
  48.    }
  49.  
  50.    public Shape getClip() {
  51.       return this.getBounds();
  52.    }
  53.  
  54.    public native int getHWnd();
  55.  
  56.    public native int getHBitmap();
  57.  
  58.    public native int getPBits();
  59.  
  60.    public native int getHDC();
  61.  
  62.    public native int getDepth();
  63.  
  64.    public native int getHPalette();
  65.  
  66.    public ColorModel getColorModel() {
  67.       return WToolkit.getStaticColorModel();
  68.    }
  69. }
  70.