1 Clazz.declarePackage ("java.applet");
\r
2 Clazz.load (["java.awt.Panel"], "java.applet.Applet", ["java.net.URL", "java.util.Locale"], function () {
\r
3 c$ = Clazz.decorateAsClass (function () {
\r
5 Clazz.instantialize (this, arguments);
\r
6 }, java.applet, "Applet", java.awt.Panel);
\r
7 Clazz.makeConstructor (c$,
\r
9 Clazz.superConstructor (this, java.applet.Applet, []);
\r
12 Clazz.defineMethod (c$, "setStub",
\r
15 }, "java.applet.AppletStub");
\r
16 Clazz.defineMethod (c$, "isActive",
\r
18 if (this.stub != null) {
\r
19 return this.stub.isActive ();
\r
23 Clazz.defineMethod (c$, "getDocumentBase",
\r
25 return this.stub.getDocumentBase ();
\r
27 Clazz.defineMethod (c$, "getCodeBase",
\r
29 return this.stub.getCodeBase ();
\r
31 Clazz.defineMethod (c$, "getParameter",
\r
33 return this.stub.getParameter (name);
\r
35 Clazz.defineMethod (c$, "getAppletContext",
\r
37 return this.stub.getAppletContext ();
\r
39 Clazz.defineMethod (c$, "resize",
\r
40 function (width, height) {
\r
41 var d = this.size ();
\r
42 if ((d.width != width) || (d.height != height)) {
\r
43 Clazz.superCall (this, java.applet.Applet, "resize", [width, height]);
\r
44 if (this.stub != null) {
\r
45 this.stub.appletResize (width, height);
\r
47 Clazz.defineMethod (c$, "resize",
\r
49 this.resize (d.width, d.height);
\r
50 }, "java.awt.Dimension");
\r
51 Clazz.defineMethod (c$, "showStatus",
\r
53 this.getAppletContext ().showStatus (msg);
\r
55 Clazz.defineMethod (c$, "getImage",
\r
57 return this.getAppletContext ().getImage (url);
\r
59 Clazz.defineMethod (c$, "getImage",
\r
60 function (url, name) {
\r
62 return this.getImage ( new java.net.URL (url, name));
\r
64 if (Clazz.exceptionOf (e, java.net.MalformedURLException)) {
\r
70 }, "java.net.URL,~S");
\r
71 Clazz.defineMethod (c$, "getAppletInfo",
\r
75 Clazz.defineMethod (c$, "getLocale",
\r
77 var locale = Clazz.superCall (this, java.applet.Applet, "getLocale", []);
\r
78 if (locale == null) {
\r
79 return java.util.Locale.getDefault ();
\r
82 Clazz.defineMethod (c$, "getParameterInfo",
\r
86 Clazz.defineMethod (c$, "init",
\r
89 Clazz.defineMethod (c$, "start",
\r
92 Clazz.defineMethod (c$, "stop",
\r
95 Clazz.defineMethod (c$, "destroy",
\r