home *** CD-ROM | disk | FTP | other *** search
- package sun.awt.motif;
-
- import java.awt.Rectangle;
- import java.awt.Shape;
- import java.awt.image.ColorModel;
- import sun.awt.DrawingSurfaceInfo;
- import sun.awt.PhysicalDrawingSurface;
- import sun.awt.X11DrawingSurface;
- import sun.awt.image.ImageRepresentation;
-
- public class MDrawingSurfaceInfo implements DrawingSurfaceInfo, X11DrawingSurface {
- int state;
- // $FF: renamed from: w int
- int field_0;
- // $FF: renamed from: h int
- int field_1;
- MComponentPeer peer;
- ImageRepresentation imgrep;
-
- MDrawingSurfaceInfo(MComponentPeer var1) {
- this.peer = var1;
- }
-
- MDrawingSurfaceInfo(ImageRepresentation var1) {
- this.imgrep = var1;
- }
-
- public native int lock();
-
- public native void unlock();
-
- public Rectangle getBounds() {
- Rectangle var1;
- if (this.peer != null) {
- var1 = this.peer.target.bounds();
- var1.setLocation(0, 0);
- } else {
- var1 = new Rectangle(0, 0, this.imgrep.width, this.imgrep.height);
- }
-
- return var1;
- }
-
- public PhysicalDrawingSurface getSurface() {
- return this;
- }
-
- public Shape getClip() {
- return this.getBounds();
- }
-
- public native int getDisplay();
-
- public native int getDrawable();
-
- public native int getDepth();
-
- public native int getVisualID();
-
- public native int getColormapID();
-
- public ColorModel getColorModel() {
- return MToolkit.getStaticColorModel();
- }
- }
-