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

  1. public class JScriptLocationObject extends JScriptAbstractLinkObject {
  2.    private static final String NAME = "location";
  3.    private static final int LOCATION_ID_RELOAD = 273;
  4.    private static final int LOCATION_ID_REPLACE = 274;
  5.  
  6.    public JScriptLocationObject(long var1) {
  7.       super(var1);
  8.  
  9.       try {
  10.          ((JSbxObject)this).Put(new JSbxObjectProperty("reload", this, this, 273, true, true));
  11.          ((JSbxObject)this).Put(new JSbxObjectProperty("replace", this, this, 274, true, true));
  12.       } catch (JSbxException var3) {
  13.       }
  14.    }
  15.  
  16.    public JSbxValue PropertyCallFunction(JSbxObjectProperty var1, JScriptCallParam var2) throws JSbxExceptionBase {
  17.       JSbxVector var3 = var2.GetParamVector();
  18.       int var4 = var1.GetID();
  19.  
  20.       try {
  21.          switch (var4) {
  22.             case 273:
  23.                if (var3.GetSize() > 0) {
  24.                   this.reload(JScriptWindowObject.GetBooleanParam(var3, 0));
  25.                } else {
  26.                   this.reload(true);
  27.                }
  28.                break;
  29.             case 274:
  30.                this.replace(JScriptWindowObject.GetStringParam(var3, 0));
  31.                break;
  32.             default:
  33.                return super.PropertyCallFunction(var1, var2);
  34.          }
  35.       } catch (UnsatisfiedLinkError var6) {
  36.       }
  37.  
  38.       Object var5 = null;
  39.       JSbxValue var7 = new JSbxValue();
  40.       var2.GetRuntimeParam().SetReturnValue(var7);
  41.       return var7;
  42.    }
  43.  
  44.    public void PropertyGet(JSbxObjectProperty var1, JSbxValue var2) throws JSbxException {
  45.       super.PropertyGet(var1, var2);
  46.    }
  47.  
  48.    public void PropertyPut(JSbxObjectProperty var1, JSbxValue var2) throws JSbxException {
  49.       super.PropertyPut(var1, var2);
  50.    }
  51.  
  52.    public String Property_GetJScript_typeofString(JSbxObjectProperty var1) {
  53.       return "location";
  54.    }
  55.  
  56.    public final void SetHref(String var1) {
  57.       this.setHref(var1);
  58.    }
  59.  
  60.    protected native String getHash();
  61.  
  62.    protected native void setHash(String var1);
  63.  
  64.    protected native String getHost();
  65.  
  66.    protected native void setHost(String var1);
  67.  
  68.    protected native String getHostname();
  69.  
  70.    protected native void setHostname(String var1);
  71.  
  72.    protected native String getHref();
  73.  
  74.    protected native void setHref(String var1);
  75.  
  76.    protected native String getPathname();
  77.  
  78.    protected native void setPathname(String var1);
  79.  
  80.    protected native String getPort();
  81.  
  82.    protected native void setPort(String var1);
  83.  
  84.    protected native String getProtocol();
  85.  
  86.    protected native void setProtocol(String var1);
  87.  
  88.    protected native String getSearch();
  89.  
  90.    protected native void setSearch(String var1);
  91.  
  92.    protected native void reload(boolean var1);
  93.  
  94.    protected native void replace(String var1);
  95. }
  96.