home *** CD-ROM | disk | FTP | other *** search
- public class JScriptDocumentObject extends JSbxObject implements JSbxPropertyInterface {
- private static final String NAME = "document";
- private static final int DOCUMENT_ID_ALINKCOLOR = 1;
- private static final int DOCUMENT_ID_LINKCOLOR = 2;
- private static final int DOCUMENT_ID_BGCOLOR = 3;
- private static final int DOCUMENT_ID_FGCOLOR = 4;
- private static final int DOCUMENT_ID_VLINKCOLOR = 5;
- private static final int DOCUMENT_ID_COOKIE = 6;
- private static final int DOCUMENT_ID_LASTMODIFIED = 7;
- private static final int DOCUMENT_ID_REFERRER = 8;
- private static final int DOCUMENT_ID_TITLE = 9;
- private static final int DOCUMENT_ID_URL = 10;
- private static final int DOCUMENT_ID_LOCATION = 11;
- private static final int DOCUMENT_ID_DOMAIN = 12;
- private static final int DOCUMENT_ID_ANCHORS = 17;
- private static final int DOCUMENT_ID_FORMS = 18;
- private static final int DOCUMENT_ID_LINKS = 19;
- private static final int DOCUMENT_ID_IMAGES = 33;
- private static final int DOCUMENT_ID_EMBEDS = 34;
- private static final int DOCUMENT_ID_APPLETS = 35;
- private static final int DOCUMENT_ID_CLEAR = 49;
- private static final int DOCUMENT_ID_CLOSE = 50;
- private static final int DOCUMENT_ID_OPEN = 51;
- private static final int DOCUMENT_ID_WRITE = 52;
- private static final int DOCUMENT_ID_WRITELN = 53;
-
- public JScriptDocumentObject(long var1) {
- super(var1, JScriptManager.GetConstructorObjectForMe("DefaultConstructor"));
-
- try {
- ((JSbxObject)this).Put(new JSbxObjectProperty("forms", this, this, 18, true));
- ((JSbxObject)this).Put(new JSbxObjectProperty("links", this, this, 19, true));
- ((JSbxObject)this).Put(new JSbxObjectProperty("anchors", this, this, 17, true));
- ((JSbxObject)this).Put(new JSbxObjectProperty("applets", this, this, 35, true));
- ((JSbxObject)this).Put(new JSbxObjectProperty("embeds", this, this, 34, true));
- ((JSbxObject)this).Put(new JSbxObjectProperty("images", this, this, 33, true));
- ((JSbxObject)this).Put(new JSbxObjectProperty("title", this, this, 9, true));
- ((JSbxObject)this).Put(new JSbxObjectProperty("URL", this, this, 10, true));
- ((JSbxObject)this).Put(new JSbxObjectProperty("referrer", this, this, 8, true));
- ((JSbxObject)this).Put(new JSbxObjectProperty("lastModified", this, this, 7, true));
- ((JSbxObject)this).Put(new JSbxObjectProperty("cookie", this, this, 6, true));
- ((JSbxObject)this).Put(new JSbxObjectProperty("domain", this, this, 12, true));
- ((JSbxObject)this).Put(new JSbxObjectProperty("bgColor", this, this, 3, true));
- ((JSbxObject)this).Put(new JSbxObjectProperty("fgColor", this, this, 4, true));
- ((JSbxObject)this).Put(new JSbxObjectProperty("linkColor", this, this, 2, true));
- ((JSbxObject)this).Put(new JSbxObjectProperty("vlinkColor", this, this, 5, true));
- ((JSbxObject)this).Put(new JSbxObjectProperty("alinkColor", this, this, 1, true));
- ((JSbxObject)this).Put(new JSbxObjectProperty("location", this, this, 11, true, true));
- ((JSbxObject)this).Put(new JSbxObjectProperty("clear", this, this, 49, true, true));
- ((JSbxObject)this).Put(new JSbxObjectProperty("close", this, this, 50, true, true));
- ((JSbxObject)this).Put(new JSbxObjectProperty("open", this, this, 51, true, true));
- ((JSbxObject)this).Put(new JSbxObjectProperty("write", this, this, 52, true, true));
- ((JSbxObject)this).Put(new JSbxObjectProperty("writeln", this, this, 53, true, true));
- } catch (JSbxException var3) {
- }
- }
-
- public JSbxValue PropertyCallFunction(JSbxObjectProperty var1, JScriptCallParam var2) throws JSbxExceptionBase {
- JSbxVector var3 = var2.GetParamVector();
- int var4 = var3 != null ? var3.GetSize() : 0;
- int var5 = var1.GetID();
- String var6 = "";
- double var7 = (double)0.0F;
- boolean var9 = false;
- boolean var10 = true;
-
- try {
- switch (var5) {
- case 49:
- this.clear();
- break;
- case 50:
- this.close();
- break;
- case 51:
- if (var4 > 0) {
- return new JSbxValue(this.open(JScriptWindowObject.GetStringParam(var3, 0)));
- }
- break;
- case 52:
- String var14 = "";
-
- for(int var17 = 0; var17 < var4; ++var17) {
- var14 = var14 + JScriptWindowObject.GetStringParam(var3, var17);
- }
-
- this.write(var14);
- break;
- case 53:
- String var11 = "";
-
- for(int var12 = 0; var12 < var4; ++var12) {
- var11 = var11 + JScriptWindowObject.GetStringParam(var3, var12);
- }
-
- this.writeln(var11);
- break;
- default:
- throw new JSbxException(0, "no such method in document (ID=" + var5 + ")");
- }
- } catch (UnsatisfiedLinkError var13) {
- }
-
- Object var15 = null;
- JSbxValue var16;
- if (var10) {
- var16 = new JSbxValue();
- } else if (var9) {
- var16 = new JSbxValue(var7);
- } else {
- var16 = new JSbxValue(var6);
- }
-
- var2.GetRuntimeParam().SetReturnValue(var16);
- return var16;
- }
-
- public void PropertyGet(JSbxObjectProperty var1, JSbxValue var2) throws JSbxException {
- int var3 = var1.GetID();
-
- try {
- switch (var3) {
- case 1:
- var2.Put(new JSbxValue(this.getaLinkColor()));
- return;
- case 2:
- var2.Put(new JSbxValue(this.getLinkColor()));
- return;
- case 3:
- var2.Put(new JSbxValue(this.getBgColor()));
- return;
- case 4:
- var2.Put(new JSbxValue(this.getFgColor()));
- return;
- case 5:
- var2.Put(new JSbxValue(this.getvLinkColor()));
- return;
- case 6:
- var2.Put(new JSbxValue(this.getCookie()));
- return;
- case 7:
- var2.Put(new JSbxValue(this.getLastModified()));
- return;
- case 8:
- var2.Put(new JSbxValue(this.getReferrer()));
- return;
- case 9:
- var2.Put(new JSbxValue(this.getTitle()));
- return;
- case 10:
- var2.Put(new JSbxValue(this.getURL()));
- return;
- case 11:
- var2.Put(new JSbxValue(this.getLocation()));
- return;
- case 12:
- var2.Put(new JSbxValue(this.getDomain()));
- return;
- case 17:
- JSbxArrayObject var10 = this.getAnchors();
- if (var10 != null) {
- var10.SetArrayType("AnchorArray");
- }
-
- var2.Put(new JSbxValue(var10));
- return;
- case 18:
- JSbxArrayObject var9 = this.getForms();
- if (var9 != null) {
- var9.SetArrayType("FormsArray");
- }
-
- var2.Put(new JSbxValue(var9));
- return;
- case 19:
- JSbxArrayObject var8 = this.getLinks();
- if (var8 != null) {
- var8.SetArrayType("LinkArray");
- }
-
- var2.Put(new JSbxValue(var8));
- return;
- case 33:
- JSbxArrayObject var7 = this.getImages();
- if (var7 != null) {
- var7.SetArrayType("ImageArray");
- }
-
- var2.Put(new JSbxValue(var7));
- return;
- case 34:
- JSbxArrayObject var6 = this.getEmbeds();
- if (var6 != null) {
- var6.SetArrayType("EmbedArray");
- }
-
- var2.Put(new JSbxValue(var6));
- return;
- case 35:
- JSbxArrayObject var4 = this.getApplets();
- if (var4 != null) {
- var4.SetArrayType("AppletArray");
- }
-
- var2.Put(new JSbxValue(var4));
- return;
- default:
- throw new JSbxException(0, "no such property in document (ID=" + var3 + ")");
- }
- } catch (UnsatisfiedLinkError var5) {
- }
- }
-
- public void PropertyPut(JSbxObjectProperty var1, JSbxValue var2) throws JSbxException {
- int var3 = var1.GetID();
-
- try {
- switch (var3) {
- case 1:
- this.setaLinkColor(var2.GetString());
- return;
- case 2:
- this.setLinkColor(var2.GetString());
- return;
- case 3:
- this.setBgColor(var2.GetString());
- return;
- case 4:
- this.setFgColor(var2.GetString());
- return;
- case 5:
- this.setvLinkColor(var2.GetString());
- return;
- case 6:
- this.setCookie(var2.GetString());
- return;
- case 7:
- case 8:
- case 10:
- default:
- throw new JSbxException(0, "no such property in document (ID=" + var3 + ")");
- case 9:
- break;
- case 11:
- JScriptLocationObject var4 = this.getLocation();
- if (var4 != null) {
- var4.SetHref(var2.GetString());
- return;
- }
- }
- } catch (UnsatisfiedLinkError var5) {
- }
-
- }
-
- public String Property_GetJScript_typeofString(JSbxObjectProperty var1) {
- return "document";
- }
-
- public String GetJScriptString(boolean var1) {
- return " ";
- }
-
- private native String getaLinkColor();
-
- private native void setaLinkColor(String var1);
-
- private native String getLinkColor();
-
- private native void setLinkColor(String var1);
-
- private native String getBgColor();
-
- private native void setBgColor(String var1);
-
- private native String getFgColor();
-
- private native void setFgColor(String var1);
-
- private native String getvLinkColor();
-
- private native void setvLinkColor(String var1);
-
- private native JSbxArrayObject getAnchors();
-
- private native JSbxArrayObject getForms();
-
- private native JSbxArrayObject getLinks();
-
- private native JSbxArrayObject getApplets();
-
- private native JSbxArrayObject getImages();
-
- private native JSbxArrayObject getEmbeds();
-
- private native String getCookie();
-
- private native void setCookie(String var1);
-
- private native String getLastModified();
-
- private native String getReferrer();
-
- private native String getTitle();
-
- private native String getURL();
-
- private native JScriptLocationObject getLocation();
-
- private native String getDomain();
-
- private native void clear();
-
- private native void close();
-
- private native JSbxObject open(String var1);
-
- private native void write(String var1);
-
- private native void writeln(String var1);
- }
-