home *** CD-ROM | disk | FTP | other *** search
- import stardiv.tools.HoldJavaEnvironment;
-
- public class JScriptImageObject extends JSbxObject implements JSbxPropertyInterface {
- public static final String NAME = "Image";
- private static final int IMAGE_ID_BORDER = 1;
- private static final int IMAGE_ID_COMPLETE = 2;
- private static final int IMAGE_ID_HEIGHT = 3;
- private static final int IMAGE_ID_HSPACE = 4;
- private static final int IMAGE_ID_LOWSRC = 5;
- private static final int IMAGE_ID_NAME = 6;
- private static final int IMAGE_ID_PROTOTYPE = 7;
- private static final int IMAGE_ID_SRC = 8;
- private static final int IMAGE_ID_VSPACE = 9;
- private static final int IMAGE_ID_WIDTH = 10;
- private static final int IMAGE_ID_ONABORT = 11;
- private static final int IMAGE_ID_ONERROR = 12;
- private static final int IMAGE_ID_ONLOAD = 13;
- private int nHeight;
- private int nWidth;
- private String aSrcStrg;
-
- public final void SetHeight(int var1) {
- this.nHeight = var1;
- }
-
- public final void SetWidth(int var1) {
- this.nWidth = var1;
- }
-
- public final void SetSrcStrg(String var1) {
- this.aSrcStrg = var1;
- }
-
- public JScriptImageObject(JScriptConstructor var1) {
- this(0L, var1);
- }
-
- public JScriptImageObject(long var1) {
- this(var1, JScriptManager.GetConstructorObjectForMe("DefaultConstructor"));
- }
-
- private JScriptImageObject(long var1, JScriptConstructor var3) {
- super(var1, var3);
- this.SetWidth(0);
- this.SetHeight(0);
-
- try {
- ((JSbxObject)this).Put(new JSbxObjectProperty("border", this, this, 1, true));
- ((JSbxObject)this).Put(new JSbxObjectProperty("complete", this, this, 2, true));
- ((JSbxObject)this).Put(new JSbxObjectProperty("height", this, this, 3, false));
- ((JSbxObject)this).Put(new JSbxObjectProperty("hspace", this, this, 4, true));
- ((JSbxObject)this).Put(new JSbxObjectProperty("lowsrc", this, this, 5, true));
- ((JSbxObject)this).Put(new JSbxObjectProperty("name", this, this, 6, true));
- ((JSbxObject)this).Put(new JSbxObjectProperty("src", this, this, 8, false));
- ((JSbxObject)this).Put(new JSbxObjectProperty("vspace", this, this, 9, true));
- ((JSbxObject)this).Put(new JSbxObjectProperty("width", this, this, 10, false));
- ((JSbxObject)this).Put(new JSbxObjectProperty("onabort", this, this, 11, true));
- ((JSbxObject)this).Put(new JSbxObjectProperty("onerror", this, this, 12, true));
- ((JSbxObject)this).Put(new JSbxObjectProperty("onload", this, this, 13, true));
- } catch (JSbxException var4) {
- }
-
- this.nWidth = 0;
- this.nHeight = 0;
- this.aSrcStrg = null;
- }
-
- public JSbxValue PropertyCallFunction(JSbxObjectProperty var1, JScriptCallParam var2) throws JSbxExceptionBase {
- throw new JSbxException(0, "no such method in Image");
- }
-
- public void PropertyGet(JSbxObjectProperty var1, JSbxValue var2) throws JSbxException {
- int var3 = var1.GetID();
-
- try {
- switch (var3) {
- case 1:
- var2.Put(new JSbxValue(this.getBorder()));
- return;
- case 2:
- var2.Put(new JSbxValue(this.getComplete()));
- return;
- case 3:
- if (((JSbxObject)this).ExistsNativeHandle()) {
- if (HoldJavaEnvironment.CanIAskApplication()) {
- var2.Put(new JSbxValue(this.getHeight()));
- return;
- }
- } else {
- var2.Put(new JSbxValue((double)this.nHeight));
- }
-
- return;
- case 4:
- var2.Put(new JSbxValue(this.getHspace()));
- return;
- case 5:
- var2.Put(new JSbxValue(this.getLowsrc()));
- return;
- case 6:
- var2.Put(new JSbxValue(this.getName()));
- return;
- case 7:
- default:
- throw new JSbxException(0, "no such property in Image (ID=" + var3 + ")");
- case 8:
- if (((JSbxObject)this).ExistsNativeHandle()) {
- if (HoldJavaEnvironment.CanIAskApplication()) {
- var2.Put(new JSbxValue(this.getSrc()));
- return;
- }
- } else {
- var2.Put(new JSbxValue(this.aSrcStrg != null ? this.aSrcStrg : ""));
- }
-
- return;
- case 9:
- var2.Put(new JSbxValue(this.getVspace()));
- return;
- case 10:
- if (((JSbxObject)this).ExistsNativeHandle()) {
- if (HoldJavaEnvironment.CanIAskApplication()) {
- var2.Put(new JSbxValue(this.getWidth()));
- return;
- }
- } else {
- var2.Put(new JSbxValue((double)this.nWidth));
- }
-
- return;
- case 11:
- var2.Put(new JSbxValue(this.getOnAbort()));
- return;
- case 12:
- var2.Put(new JSbxValue(this.getOnError()));
- return;
- case 13:
- var2.Put(new JSbxValue(this.getOnLoad()));
- }
- } catch (UnsatisfiedLinkError var4) {
- }
- }
-
- public void PropertyPut(JSbxObjectProperty var1, JSbxValue var2) throws JSbxException {
- int var3 = var1.GetID();
-
- try {
- switch (var3) {
- case 5:
- this.setLowsrc(var2.GetString());
- return;
- case 8:
- if (((JSbxObject)this).ExistsNativeHandle()) {
- if (HoldJavaEnvironment.CanIAskApplication()) {
- this.setSrc(var2.GetString());
- return;
- }
- } else {
- this.aSrcStrg = var2.GetString();
- }
-
- return;
- case 11:
- this.setOnAbort(var2.GetString());
- return;
- case 12:
- this.setOnError(var2.GetString());
- return;
- case 13:
- this.setOnLoad(var2.GetString());
- return;
- default:
- throw new JSbxException(0, "no such property in Image (ID=" + var3 + ")");
- }
- } catch (UnsatisfiedLinkError var4) {
- }
- }
-
- public String Property_GetJScript_typeofString(JSbxObjectProperty var1) {
- return "Image";
- }
-
- public String GetJScriptString(boolean var1) {
- return "[object Image]";
- }
-
- private native String getBorder();
-
- private native boolean getComplete();
-
- private native String getHeight();
-
- private native String getHspace();
-
- private native String getLowsrc();
-
- private native void setLowsrc(String var1);
-
- private native String getName();
-
- private native String getPrototype();
-
- private native String getSrc();
-
- private native void setSrc(String var1);
-
- private native String getVspace();
-
- private native String getWidth();
-
- protected native String getOnAbort();
-
- protected native void setOnAbort(String var1);
-
- protected native String getOnError();
-
- protected native void setOnError(String var1);
-
- protected native String getOnLoad();
-
- protected native void setOnLoad(String var1);
- }
-