home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1999 April / DPPCPRO0499.ISO / April / Notes / 50b2wic.exe / DATA1.CAB / NotesProgramFilesJavaSupport / rt.jar / java / applet / Applet.class (.txt) next >
Encoding:
Java Class File  |  1998-04-23  |  2.6 KB  |  122 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.  
  11. public class Applet extends Panel {
  12.    private transient AppletStub stub;
  13.  
  14.    public final void setStub(AppletStub var1) {
  15.       this.stub = var1;
  16.    }
  17.  
  18.    public boolean isActive() {
  19.       return this.stub != null ? this.stub.isActive() : false;
  20.    }
  21.  
  22.    public URL getDocumentBase() {
  23.       return this.stub.getDocumentBase();
  24.    }
  25.  
  26.    public URL getCodeBase() {
  27.       return this.stub.getCodeBase();
  28.    }
  29.  
  30.    public String getParameter(String var1) {
  31.       return this.stub.getParameter(var1);
  32.    }
  33.  
  34.    public AppletContext getAppletContext() {
  35.       return this.stub.getAppletContext();
  36.    }
  37.  
  38.    public void resize(int var1, int var2) {
  39.       Dimension var3 = ((Component)this).size();
  40.       if (var3.width != var1 || var3.height != var2) {
  41.          super.resize(var1, var2);
  42.          if (this.stub != null) {
  43.             this.stub.appletResize(var1, var2);
  44.          }
  45.       }
  46.  
  47.    }
  48.  
  49.    public void resize(Dimension var1) {
  50.       this.resize(var1.width, var1.height);
  51.    }
  52.  
  53.    public void showStatus(String var1) {
  54.       this.getAppletContext().showStatus(var1);
  55.    }
  56.  
  57.    public Image getImage(URL var1) {
  58.       return this.getAppletContext().getImage(var1);
  59.    }
  60.  
  61.    public Image getImage(URL var1, String var2) {
  62.       try {
  63.          return this.getImage(new URL(var1, var2));
  64.       } catch (MalformedURLException var3) {
  65.          return null;
  66.       }
  67.    }
  68.  
  69.    public AudioClip getAudioClip(URL var1) {
  70.       return this.getAppletContext().getAudioClip(var1);
  71.    }
  72.  
  73.    public AudioClip getAudioClip(URL var1, String var2) {
  74.       try {
  75.          return this.getAudioClip(new URL(var1, var2));
  76.       } catch (MalformedURLException var3) {
  77.          return null;
  78.       }
  79.    }
  80.  
  81.    public String getAppletInfo() {
  82.       return null;
  83.    }
  84.  
  85.    public Locale getLocale() {
  86.       Locale var1 = super.getLocale();
  87.       return var1 == null ? Locale.getDefault() : var1;
  88.    }
  89.  
  90.    public String[][] getParameterInfo() {
  91.       return null;
  92.    }
  93.  
  94.    public void play(URL var1) {
  95.       AudioClip var2 = this.getAudioClip(var1);
  96.       if (var2 != null) {
  97.          var2.play();
  98.       }
  99.  
  100.    }
  101.  
  102.    public void play(URL var1, String var2) {
  103.       AudioClip var3 = this.getAudioClip(var1, var2);
  104.       if (var3 != null) {
  105.          var3.play();
  106.       }
  107.  
  108.    }
  109.  
  110.    public void init() {
  111.    }
  112.  
  113.    public void start() {
  114.    }
  115.  
  116.    public void stop() {
  117.    }
  118.  
  119.    public void destroy() {
  120.    }
  121. }
  122.