home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1998 January / PCO0198.ISO / browser / net_linx / java40.jar / sun / awt / motif / MDrawingSurfaceInfo.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-11-03  |  1.4 KB  |  66 lines

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