home *** CD-ROM | disk | FTP | other *** search
/ S283 Planetary Science &… the Search for Life CD 3 / 0_CD-ROM.iso / install / jre1_3 / lib / rt.jar / sun / awt / windows / WObjectPeer.class (.txt) < prev    next >
Encoding:
Java Class File  |  1979-12-31  |  796 b   |  47 lines

  1. package sun.awt.windows;
  2.  
  3. abstract class WObjectPeer {
  4.    int pData;
  5.    Object target;
  6.    private boolean disposed = false;
  7.  
  8.    public WObjectPeer getPeerForTarget(Object var1) {
  9.       WObjectPeer var2 = (WObjectPeer)WToolkit.targetToPeer(var1);
  10.       return var2;
  11.    }
  12.  
  13.    protected abstract void disposeImpl();
  14.  
  15.    public final void dispose() {
  16.       boolean var1 = false;
  17.       if (!this.disposed) {
  18.          synchronized(this) {
  19.             if (!this.disposed) {
  20.                var1 = true;
  21.                this.disposed = true;
  22.             }
  23.          }
  24.       }
  25.  
  26.       if (var1) {
  27.          this.disposeImpl();
  28.       }
  29.  
  30.    }
  31.  
  32.    protected final boolean isDisposed() {
  33.       return this.disposed;
  34.    }
  35.  
  36.    protected void finalize() throws Throwable {
  37.       this.dispose();
  38.       super.finalize();
  39.    }
  40.  
  41.    private static native void initIDs();
  42.  
  43.    static {
  44.       initIDs();
  45.    }
  46. }
  47.