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

  1. public class JScriptAbstractLinkObject extends JSbxObject implements JSbxPropertyInterface {
  2.    private static final String NAME = "abstractlink";
  3.    private static final int ABSLINK_ID_HASH = 1;
  4.    private static final int ABSLINK_ID_HOST = 2;
  5.    private static final int ABSLINK_ID_HOSTNAME = 3;
  6.    private static final int ABSLINK_ID_HREF = 4;
  7.    private static final int ABSLINK_ID_PATHNAME = 5;
  8.    private static final int ABSLINK_ID_PORT = 6;
  9.    private static final int ABSLINK_ID_PROTOCOL = 7;
  10.    private static final int ABSLINK_ID_SEARCH = 8;
  11.  
  12.    protected JScriptAbstractLinkObject(long var1) {
  13.       super(var1, JScriptManager.GetConstructorObjectForMe("DefaultConstructor"));
  14.  
  15.       try {
  16.          ((JSbxObject)this).Put(new JSbxObjectProperty("href", this, this, 4));
  17.          ((JSbxObject)this).Put(new JSbxObjectProperty("protocol", this, this, 7));
  18.          ((JSbxObject)this).Put(new JSbxObjectProperty("host", this, this, 2));
  19.          ((JSbxObject)this).Put(new JSbxObjectProperty("hostname", this, this, 3));
  20.          ((JSbxObject)this).Put(new JSbxObjectProperty("port", this, this, 6));
  21.          ((JSbxObject)this).Put(new JSbxObjectProperty("pathname", this, this, 5));
  22.          ((JSbxObject)this).Put(new JSbxObjectProperty("hash", this, this, 1));
  23.          ((JSbxObject)this).Put(new JSbxObjectProperty("search", this, this, 8));
  24.       } catch (JSbxException var3) {
  25.       }
  26.    }
  27.  
  28.    public JSbxValue PropertyCallFunction(JSbxObjectProperty var1, JScriptCallParam var2) throws JSbxExceptionBase {
  29.       throw new JSbxException(0, "no such method in abstractlink");
  30.    }
  31.  
  32.    public void PropertyGet(JSbxObjectProperty var1, JSbxValue var2) throws JSbxException {
  33.       int var3 = var1.GetID();
  34.  
  35.       try {
  36.          switch (var3) {
  37.             case 1:
  38.                var2.Put(new JSbxValue(this.getHash()));
  39.                return;
  40.             case 2:
  41.                var2.Put(new JSbxValue(this.getHost()));
  42.                return;
  43.             case 3:
  44.                var2.Put(new JSbxValue(this.getHostname()));
  45.                return;
  46.             case 4:
  47.                var2.Put(new JSbxValue(this.getHref()));
  48.                return;
  49.             case 5:
  50.                var2.Put(new JSbxValue(this.getPathname()));
  51.                return;
  52.             case 6:
  53.                var2.Put(new JSbxValue(this.getPort()));
  54.                return;
  55.             case 7:
  56.                var2.Put(new JSbxValue(this.getProtocol()));
  57.                return;
  58.             case 8:
  59.                var2.Put(new JSbxValue(this.getSearch()));
  60.                return;
  61.             default:
  62.                throw new JSbxException(0, "no such property in abstractlink (ID=" + var3 + ")");
  63.          }
  64.       } catch (UnsatisfiedLinkError var4) {
  65.       }
  66.    }
  67.  
  68.    public void PropertyPut(JSbxObjectProperty var1, JSbxValue var2) throws JSbxException {
  69.       int var3 = var1.GetID();
  70.  
  71.       try {
  72.          switch (var3) {
  73.             case 1:
  74.                this.setHash(var2.GetString());
  75.                return;
  76.             case 2:
  77.                this.setHost(var2.GetString());
  78.                return;
  79.             case 3:
  80.                this.setHostname(var2.GetString());
  81.                return;
  82.             case 4:
  83.                this.setHref(var2.GetString());
  84.                return;
  85.             case 5:
  86.                this.setPathname(var2.GetString());
  87.                return;
  88.             case 6:
  89.                this.setPort(var2.GetString());
  90.                return;
  91.             case 7:
  92.                this.setProtocol(var2.GetString());
  93.                return;
  94.             case 8:
  95.                this.setSearch(var2.GetString());
  96.                return;
  97.             default:
  98.                throw new JSbxException(0, "no such property in abstractlink (ID=" + var3 + ")");
  99.          }
  100.       } catch (UnsatisfiedLinkError var4) {
  101.       }
  102.    }
  103.  
  104.    public String Property_GetJScript_typeofString(JSbxObjectProperty var1) {
  105.       return "object";
  106.    }
  107.  
  108.    public String GetJScriptString(boolean var1) {
  109.       return this.getHref();
  110.    }
  111.  
  112.    protected String getHash() {
  113.       return null;
  114.    }
  115.  
  116.    protected void setHash(String var1) {
  117.    }
  118.  
  119.    protected String getHost() {
  120.       return null;
  121.    }
  122.  
  123.    protected void setHost(String var1) {
  124.    }
  125.  
  126.    protected String getHostname() {
  127.       return null;
  128.    }
  129.  
  130.    protected void setHostname(String var1) {
  131.    }
  132.  
  133.    protected String getHref() {
  134.       return null;
  135.    }
  136.  
  137.    protected void setHref(String var1) {
  138.    }
  139.  
  140.    protected String getPathname() {
  141.       return null;
  142.    }
  143.  
  144.    protected void setPathname(String var1) {
  145.    }
  146.  
  147.    protected String getPort() {
  148.       return null;
  149.    }
  150.  
  151.    protected void setPort(String var1) {
  152.    }
  153.  
  154.    protected String getProtocol() {
  155.       return null;
  156.    }
  157.  
  158.    protected void setProtocol(String var1) {
  159.    }
  160.  
  161.    protected String getSearch() {
  162.       return null;
  163.    }
  164.  
  165.    protected void setSearch(String var1) {
  166.    }
  167. }
  168.