home *** CD-ROM | disk | FTP | other *** search
/ S283 Planetary Science &n…he Search for Life DVD 2 / DVD-ROM.iso / install / jre1_3 / lib / rt.jar / java / applet / Applet.class (.txt) next >
Encoding:
Java Class File  |  1979-12-31  |  2.7 KB  |  138 lines

  1. package java.applet;
  2.  
  3. import java.awt.Component;
  4. import java.awt.Dimension;
  5. import java.awt.Image;
  6. import java.awt.Panel;
  7. import java.net.MalformedURLException;
  8. import java.net.URL;
  9. import java.util.Locale;
  10. import javax.accessibility.AccessibleContext;
  11. import sun.applet.AppletAudioClip;
  12.  
  13. public class Applet extends Panel {
  14.    private transient AppletStub stub;
  15.    private static final long serialVersionUID = -5836846270535785031L;
  16.    AccessibleContext accessibleContext = null;
  17.  
  18.    public final void setStub(AppletStub var1) {
  19.       this.stub = var1;
  20.    }
  21.  
  22.    public boolean isActive() {
  23.       return this.stub != null ? this.stub.isActive() : false;
  24.    }
  25.  
  26.    public URL getDocumentBase() {
  27.       return this.stub.getDocumentBase();
  28.    }
  29.  
  30.    public URL getCodeBase() {
  31.       return this.stub.getCodeBase();
  32.    }
  33.  
  34.    public String getParameter(String var1) {
  35.       return this.stub.getParameter(var1);
  36.    }
  37.  
  38.    public AppletContext getAppletContext() {
  39.       return this.stub.getAppletContext();
  40.    }
  41.  
  42.    public void resize(int var1, int var2) {
  43.       Dimension var3 = ((Component)this).size();
  44.       if (var3.width != var1 || var3.height != var2) {
  45.          super.resize(var1, var2);
  46.          if (this.stub != null) {
  47.             this.stub.appletResize(var1, var2);
  48.          }
  49.       }
  50.  
  51.    }
  52.  
  53.    public void resize(Dimension var1) {
  54.       this.resize(var1.width, var1.height);
  55.    }
  56.  
  57.    public void showStatus(String var1) {
  58.       this.getAppletContext().showStatus(var1);
  59.    }
  60.  
  61.    public Image getImage(URL var1) {
  62.       return this.getAppletContext().getImage(var1);
  63.    }
  64.  
  65.    public Image getImage(URL var1, String var2) {
  66.       try {
  67.          return this.getImage(new URL(var1, var2));
  68.       } catch (MalformedURLException var4) {
  69.          return null;
  70.       }
  71.    }
  72.  
  73.    public static final AudioClip newAudioClip(URL var0) {
  74.       return new AppletAudioClip(var0);
  75.    }
  76.  
  77.    public AudioClip getAudioClip(URL var1) {
  78.       return this.getAppletContext().getAudioClip(var1);
  79.    }
  80.  
  81.    public AudioClip getAudioClip(URL var1, String var2) {
  82.       try {
  83.          return this.getAudioClip(new URL(var1, var2));
  84.       } catch (MalformedURLException var4) {
  85.          return null;
  86.       }
  87.    }
  88.  
  89.    public String getAppletInfo() {
  90.       return null;
  91.    }
  92.  
  93.    public Locale getLocale() {
  94.       Locale var1 = super.getLocale();
  95.       return var1 == null ? Locale.getDefault() : var1;
  96.    }
  97.  
  98.    public String[][] getParameterInfo() {
  99.       return null;
  100.    }
  101.  
  102.    public void play(URL var1) {
  103.       AudioClip var2 = this.getAudioClip(var1);
  104.       if (var2 != null) {
  105.          var2.play();
  106.       }
  107.  
  108.    }
  109.  
  110.    public void play(URL var1, String var2) {
  111.       AudioClip var3 = this.getAudioClip(var1, var2);
  112.       if (var3 != null) {
  113.          var3.play();
  114.       }
  115.  
  116.    }
  117.  
  118.    public void init() {
  119.    }
  120.  
  121.    public void start() {
  122.    }
  123.  
  124.    public void stop() {
  125.    }
  126.  
  127.    public void destroy() {
  128.    }
  129.  
  130.    public AccessibleContext getAccessibleContext() {
  131.       if (this.accessibleContext == null) {
  132.          this.accessibleContext = new AccessibleApplet(this);
  133.       }
  134.  
  135.       return this.accessibleContext;
  136.    }
  137. }
  138.