home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1997 August / PCO0897.ISO / filesbbs / os2 / fp1os2.arj / OS2 / DATA / 49 / C / 0 / F_26836 / JSbxObjectProperty.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-05-15  |  3.2 KB  |  104 lines

  1. import java.io.PrintStream;
  2. import stardiv.tools.HoldJavaEnvironment;
  3.  
  4. public class JSbxObjectProperty extends JSbxProperty {
  5.    private JSbxPropertyInterface aValueInterfaceObj;
  6.    private int nID;
  7.    private boolean bIsPropertyNative;
  8.  
  9.    public void SetValueInterface(JSbxPropertyInterface var1) {
  10.       this.aValueInterfaceObj = var1;
  11.    }
  12.  
  13.    public int GetID() {
  14.       return this.nID;
  15.    }
  16.  
  17.    public JSbxObjectProperty(String var1, JSbxObject var2, JSbxPropertyInterface var3, int var4, boolean var5, boolean var6) {
  18.       super(var1, var2);
  19.       this.bIsPropertyNative = var5;
  20.       this.aValueInterfaceObj = var3;
  21.       this.nID = var4;
  22.       if (var6) {
  23.          ((JSbxBase)this).SetFlag(4);
  24.       }
  25.  
  26.    }
  27.  
  28.    public JSbxObjectProperty(String var1, JSbxObject var2, JSbxPropertyInterface var3, int var4, boolean var5) {
  29.       this(var1, var2, var3, var4, var5, false);
  30.    }
  31.  
  32.    public JSbxObjectProperty(String var1, JSbxObject var2, JSbxPropertyInterface var3, int var4) {
  33.       this(var1, var2, var3, var4, false, false);
  34.    }
  35.  
  36.    public void Get(JSbxValue var1) throws JSbxException {
  37.       if (this.bIsPropertyNative && !HoldJavaEnvironment.CanIAskApplication()) {
  38.          var1.Put(new JSbxValue("*** not safe to inspect ***"));
  39.       } else {
  40.          this.aValueInterfaceObj.PropertyGet(this, var1);
  41.       }
  42.    }
  43.  
  44.    public void Put(JSbxValue var1) throws JSbxException {
  45.       if (!this.bIsPropertyNative || HoldJavaEnvironment.CanIAskApplication()) {
  46.          this.aValueInterfaceObj.PropertyPut(this, var1);
  47.       }
  48.  
  49.    }
  50.  
  51.    public JSbxValue CallFunction(JScriptCallParam var1) throws JSbxExceptionBase {
  52.       return this.bIsPropertyNative && !HoldJavaEnvironment.CanIAskApplication() ? new JSbxValue() : this.aValueInterfaceObj.PropertyCallFunction(this, var1);
  53.    }
  54.  
  55.    public String GetJScript_typeofString() {
  56.       return this.aValueInterfaceObj.Property_GetJScript_typeofString(this);
  57.    }
  58.  
  59.    public void Dump(PrintStream var1, int var2, int var3) throws JSbxException {
  60.       new JSbxValue("");
  61.       var1.print("Property \"" + ((JSbxProperty)this).GetName() + "\" = ");
  62.       JSbxValue var4 = new JSbxValue();
  63.       this.Get(var4);
  64.       var1.print("Object-Property (ID=" + this.GetID() + ") Liefert: ");
  65.       var4.Dump(var1, var2, var3);
  66.    }
  67.  
  68.    public String GetBrowserTypeInfo() {
  69.       JSbxValue var1 = new JSbxValue();
  70.  
  71.       try {
  72.          this.Get(var1);
  73.       } catch (JSbxException var3) {
  74.          System.out.println("Exception: " + var3);
  75.       }
  76.  
  77.       return new String("Obj-Prop (ID=" + this.GetID() + "): " + var1.GetBrowserTypeInfo());
  78.    }
  79.  
  80.    public String GetBrowserValueInfo() {
  81.       JSbxValue var1 = new JSbxValue();
  82.  
  83.       try {
  84.          this.Get(var1);
  85.       } catch (JSbxException var3) {
  86.          System.out.println("Exception: " + var3);
  87.       }
  88.  
  89.       return new String(var1.GetBrowserValueInfo());
  90.    }
  91.  
  92.    public String GetBrowserInfo() {
  93.       JSbxValue var1 = new JSbxValue();
  94.  
  95.       try {
  96.          this.Get(var1);
  97.       } catch (JSbxException var3) {
  98.          System.out.println("Exception: " + var3);
  99.       }
  100.  
  101.       return new String("Obj-Prop (ID=" + this.GetID() + "): " + var1.GetBrowserInfo());
  102.    }
  103. }
  104.