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 / WActiveEvent.class (.txt) < prev    next >
Encoding:
Java Class File  |  1979-12-31  |  1012 b   |  51 lines

  1. package sun.awt.windows;
  2.  
  3. import java.awt.AWTEvent;
  4. import java.awt.ActiveEvent;
  5.  
  6. class WActiveEvent extends AWTEvent implements ActiveEvent {
  7.    private WObjectPeer peer;
  8.    private long pData;
  9.  
  10.    public WActiveEvent(Object var1, WObjectPeer var2, long var3) {
  11.       super(var1, 0);
  12.       this.peer = var2;
  13.       this.pData = var3;
  14.       if (var2 instanceof WWindowPeer) {
  15.          ((WWindowPeer)var2).pendingFocusEvents.addElement(this);
  16.       }
  17.  
  18.    }
  19.  
  20.    private native void dispatchImpl(long var1);
  21.  
  22.    private native void finalizeImpl(long var1);
  23.  
  24.    public void dispatch() {
  25.       if (!this.peer.isDisposed()) {
  26.          WObjectPeer var1 = this.peer;
  27.          synchronized(var1) {
  28.             if (!this.peer.isDisposed()) {
  29.                if (this.peer instanceof WWindowPeer) {
  30.                   WWindowPeer var2 = (WWindowPeer)this.peer;
  31.                   if (var2.pendingFocusEvents.contains(this)) {
  32.                      var2.grantDefaultFocus = true;
  33.                      var2.pendingFocusEvents.removeElement(this);
  34.                   } else {
  35.                      var2.grantDefaultFocus = false;
  36.                   }
  37.                }
  38.  
  39.                this.dispatchImpl(this.pData);
  40.             }
  41.          }
  42.       }
  43.  
  44.    }
  45.  
  46.    protected void finalize() throws Throwable {
  47.       this.finalizeImpl(this.pData);
  48.       super.finalize();
  49.    }
  50. }
  51.