home *** CD-ROM | disk | FTP | other *** search
- package netscape.applet;
-
- import java.applet.Applet;
-
- class DerivedAppletFrame$LoadAppletEvent extends DerivedAppletFrame.AppletEvent {
- // $FF: synthetic field
- private final DerivedAppletFrame this$DerivedAppletFrame;
- DerivedAppletFrame m_appletFrame;
-
- DerivedAppletFrame$LoadAppletEvent(DerivedAppletFrame var1, DerivedAppletFrame var2) {
- super(var1);
- this.this$DerivedAppletFrame = var1;
- this.this$DerivedAppletFrame = var1;
- this.m_appletFrame = var2;
- }
-
- public void dispatch() {
- String var1 = null;
- if (this.this$DerivedAppletFrame.getParameter("mayscript") != null) {
- var1 = this.this$DerivedAppletFrame.documentURL.toString();
- }
-
- this.this$DerivedAppletFrame.classLoader = AppletClassLoader.getClassLoader(this.this$DerivedAppletFrame.context, this.this$DerivedAppletFrame.codebaseURL, this.this$DerivedAppletFrame.archiveURL, var1, this.this$DerivedAppletFrame.reloadClasses);
- Object var2 = this.this$DerivedAppletFrame.m_statusLock;
- synchronized(var2){}
-
- try {
- if (this.this$DerivedAppletFrame.status != 1) {
- this.this$DerivedAppletFrame.wrongState("can't load", this.this$DerivedAppletFrame.statusToString(this.this$DerivedAppletFrame.status));
- this.this$DerivedAppletFrame.handler.stopDispatching();
- return;
- }
- } catch (Throwable var31) {
- throw var31;
- }
-
- String var32 = this.this$DerivedAppletFrame.getParameter("code");
- if (var32.endsWith(".class")) {
- var32 = var32.substring(0, var32.length() - 6);
- }
-
- if (var32.endsWith(".java")) {
- var32 = var32.substring(0, var32.length() - 5);
- }
-
- var32 = var32.replace('/', '.');
-
- try {
- Class var3 = Class.forName("java.applet.Applet");
- Class var4 = this.this$DerivedAppletFrame.classLoader.loadClass(var32);
- if (var4 == null) {
- throw new ClassNotFoundException(var4.toString() + " could not be loaded");
- }
-
- if (!var3.isAssignableFrom(var4)) {
- throw new ClassCastException(var32 + " is not an applet");
- }
-
- this.this$DerivedAppletFrame.applet = (Applet)var4.newInstance();
- } catch (VerifyError var24) {
- this.this$DerivedAppletFrame.showAppletException(var24, "class " + ((Throwable)var24).getMessage() + " got a security violation: method verification error");
- this.this$DerivedAppletFrame.status = 0;
- this.this$DerivedAppletFrame.handler.stopDispatching();
- return;
- } catch (SecurityException var25) {
- this.this$DerivedAppletFrame.showAppletException(var25, "class " + var32 + " got a security violation: " + ((Throwable)var25).getMessage());
- this.this$DerivedAppletFrame.status = 0;
- this.this$DerivedAppletFrame.handler.stopDispatching();
- return;
- } catch (ClassNotFoundException var26) {
- this.this$DerivedAppletFrame.showAppletException(var26, "class " + var32 + " could not be loaded");
- this.this$DerivedAppletFrame.status = 0;
- this.this$DerivedAppletFrame.handler.stopDispatching();
- return;
- } catch (InstantiationException var27) {
- this.this$DerivedAppletFrame.showAppletException(var27, "class " + var32 + " can't be instantiated");
- this.this$DerivedAppletFrame.status = 0;
- this.this$DerivedAppletFrame.handler.stopDispatching();
- return;
- } catch (IllegalAccessException var28) {
- System.err.println("# class " + var32 + " is not public or has no public constructor");
- this.this$DerivedAppletFrame.status = 0;
- this.this$DerivedAppletFrame.handler.stopDispatching();
- return;
- } catch (Exception var29) {
- this.this$DerivedAppletFrame.showAppletException(var29, "exception: " + ((Throwable)var29).toString());
- this.this$DerivedAppletFrame.status = 0;
- this.this$DerivedAppletFrame.handler.stopDispatching();
- return;
- } catch (Error var30) {
- this.this$DerivedAppletFrame.showAppletException(var30, "error: " + ((Throwable)var30).toString());
- this.this$DerivedAppletFrame.status = 0;
- this.this$DerivedAppletFrame.handler.stopDispatching();
- return;
- }
-
- this.this$DerivedAppletFrame.applet.setStub(this.m_appletFrame);
- this.this$DerivedAppletFrame.applet.hide();
- this.this$DerivedAppletFrame.add("Center", this.this$DerivedAppletFrame.applet);
- this.this$DerivedAppletFrame.validate();
- Object var34 = this.this$DerivedAppletFrame.m_statusLock;
- synchronized(var34){}
-
- try {
- this.this$DerivedAppletFrame.status = 2;
- this.this$DerivedAppletFrame.rightState("loaded");
- this.this$DerivedAppletFrame.m_statusLock.notifyAll();
- } catch (Throwable var23) {
- throw var23;
- }
-
- }
- }
-