home *** CD-ROM | disk | FTP | other *** search
- public class JScriptSelectObject extends JScriptAbstractControlObject {
- private static final int SELECT_ID_LENGTH = 257;
- private static final int SELECT_ID_SELECTEDINDEX = 258;
- private static final int SELECT_ID_OPTIONS = 259;
- private static final int SELECT_ID_FOCUS = 260;
- private static final int SELECT_ID_BLUR = 261;
- private static final int SELECT_ID_ONBLUR = 262;
- private static final int SELECT_ID_ONCHANGE = 263;
- private static final int SELECT_ID_ONFOCUS = 264;
- private static final int SELECT_ID_OPTION = 265;
- private JSbxValue aValuePropVal = new JSbxValue((JSbxBase)null);
-
- public JScriptSelectObject(long var1) {
- super(var1);
-
- try {
- ((JSbxObject)this).Put(new JSbxObjectProperty("options", this, this, 259, false));
- ((JSbxObject)this).Put(new JSbxObjectProperty("selectedIndex", this, this, 258, true));
- ((JSbxObject)this).Put(new JSbxObjectProperty("focus", this, this, 260, true, true));
- ((JSbxObject)this).Put(new JSbxObjectProperty("blur", this, this, 261, true, true));
- ((JSbxObject)this).Put(new JSbxObjectProperty("onblur", this, this, 262, true, true));
- ((JSbxObject)this).Put(new JSbxObjectProperty("onchange", this, this, 263, true, true));
- ((JSbxObject)this).Put(new JSbxObjectProperty("onfocus", this, this, 264, true, true));
- } catch (JSbxException var3) {
- }
- }
-
- public JSbxProperty Get(int var1, boolean var2) {
- Object var3 = (JSbxObjectProperty)((JSbxObject)this).GetIndexArray().Get(var1);
- if (var3 == null && this.getLength() > var1) {
- JScriptOptionObject var4 = new JScriptOptionObject(this, var1);
- var3 = new JSbxOptionObjectProperty(String.valueOf(var1), this, this, 265, var4);
- ((JSbxObject)this).GetIndexArray().Put(var1, var3);
- }
-
- return (JSbxProperty)var3;
- }
-
- public JSbxValue PropertyCallFunction(JSbxObjectProperty var1, JScriptCallParam var2) throws JSbxExceptionBase {
- int var3 = var1.GetID();
-
- try {
- switch (var3) {
- case 260:
- this.focus();
- break;
- case 261:
- this.blur();
- break;
- default:
- return super.PropertyCallFunction(var1, var2);
- }
- } catch (UnsatisfiedLinkError var5) {
- }
-
- Object var4 = null;
- JSbxValue var6 = new JSbxValue();
- var2.GetRuntimeParam().SetReturnValue(var6);
- return var6;
- }
-
- public void PropertyGet(JSbxObjectProperty var1, JSbxValue var2) throws JSbxException {
- int var3 = var1.GetID();
-
- try {
- switch (var3) {
- case 66:
- var2.Put(this.aValuePropVal);
- return;
- case 258:
- var2.Put(new JSbxValue((double)this.getSelectedIndex()));
- return;
- case 259:
- var2.Put(new JSbxValue(this));
- return;
- case 262:
- var2.Put(new JSbxValue(this.getOnBlur()));
- return;
- case 263:
- var2.Put(new JSbxValue(this.getOnChange()));
- return;
- case 264:
- var2.Put(new JSbxValue(this.getOnFocus()));
- return;
- case 265:
- JSbxOptionObjectProperty var4 = (JSbxOptionObjectProperty)var1;
- var2.Put(new JSbxValue(var4.getOptionObject()));
- return;
- default:
- super.PropertyGet(var1, var2);
- }
- } catch (UnsatisfiedLinkError var5) {
- }
- }
-
- public void PropertyPut(JSbxObjectProperty var1, JSbxValue var2) throws JSbxException {
- int var3 = var1.GetID();
-
- try {
- switch (var3) {
- case 66:
- this.aValuePropVal.Put(var2);
- return;
- case 258:
- this.setSelectedIndex((int)var2.GetDouble());
- return;
- case 262:
- this.setOnBlur(var2.GetString());
- return;
- case 263:
- this.setOnChange(var2.GetString());
- return;
- case 264:
- this.setOnFocus(var2.GetString());
- return;
- case 265:
- JSbxOptionObjectProperty var4 = (JSbxOptionObjectProperty)var1;
- JScriptOptionObject var5 = var4.getOptionObject();
- int var6 = var5.getIndex();
- if (var2.GetType() == 2) {
- JSbxBase var7 = var2.GetObject();
- if (var7 instanceof JScriptOptionObject) {
- JScriptOptionObject var8 = (JScriptOptionObject)var7;
- if (var8.getSelectObject() == null) {
- var5.SaveConstructorValues(this.getOptionText(var6), this.getOptionValue(var6), this.getOptionDefaultSelected(var6), this.getOptionSelected(var6));
- var5.setSelectObject((JScriptSelectObject)null);
- var5.setIndex(0);
- this.setOption(var6, var8.getOptionText(), var8.getOptionValue(), var8.getDefaultSelected(), var8.getSelected());
- var8.setSelectObject(this);
- var8.setIndex(var6);
- var4.setOptionObject(var8);
- return;
- }
- }
- }
- break;
- default:
- super.PropertyPut(var1, var2);
- }
-
- } catch (UnsatisfiedLinkError var9) {
- }
- }
-
- public String GetJScriptString(boolean var1) {
- return "select";
- }
-
- protected native int getLength();
-
- protected native int getSelectedIndex();
-
- protected native void setSelectedIndex(int var1);
-
- protected native void focus();
-
- protected native void blur();
-
- protected native String getOnBlur();
-
- protected native void setOnBlur(String var1);
-
- protected native String getOnChange();
-
- protected native void setOnChange(String var1);
-
- protected native String getOnFocus();
-
- protected native void setOnFocus(String var1);
-
- protected native void setOption(int var1, String var2, String var3, boolean var4, boolean var5);
-
- protected native boolean getOptionDefaultSelected(int var1);
-
- protected native void setOptionDefaultSelected(boolean var1, int var2);
-
- protected native boolean getOptionSelected(int var1);
-
- protected native void setOptionSelected(boolean var1, int var2);
-
- protected native String getOptionText(int var1);
-
- protected native void setOptionText(String var1, int var2);
-
- protected native void setOptionValue(String var1, int var2);
-
- protected native String getOptionValue(int var1);
- }
-