home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1998 September / dppcpro0998.iso / Rwc / Sybase / Install.exe / java.z / LocalAppletStub.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-03-23  |  1.5 KB  |  70 lines

  1. package powersoft.beanbox;
  2.  
  3. import java.applet.Applet;
  4. import java.applet.AppletContext;
  5. import java.applet.AppletStub;
  6. import java.net.URL;
  7.  
  8. public class LocalAppletStub implements AppletStub {
  9.    transient boolean active;
  10.    transient Applet target;
  11.    transient AppletContext context;
  12.    transient URL codeBase;
  13.    transient URL docBase;
  14.  
  15.    public LocalAppletStub(Applet var1, AppletContext var2, URL var3, URL var4) {
  16.       this.target = var1;
  17.       this.context = var2;
  18.       this.docBase = var4;
  19.       this.codeBase = var3;
  20.       if (var1 != null) {
  21.          Class var5 = var1.getClass();
  22.          if (var5 != null) {
  23.             String var6 = var5.getName();
  24.             if (var6 != null) {
  25.                var6 = var6.replace('.', '/').concat(".class");
  26.                URL var7 = ClassLoader.getSystemResource(var6);
  27.                if (var7 != null) {
  28.                   String var8 = var7.toExternalForm();
  29.                   if (var8 != null) {
  30.                      if (var8.endsWith(var6)) {
  31.                         int var9 = var8.length() - var6.length();
  32.  
  33.                         try {
  34.                            this.codeBase = new URL(var8.substring(0, var9));
  35.                         } catch (Exception var10) {
  36.                            this.codeBase = var3;
  37.                         }
  38.                      }
  39.  
  40.                   }
  41.                }
  42.             }
  43.          }
  44.       }
  45.    }
  46.  
  47.    public boolean isActive() {
  48.       return this.active;
  49.    }
  50.  
  51.    public URL getDocumentBase() {
  52.       return this.docBase;
  53.    }
  54.  
  55.    public URL getCodeBase() {
  56.       return this.codeBase;
  57.    }
  58.  
  59.    public String getParameter(String var1) {
  60.       return null;
  61.    }
  62.  
  63.    public AppletContext getAppletContext() {
  64.       return this.context;
  65.    }
  66.  
  67.    public void appletResize(int var1, int var2) {
  68.    }
  69. }
  70.