0001 
0002 /*
0003  *  JScripter Standard 1.0 - To Script In Java
0004  *  Copyright (C) 2008-2011  J.J.Liu<jianjunliu@126.com> <http://www.jscripter.org>
0005  *  
0006  *  This program is free software: you can redistribute it and/or modify
0007  *  it under the terms of the GNU Affero General Public License as published by
0008  *  the Free Software Foundation, either version 3 of the License, or
0009  *  (at your option) any later version.
0010  *  
0011  *  This program is distributed in the hope that it will be useful,
0012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
0013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0014  *  GNU Affero General Public License for more details.
0015  *  
0016  *  You should have received a copy of the GNU Affero General Public License
0017  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
0018  */
0019 
0020 package js.dom;
0021 
0022 import js.*;
0023 import js.core.*;
0024 import js.user.*;
0025 
0026 /**
0027  * <p>An <b>opaque</b> interface for DOM Level 2 Event implementors.</p>
0028  *
0029  * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.jscripter.org" target="_blank">http://www.jscripter.org</a>
0030  *
0031  * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be
0032  * generated into the target codes. Re-compilers must exit with error on the operations of
0033  * accessing that kind of class objects.
0034  * The <tt>checkcast</tt> operation to the class literal of this interface must be ignored
0035  * and <tt>instanceof</tt> to it always <tt>true</tt>.
0036  */
0037 public interface DOM2Event
0038 {
0039     /**
0040      * <p>An <b>opaque</b> class representing the global <tt>Event</tt> class of JavaScript.</p>
0041      *
0042      * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.jscripter.org" target="_blank">http://www.jscripter.org</a>
0043      * 
0044      * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be
0045      * generated into the target codes. Re-compilers must exit with error on the operations of
0046      * accessing that kind of class objects.
0047      * The <tt>checkcast</tt> operation to the class literal of this interface must be ignored
0048      * and <tt>instanceof</tt> to it always <tt>true</tt>.
0049      */
0050     public class Event extends JsClass
0051     {
0052         /**
0053          * <p>An <b>internal</b> class containing membership data for its enclosing
0054          * opaque class.</p>
0055          * <p>This class is only used inside of <b>opaque</b> or <b>internal</b> classes or
0056          * class members.</p>
0057          *
0058          * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.jscripter.org" target="_blank">http://www.jscripter.org</a>
0059          * 
0060          * @javascript Re-compilers must report error on resolving an <b>internal</b> class.
0061          */
0062         protected static abstract class Members extends JsClass.Members
0063         {
0064             /**
0065              * <p>An <b>internal</b> static field defining a member ID of the field name and
0066              * used internally to define a member of the same name.</p>
0067              * @since 1.0
0068              * @see DOM2Event.Event#CAPTURING_PHASE
0069              * @see DOM2Event.Event.Member#CAPTURING_PHASE
0070              * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0071              */
0072             protected static final Mid CAPTURING_PHASE = id("CAPTURING_PHASE");
0073             /**
0074              * <p>An <b>internal</b> static field defining a member ID of the field name and
0075              * used internally to define a member of the same name.</p>
0076              * @since 1.0
0077              * @see DOM2Event.Event#AT_TARGET
0078              * @see DOM2Event.Event.Member#AT_TARGET
0079              * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0080              */
0081             protected static final Mid AT_TARGET       = id("AT_TARGET"      );
0082             /**
0083              * <p>An <b>internal</b> static field defining a member ID of the field name and
0084              * used internally to define a member of the same name.</p>
0085              * @since 1.0
0086              * @see DOM2Event.Event#BUBBLING_PHASE
0087              * @see DOM2Event.Event.Member#BUBBLING_PHASE
0088              * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0089              */
0090             protected static final Mid BUBBLING_PHASE  = id("BUBBLING_PHASE" );
0091         }
0092         /**
0093          * <p>An <b>opaque</b> class representing members of its enclosing <b>opaque</b> type.</p>
0094          * <p>Note that, this class is <b>opaque</b> but its constructors are all <b>internal</b>. 
0095          * This class and the subclasses of this class are used to declare either <b>opaque</b> 
0096          * <tt>public</tt> instance fields of the opaque type {@link js.Var.Member} or the 
0097          * <b>opaque</b> <tt>public</tt> static fields of other <b>opaque</b> types while their 
0098          * constructors are used to define the fields inside <b>opaque</b> classes. Under 
0099          * either circumstance, the field names must be exactly same as the member names, as 
0100          * the <b>opaque</b> fields of <b>opaque</b> types are resolved by re-compilers directly 
0101          * based on the field names.</p>
0102          *
0103          * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.jscripter.org" target="_blank">http://www.jscripter.org</a>
0104          * 
0105          * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be created
0106          * in the target codes. Re-compilers must exit with error on operations accessing that kind 
0107          * of class objects.
0108          * Re-compilers must resolve an <b>opaque</b> instance field declared by this class in
0109          * {@link js.Var.Member} or its subclasses to the JavaScript identifier: 
0110          * <pre>q.m</pre>
0111          * where <tt>m</tt> is the identifier of the field name and <tt>q</tt> is the identifier
0112          * resolved from the instance of the enclosing member. Re-compilers must resolve an 
0113          * <b>opaque</b> static field declared by this class in <b>opaque</b> types other than 
0114          * {@link js.Var.Member} and its subclasses to the JavaScript identifier: 
0115          * <pre>m</pre>
0116          * where <tt>m</tt> is the identifier of the field name. And re-compilers must report
0117          * error on the access to <b>opaque</b> fields declared by this class under any other 
0118          * circumstances.
0119          */
0120         public static class Member extends JsClass.Member
0121         {
0122             public Member(JsObject.Member q, Mid mid) {
0123                 super(q, mid);
0124             }
0125             public Member(Mid mid) {
0126                 super(mid);
0127             }
0128             @Override
0129             /**
0130              * <p>Evaluates the property, represented by the current member instance, of the
0131              * argument object.</p>
0132              * @param o The argument object
0133              * @return The value of the current member based on the object argument.
0134              * @since 1.0
0135              * @javascript Re-compilers must convert the instance invocation of this method into
0136              * the JavaScript expression: 
0137              * <pre>o.m</pre>
0138              * where <tt>m</tt> is the identifier name resolved from the current member
0139              * instance of the invocation.
0140              */
0141             public Event with(ObjectLike o) {
0142                 return new Event(super.with(o));
0143             }
0144             @Override
0145             /**
0146              * <p>Evaluates a property, represented by the current member instance, of the
0147              * JavaScript global object, that is, evaluates the member to a global identifier.</p>
0148              * @return The value of the current member based on the JavaScript global object.
0149              * @since 1.0
0150              * @javascript Re-compilers must convert the instance invocation of this method into
0151              * the JavaScript expression: 
0152              * <pre>m</pre>
0153              * where <tt>m</tt> is the identifier name resolved from the current member
0154              * instance of the invocation.
0155              */
0156             public Event with() {
0157                 return with(Js.win());
0158             }
0159 
0160             /**
0161              * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0162              * name of this field, qualified by the current member instance of the field, and 
0163              * to access the property of the name on an object.</p>
0164              * @since 1.0
0165              * @javascript Re-compilers must resolve the member of this instance field to the
0166              * identifier of the field name appending to the identifier resolved from its 
0167              * qualifying member with a dot in between.
0168              */
0169             public final Prototype.Member prototype = new Prototype.Member(this, Members.prototype);
0170             /**
0171              * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0172              * name of this field, qualified by the current member instance of the field, and 
0173              * to access the property of the name on an object.</p>
0174              * @since 1.0
0175              * @see JsEvent#CAPTURING_PHASE
0176              * @javascript Re-compilers must resolve the member of this instance field to the
0177              * identifier of the field name appending to the identifier resolved from its 
0178              * qualifying member with a dot in between.
0179              */
0180             public final Value.Number.Member CAPTURING_PHASE = new Value.Number.Member(this, Members.CAPTURING_PHASE);
0181             /**
0182              * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0183              * name of this field, qualified by the current member instance of the field, and 
0184              * to access the property of the name on an object.</p>
0185              * @since 1.0
0186              * @see JsEvent#AT_TARGET
0187              * @javascript Re-compilers must resolve the member of this instance field to the
0188              * identifier of the field name appending to the identifier resolved from its 
0189              * qualifying member with a dot in between.
0190              */
0191             public final Value.Number.Member AT_TARGET       = new Value.Number.Member(this, Members.AT_TARGET      );
0192             /**
0193              * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0194              * name of this field, qualified by the current member instance of the field, and 
0195              * to access the property of the name on an object.</p>
0196              * @since 1.0
0197              * @see JsEvent#BUBBLING_PHASE
0198              * @javascript Re-compilers must resolve the member of this instance field to the
0199              * identifier of the field name appending to the identifier resolved from its 
0200              * qualifying member with a dot in between.
0201              */
0202             public final Value.Number.Member BUBBLING_PHASE  = new Value.Number.Member(this, Members.BUBBLING_PHASE );
0203         }
0204 
0205         /**
0206          * <p>Casts an <b>opaque</b> object to the current <b>opaque</b> type by wrapping it
0207          * with the wrapping constructor.</p>
0208          * @param var The argument of an <b>opaque</b> object.
0209          * @since 1.0
0210          * @javascript Re-compilers must ignore the construction operation of this constructor,
0211          * that is, replacing it with its only argument.
0212          */
0213         public Event(JsObject var) {
0214             super(var(var, (JsFunction<?>)null));
0215         }
0216 
0217         /**
0218          * <p>An <b>opaque</b> static field defining a member that is named by the field name
0219          * without a qualifying member and to access the property of the name on an object.</p>
0220          * @since 1.0
0221          * @javascript Re-compilers must resolve the member of this static field to the
0222          * identifier of the field name.
0223          */
0224         public static final Prototype.Member prototype = new Prototype.Member(Members.prototype);
0225         /**
0226          * <p>An <b>opaque</b> static field defining a member that is named by the field name
0227          * without a qualifying member and to access the property of the name on an object.</p>
0228          * @since 1.0
0229          * @see JsEvent#CAPTURING_PHASE
0230          * @javascript Re-compilers must resolve the member of this static field to the
0231          * identifier of the field name.
0232          */
0233         public static final Value.Number.Member CAPTURING_PHASE = new Value.Number.Member(Members.CAPTURING_PHASE);
0234         /**
0235          * <p>An <b>opaque</b> static field defining a member that is named by the field name
0236          * without a qualifying member and to access the property of the name on an object.</p>
0237          * @since 1.0
0238          * @see JsEvent#AT_TARGET
0239          * @javascript Re-compilers must resolve the member of this static field to the
0240          * identifier of the field name.
0241          */
0242         public static final Value.Number.Member AT_TARGET       = new Value.Number.Member(Members.AT_TARGET      );
0243         /**
0244          * <p>An <b>opaque</b> static field defining a member that is named by the field name
0245          * without a qualifying member and to access the property of the name on an object.</p>
0246          * @since 1.0
0247          * @see JsEvent#BUBBLING_PHASE
0248          * @javascript Re-compilers must resolve the member of this static field to the
0249          * identifier of the field name.
0250          */
0251         public static final Value.Number.Member BUBBLING_PHASE  = new Value.Number.Member(Members.BUBBLING_PHASE );
0252 
0253         /**
0254          * <p>An <b>opaque</b> class representing the prototype of the enclosing global
0255          * class of JavaScript.</p>
0256          *
0257          * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.jscripter.org" target="_blank">http://www.jscripter.org</a>
0258          * 
0259          * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be
0260          * generated into the target codes. Re-compilers must exit with error on the operations of
0261          * accessing that kind of class objects.
0262          * The <tt>checkcast</tt> operation to the class literal of this interface must be ignored
0263          * and <tt>instanceof</tt> to it always <tt>true</tt>.
0264          */
0265         public static class Prototype extends JsObject
0266         {
0267             /**
0268              * <p>An <b>internal</b> class containing membership data for its enclosing
0269              * opaque class.</p>
0270              * <p>This class is only used inside of <b>opaque</b> or <b>internal</b> classes or
0271              * class members.</p>
0272              *
0273              * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.jscripter.org" target="_blank">http://www.jscripter.org</a>
0274              * 
0275              * @javascript Re-compilers must report error on resolving an <b>internal</b> class.
0276              */
0277             protected static abstract class Members extends JsObject.Members
0278             {
0279                 /**
0280                  * <p>An <b>internal</b> static field defining a member ID of the field name and
0281                  * used internally to define a member of the same name.</p>
0282                  * @since 1.0
0283                  * @see DOM2Event.Event.Prototype#initEvent
0284                  * @see DOM2Event.Event.Prototype.Member#initEvent
0285                  * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0286                  */
0287                 public final static Mid initEvent       = id("initEvent"      );
0288                 /**
0289                  * <p>An <b>internal</b> static field defining a member ID of the field name and
0290                  * used internally to define a member of the same name.</p>
0291                  * @since 1.0
0292                  * @see DOM2Event.Event.Prototype#preventDefault
0293                  * @see DOM2Event.Event.Prototype.Member#preventDefault
0294                  * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0295                  */
0296                 public final static Mid preventDefault  = id("preventDefault" );
0297                 /**
0298                  * <p>An <b>internal</b> static field defining a member ID of the field name and
0299                  * used internally to define a member of the same name.</p>
0300                  * @since 1.0
0301                  * @see DOM2Event.Event.Prototype#stopPropagation
0302                  * @see DOM2Event.Event.Prototype.Member#stopPropagation
0303                  * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0304                  */
0305                 public final static Mid stopPropagation = id("stopPropagation");
0306             }
0307             /**
0308              * <p>An <b>opaque</b> class representing members of its enclosing <b>opaque</b> type.</p>
0309              * <p>Note that, this class is <b>opaque</b> but its constructors are all <b>internal</b>. 
0310              * This class and the subclasses of this class are used to declare either <b>opaque</b> 
0311              * <tt>public</tt> instance fields of the opaque type {@link js.Var.Member} or the 
0312              * <b>opaque</b> <tt>public</tt> static fields of other <b>opaque</b> types while their 
0313              * constructors are used to define the fields inside <b>opaque</b> classes. Under 
0314              * either circumstance, the field names must be exactly same as the member names, as 
0315              * the <b>opaque</b> fields of <b>opaque</b> types are resolved by re-compilers directly 
0316              * based on the field names.</p>
0317              *
0318              * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.jscripter.org" target="_blank">http://www.jscripter.org</a>
0319              * 
0320              * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be created
0321              * in the target codes. Re-compilers must exit with error on operations accessing that kind 
0322              * of class objects.
0323              * Re-compilers must resolve an <b>opaque</b> instance field declared by this class in
0324              * {@link js.Var.Member} or its subclasses to the JavaScript identifier: 
0325              * <pre>q.m</pre>
0326              * where <tt>m</tt> is the identifier of the field name and <tt>q</tt> is the identifier
0327              * resolved from the instance of the enclosing member. Re-compilers must resolve an 
0328              * <b>opaque</b> static field declared by this class in <b>opaque</b> types other than 
0329              * {@link js.Var.Member} and its subclasses to the JavaScript identifier: 
0330              * <pre>m</pre>
0331              * where <tt>m</tt> is the identifier of the field name. And re-compilers must report
0332              * error on the access to <b>opaque</b> fields declared by this class under any other 
0333              * circumstances.
0334              */
0335             public static class Member extends JsObject.Member
0336             {
0337                 /**
0338                  * <p>Internally constructs a member based on a qualifying member.</p>
0339                  * <p>This constructor is <b>internal</b> and only called inside of <b>opaque</b>
0340                  * or <b>internal</b> classes or class members.</p>
0341                  * <p>Note that, this constructor is <b>internal</b> but its declaring class is
0342                  * <b>opaque</b>. This constructor is used to define <b>opaque</b> instance fields 
0343                  * declared in the declaring class of this constructor itself or its subclasses. 
0344                  * Under this circumstance, the field names must be exactly same as the member 
0345                  * names, as the <b>opaque</b> instance fields of the <b>opaque</b> type 
0346                  * {@link js.Var.Member} or its subclasses are resolved by re-compilers directly
0347                  * to their names appending to the name resolved from the specified qualifying 
0348                  * member with a dot in between.</p>
0349                  * @param q A qualifying member
0350                  * @param mid The ID of the member to construct
0351                  * @since 1.0
0352                  * @javascript Re-compilers must report error on the invocation to an <b>internal</b> constructor.
0353                  */
0354                 public Member(JsObject.Member q, Mid mid) {
0355                     super(q, mid);
0356                 }
0357                 /**
0358                  * <p>Internally constructs a member without a qualifying member.</p>
0359                  * <p>This constructor is <b>internal</b> and only called inside of <b>opaque</b>
0360                  * or <b>internal</b> classes or class members.</p>
0361                  * <p>Note that, this constructor is <b>internal</b> but its declaring class is
0362                  * <b>opaque</b>. This constructor is used to define <b>opaque</b> static fields, 
0363                  * declared in <b>opaque</b> types other than the declaring class of this constructor 
0364                  * itself and its subclasses. Under this circumstance, the field names must be
0365                  * exactly same as the member names, as the <b>opaque</b> static fields of <b>opaque</b>
0366                  * types are generally resolved by re-compilers directly to identifiers of their names.</p>
0367                  * @param mid The ID of the member to construct
0368                  * @since 1.0
0369                  * @javascript Re-compilers must report error on the invocation to an <b>internal</b> constructor.
0370                  */
0371                 public Member(Mid mid) {
0372                     super(mid);
0373                 }
0374                 @Override
0375                 /**
0376                  * <p>Evaluates the property, represented by the current member instance, of the
0377                  * argument object.</p>
0378                  * @param o The argument object
0379                  * @return The value of the current member based on the object argument.
0380                  * @since 1.0
0381                  * @javascript Re-compilers must convert the instance invocation of this method into
0382                  * the JavaScript expression: 
0383                  * <pre>o.m</pre>
0384                  * where <tt>m</tt> is the identifier name resolved from the current member
0385                  * instance of the invocation.
0386                  */
0387                 public Prototype with(ObjectLike o) {
0388                     return new Prototype(super.with(o));
0389                 }
0390 
0391                 /**
0392                  * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0393                  * name of this field, qualified by the current member instance of the field, and 
0394                  * to access the property of the name on an object.</p>
0395                  * @since 1.0
0396                  * @see JsEvent#valueOf()
0397                  * @javascript Re-compilers must resolve the member of this instance field to the
0398                  * identifier of the field name appending to the identifier resolved from its 
0399                  * qualifying member with a dot in between.
0400                  */
0401                 public final JsFunction.Member<JsEvent> valueOf = new JsFunction.Member<JsEvent>(this, Members.valueOf);
0402                 /**
0403                  * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0404                  * name of this field, qualified by the current member instance of the field, and 
0405                  * to access the property of the name on an object.</p>
0406                  * @since 1.0
0407                  * @see JsEvent#initEvent(String, Boolean, Boolean)
0408                  * @javascript Re-compilers must resolve the member of this instance field to the
0409                  * identifier of the field name appending to the identifier resolved from its 
0410                  * qualifying member with a dot in between.
0411                  */
0412                 public final JsFunction.Member<?> initEvent = new JsFunction.Member<java.lang.Object>(this, Members.initEvent);
0413                 /**
0414                  * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0415                  * name of this field, qualified by the current member instance of the field, and 
0416                  * to access the property of the name on an object.</p>
0417                  * @since 1.0
0418                  * @see JsEvent#preventDefault()
0419                  * @javascript Re-compilers must resolve the member of this instance field to the
0420                  * identifier of the field name appending to the identifier resolved from its 
0421                  * qualifying member with a dot in between.
0422                  */
0423                 public final JsFunction.Member<?> preventDefault = new JsFunction.Member<java.lang.Object>(this, Members.preventDefault);
0424                 /**
0425                  * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0426                  * name of this field, qualified by the current member instance of the field, and 
0427                  * to access the property of the name on an object.</p>
0428                  * @since 1.0
0429                  * @see JsEvent#stopPropagation()
0430                  * @javascript Re-compilers must resolve the member of this instance field to the
0431                  * identifier of the field name appending to the identifier resolved from its 
0432                  * qualifying member with a dot in between.
0433                  */
0434                 public final JsFunction.Member<?> stopPropagation = new JsFunction.Member<java.lang.Object>(this, Members.stopPropagation);
0435             }
0436 
0437             /**
0438              * <p>Casts an <b>opaque</b> object to the current <b>opaque</b> type by wrapping it
0439              * with the wrapping constructor.</p>
0440              * @param var The argument of an <b>opaque</b> object.
0441              * @since 1.0
0442              * @javascript Re-compilers must ignore the construction operation of this constructor,
0443              * that is, replacing it with its only argument.
0444              */
0445             public Prototype(JsObject var) {
0446                 super(var(var, (JsFunction<?>)null));
0447             }
0448 
0449             /**
0450              * <p>An <b>opaque</b> static field defining a member that is named by the field name
0451              * without a qualifying member and to access the property of the name on an object.</p>
0452              * @since 1.0
0453              * @see JsEvent#valueOf()
0454              * @javascript Re-compilers must resolve the member of this static field to the
0455              * identifier of the field name.
0456              */
0457             public static final JsFunction.Member<JsEvent> valueOf = new JsFunction.Member<JsEvent>(Members.valueOf);
0458             /**
0459              * <p>An <b>opaque</b> static field defining a member that is named by the field name
0460              * without a qualifying member and to access the property of the name on an object.</p>
0461              * @since 1.0
0462              * @see JsEvent#initEvent(String, Boolean, Boolean)
0463              * @javascript Re-compilers must resolve the member of this static field to the
0464              * identifier of the field name.
0465              */
0466             public static final JsFunction.Member<?> initEvent = new JsFunction.Member<java.lang.Object>(Members.initEvent);
0467             /**
0468              * <p>An <b>opaque</b> static field defining a member that is named by the field name
0469              * without a qualifying member and to access the property of the name on an object.</p>
0470              * @since 1.0
0471              * @see JsEvent#preventDefault()
0472              * @javascript Re-compilers must resolve the member of this static field to the
0473              * identifier of the field name.
0474              */
0475             public static final JsFunction.Member<?> preventDefault = new JsFunction.Member<java.lang.Object>(Members.preventDefault);
0476             /**
0477              * <p>An <b>opaque</b> static field defining a member that is named by the field name
0478              * without a qualifying member and to access the property of the name on an object.</p>
0479              * @since 1.0
0480              * @see JsEvent#stopPropagation()
0481              * @javascript Re-compilers must resolve the member of this static field to the
0482              * identifier of the field name.
0483              */
0484             public static final JsFunction.Member<?> stopPropagation = new JsFunction.Member<java.lang.Object>(Members.stopPropagation);
0485         }
0486     }
0487 
0488     /**
0489      * <p>An <b>opaque</b> class representing the global <tt>UIEvent</tt> class of JavaScript.</p>
0490      *
0491      * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.jscripter.org" target="_blank">http://www.jscripter.org</a>
0492      * 
0493      * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be
0494      * generated into the target codes. Re-compilers must exit with error on the operations of
0495      * accessing that kind of class objects.
0496      * The <tt>checkcast</tt> operation to the class literal of this interface must be ignored
0497      * and <tt>instanceof</tt> to it always <tt>true</tt>.
0498      */
0499     public class UIEvent extends JsClass
0500     {
0501         /**
0502          * <p>An <b>opaque</b> class representing members of its enclosing <b>opaque</b> type.</p>
0503          * <p>Note that, this class is <b>opaque</b> but its constructors are all <b>internal</b>. 
0504          * This class and the subclasses of this class are used to declare either <b>opaque</b> 
0505          * <tt>public</tt> instance fields of the opaque type {@link js.Var.Member} or the 
0506          * <b>opaque</b> <tt>public</tt> static fields of other <b>opaque</b> types while their 
0507          * constructors are used to define the fields inside <b>opaque</b> classes. Under 
0508          * either circumstance, the field names must be exactly same as the member names, as 
0509          * the <b>opaque</b> fields of <b>opaque</b> types are resolved by re-compilers directly 
0510          * based on the field names.</p>
0511          *
0512          * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.jscripter.org" target="_blank">http://www.jscripter.org</a>
0513          * 
0514          * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be created
0515          * in the target codes. Re-compilers must exit with error on operations accessing that kind 
0516          * of class objects.
0517          * Re-compilers must resolve an <b>opaque</b> instance field declared by this class in
0518          * {@link js.Var.Member} or its subclasses to the JavaScript identifier: 
0519          * <pre>q.m</pre>
0520          * where <tt>m</tt> is the identifier of the field name and <tt>q</tt> is the identifier
0521          * resolved from the instance of the enclosing member. Re-compilers must resolve an 
0522          * <b>opaque</b> static field declared by this class in <b>opaque</b> types other than 
0523          * {@link js.Var.Member} and its subclasses to the JavaScript identifier: 
0524          * <pre>m</pre>
0525          * where <tt>m</tt> is the identifier of the field name. And re-compilers must report
0526          * error on the access to <b>opaque</b> fields declared by this class under any other 
0527          * circumstances.
0528          */
0529         public static class Member extends JsClass.Member
0530         {
0531             public Member(JsObject.Member q, Mid mid) {
0532                 super(q, mid);
0533             }
0534             public Member(Mid mid) {
0535                 super(mid);
0536             }
0537             @Override
0538             /**
0539              * <p>Evaluates the property, represented by the current member instance, of the
0540              * argument object.</p>
0541              * @param o The argument object
0542              * @return The value of the current member based on the object argument.
0543              * @since 1.0
0544              * @javascript Re-compilers must convert the instance invocation of this method into
0545              * the JavaScript expression: 
0546              * <pre>o.m</pre>
0547              * where <tt>m</tt> is the identifier name resolved from the current member
0548              * instance of the invocation.
0549              */
0550             public UIEvent with(ObjectLike o) {
0551                 return new UIEvent(super.with(o));
0552             }
0553             @Override
0554             /**
0555              * <p>Evaluates a property, represented by the current member instance, of the
0556              * JavaScript global object, that is, evaluates the member to a global identifier.</p>
0557              * @return The value of the current member based on the JavaScript global object.
0558              * @since 1.0
0559              * @javascript Re-compilers must convert the instance invocation of this method into
0560              * the JavaScript expression: 
0561              * <pre>m</pre>
0562              * where <tt>m</tt> is the identifier name resolved from the current member
0563              * instance of the invocation.
0564              */
0565             public UIEvent with() {
0566                 return with(Js.win());
0567             }
0568 
0569             /**
0570              * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0571              * name of this field, qualified by the current member instance of the field, and 
0572              * to access the property of the name on an object.</p>
0573              * @since 1.0
0574              * @javascript Re-compilers must resolve the member of this instance field to the
0575              * identifier of the field name appending to the identifier resolved from its 
0576              * qualifying member with a dot in between.
0577              */
0578             public final Prototype.Member prototype = new Prototype.Member(this, Members.prototype);
0579         }
0580 
0581         /**
0582          * <p>Casts an <b>opaque</b> object to the current <b>opaque</b> type by wrapping it
0583          * with the wrapping constructor.</p>
0584          * @param var The argument of an <b>opaque</b> object.
0585          * @since 1.0
0586          * @javascript Re-compilers must ignore the construction operation of this constructor,
0587          * that is, replacing it with its only argument.
0588          */
0589         public UIEvent(JsObject var) {
0590             super(var(var, (JsFunction<?>)null));
0591         }
0592 
0593         /**
0594          * <p>An <b>opaque</b> static field defining a member that is named by the field name
0595          * without a qualifying member and to access the property of the name on an object.</p>
0596          * @since 1.0
0597          * @javascript Re-compilers must resolve the member of this static field to the
0598          * identifier of the field name.
0599          */
0600         public static final Prototype.Member prototype = new Prototype.Member(Members.prototype);
0601 
0602         /**
0603          * <p>An <b>opaque</b> class representing the prototype of the enclosing global
0604          * class of JavaScript.</p>
0605          *
0606          * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.jscripter.org" target="_blank">http://www.jscripter.org</a>
0607          * 
0608          * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be
0609          * generated into the target codes. Re-compilers must exit with error on the operations of
0610          * accessing that kind of class objects.
0611          * The <tt>checkcast</tt> operation to the class literal of this interface must be ignored
0612          * and <tt>instanceof</tt> to it always <tt>true</tt>.
0613          */
0614         public static class Prototype extends JsEvent
0615         {
0616             /**
0617              * <p>An <b>internal</b> class containing membership data for its enclosing
0618              * opaque class.</p>
0619              * <p>This class is only used inside of <b>opaque</b> or <b>internal</b> classes or
0620              * class members.</p>
0621              *
0622              * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.jscripter.org" target="_blank">http://www.jscripter.org</a>
0623              * 
0624              * @javascript Re-compilers must report error on resolving an <b>internal</b> class.
0625              */
0626             protected static abstract class Members extends JsEvent.Members
0627             {
0628                 /**
0629                  * <p>An <b>internal</b> static field defining a member ID of the field name and
0630                  * used internally to define a member of the same name.</p>
0631                  * @since 1.0
0632                  * @see DOM2Event.UIEvent.Prototype#initUIEvent
0633                  * @see DOM2Event.UIEvent.Prototype.Member#initUIEvent
0634                  * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0635                  */
0636                 public final static Mid initUIEvent = id("initUIEvent");
0637             }
0638             /**
0639              * <p>An <b>opaque</b> class representing members of its enclosing <b>opaque</b> type.</p>
0640              * <p>Note that, this class is <b>opaque</b> but its constructors are all <b>internal</b>. 
0641              * This class and the subclasses of this class are used to declare either <b>opaque</b> 
0642              * <tt>public</tt> instance fields of the opaque type {@link js.Var.Member} or the 
0643              * <b>opaque</b> <tt>public</tt> static fields of other <b>opaque</b> types while their 
0644              * constructors are used to define the fields inside <b>opaque</b> classes. Under 
0645              * either circumstance, the field names must be exactly same as the member names, as 
0646              * the <b>opaque</b> fields of <b>opaque</b> types are resolved by re-compilers directly 
0647              * based on the field names.</p>
0648              *
0649              * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.jscripter.org" target="_blank">http://www.jscripter.org</a>
0650              * 
0651              * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be created
0652              * in the target codes. Re-compilers must exit with error on operations accessing that kind 
0653              * of class objects.
0654              * Re-compilers must resolve an <b>opaque</b> instance field declared by this class in
0655              * {@link js.Var.Member} or its subclasses to the JavaScript identifier: 
0656              * <pre>q.m</pre>
0657              * where <tt>m</tt> is the identifier of the field name and <tt>q</tt> is the identifier
0658              * resolved from the instance of the enclosing member. Re-compilers must resolve an 
0659              * <b>opaque</b> static field declared by this class in <b>opaque</b> types other than 
0660              * {@link js.Var.Member} and its subclasses to the JavaScript identifier: 
0661              * <pre>m</pre>
0662              * where <tt>m</tt> is the identifier of the field name. And re-compilers must report
0663              * error on the access to <b>opaque</b> fields declared by this class under any other 
0664              * circumstances.
0665              */
0666             public static class Member extends JsEvent.Member
0667             {
0668                 /**
0669                  * <p>Internally constructs a member based on a qualifying member.</p>
0670                  * <p>This constructor is <b>internal</b> and only called inside of <b>opaque</b>
0671                  * or <b>internal</b> classes or class members.</p>
0672                  * <p>Note that, this constructor is <b>internal</b> but its declaring class is
0673                  * <b>opaque</b>. This constructor is used to define <b>opaque</b> instance fields 
0674                  * declared in the declaring class of this constructor itself or its subclasses. 
0675                  * Under this circumstance, the field names must be exactly same as the member 
0676                  * names, as the <b>opaque</b> instance fields of the <b>opaque</b> type 
0677                  * {@link js.Var.Member} or its subclasses are resolved by re-compilers directly
0678                  * to their names appending to the name resolved from the specified qualifying 
0679                  * member with a dot in between.</p>
0680                  * @param q A qualifying member
0681                  * @param mid The ID of the member to construct
0682                  * @since 1.0
0683                  * @javascript Re-compilers must report error on the invocation to an <b>internal</b> constructor.
0684                  */
0685                 public Member(JsObject.Member q, Mid mid) {
0686                     super(q, mid);
0687                 }
0688                 /**
0689                  * <p>Internally constructs a member without a qualifying member.</p>
0690                  * <p>This constructor is <b>internal</b> and only called inside of <b>opaque</b>
0691                  * or <b>internal</b> classes or class members.</p>
0692                  * <p>Note that, this constructor is <b>internal</b> but its declaring class is
0693                  * <b>opaque</b>. This constructor is used to define <b>opaque</b> static fields, 
0694                  * declared in <b>opaque</b> types other than the declaring class of this constructor 
0695                  * itself and its subclasses. Under this circumstance, the field names must be
0696                  * exactly same as the member names, as the <b>opaque</b> static fields of <b>opaque</b>
0697                  * types are generally resolved by re-compilers directly to identifiers of their names.</p>
0698                  * @param mid The ID of the member to construct
0699                  * @since 1.0
0700                  * @javascript Re-compilers must report error on the invocation to an <b>internal</b> constructor.
0701                  */
0702                 public Member(Mid mid) {
0703                     super(mid);
0704                 }
0705                 @Override
0706                 /**
0707                  * <p>Evaluates the property, represented by the current member instance, of the
0708                  * argument object.</p>
0709                  * @param o The argument object
0710                  * @return The value of the current member based on the object argument.
0711                  * @since 1.0
0712                  * @javascript Re-compilers must convert the instance invocation of this method into
0713                  * the JavaScript expression: 
0714                  * <pre>o.m</pre>
0715                  * where <tt>m</tt> is the identifier name resolved from the current member
0716                  * instance of the invocation.
0717                  */
0718                 public Prototype with(ObjectLike o) {
0719                     return new Prototype(super.with(o));
0720                 }
0721 
0722                 /**
0723                  * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0724                  * name of this field, qualified by the current member instance of the field, and 
0725                  * to access the property of the name on an object.</p>
0726                  * @since 1.0
0727                  * @see JsUIEvent#valueOf()
0728                  * @javascript Re-compilers must resolve the member of this instance field to the
0729                  * identifier of the field name appending to the identifier resolved from its 
0730                  * qualifying member with a dot in between.
0731                  */
0732                 public final JsFunction.Member<JsUIEvent> valueOf = new JsFunction.Member<JsUIEvent>(this, Members.valueOf);
0733                 /**
0734                  * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0735                  * name of this field, qualified by the current member instance of the field, and 
0736                  * to access the property of the name on an object.</p>
0737                  * @since 1.0
0738                  * @see JsUIEvent#initUIEvent(String, Boolean, Boolean, JsWindow, Long)
0739                  * @javascript Re-compilers must resolve the member of this instance field to the
0740                  * identifier of the field name appending to the identifier resolved from its 
0741                  * qualifying member with a dot in between.
0742                  */
0743                 public final JsFunction.Member<?> initUIEvent = new JsFunction.Member<java.lang.Object>(this, Members.initUIEvent);
0744             }
0745 
0746             /**
0747              * <p>Casts an <b>opaque</b> object to the current <b>opaque</b> type by wrapping it
0748              * with the wrapping constructor.</p>
0749              * @param var The argument of an <b>opaque</b> object.
0750              * @since 1.0
0751              * @javascript Re-compilers must ignore the construction operation of this constructor,
0752              * that is, replacing it with its only argument.
0753              */
0754             public Prototype(JsObject var) {
0755                 super(var(var, (JsFunction<?>)null));
0756             }
0757 
0758             /**
0759              * <p>An <b>opaque</b> static field defining a member that is named by the field name
0760              * without a qualifying member and to access the property of the name on an object.</p>
0761              * @since 1.0
0762              * @see JsUIEvent#valueOf()
0763              * @javascript Re-compilers must resolve the member of this static field to the
0764              * identifier of the field name.
0765              */
0766             public static final JsFunction.Member<JsUIEvent> valueOf = new JsFunction.Member<JsUIEvent>(Members.valueOf);
0767             /**
0768              * <p>An <b>opaque</b> static field defining a member that is named by the field name
0769              * without a qualifying member and to access the property of the name on an object.</p>
0770              * @since 1.0
0771              * @see JsUIEvent#initUIEvent(String, Boolean, Boolean, JsWindow, Long)
0772              * @javascript Re-compilers must resolve the member of this static field to the
0773              * identifier of the field name.
0774              */
0775             public static final JsFunction.Member<?> initUIEvent = new JsFunction.Member<java.lang.Object>(Members.initUIEvent);
0776         }
0777     }
0778 
0779     /**
0780      * <p>An <b>opaque</b> class representing the global <tt>KeyEvent</tt> class of JavaScript.</p>
0781      *
0782      * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.jscripter.org" target="_blank">http://www.jscripter.org</a>
0783      * 
0784      * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be
0785      * generated into the target codes. Re-compilers must exit with error on the operations of
0786      * accessing that kind of class objects.
0787      * The <tt>checkcast</tt> operation to the class literal of this interface must be ignored
0788      * and <tt>instanceof</tt> to it always <tt>true</tt>.
0789      */
0790     public class KeyEvent extends JsClass
0791     {
0792         /**
0793          * <p>An <b>opaque</b> class representing members of its enclosing <b>opaque</b> type.</p>
0794          * <p>Note that, this class is <b>opaque</b> but its constructors are all <b>internal</b>. 
0795          * This class and the subclasses of this class are used to declare either <b>opaque</b> 
0796          * <tt>public</tt> instance fields of the opaque type {@link js.Var.Member} or the 
0797          * <b>opaque</b> <tt>public</tt> static fields of other <b>opaque</b> types while their 
0798          * constructors are used to define the fields inside <b>opaque</b> classes. Under 
0799          * either circumstance, the field names must be exactly same as the member names, as 
0800          * the <b>opaque</b> fields of <b>opaque</b> types are resolved by re-compilers directly 
0801          * based on the field names.</p>
0802          *
0803          * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.jscripter.org" target="_blank">http://www.jscripter.org</a>
0804          * 
0805          * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be created
0806          * in the target codes. Re-compilers must exit with error on operations accessing that kind 
0807          * of class objects.
0808          * Re-compilers must resolve an <b>opaque</b> instance field declared by this class in
0809          * {@link js.Var.Member} or its subclasses to the JavaScript identifier: 
0810          * <pre>q.m</pre>
0811          * where <tt>m</tt> is the identifier of the field name and <tt>q</tt> is the identifier
0812          * resolved from the instance of the enclosing member. Re-compilers must resolve an 
0813          * <b>opaque</b> static field declared by this class in <b>opaque</b> types other than 
0814          * {@link js.Var.Member} and its subclasses to the JavaScript identifier: 
0815          * <pre>m</pre>
0816          * where <tt>m</tt> is the identifier of the field name. And re-compilers must report
0817          * error on the access to <b>opaque</b> fields declared by this class under any other 
0818          * circumstances.
0819          */
0820         public static class Member extends JsClass.Member
0821         {
0822             public Member(JsObject.Member q, Mid mid) {
0823                 super(q, mid);
0824             }
0825             public Member(Mid mid) {
0826                 super(mid);
0827             }
0828             @Override
0829             /**
0830              * <p>Evaluates the property, represented by the current member instance, of the
0831              * argument object.</p>
0832              * @param o The argument object
0833              * @return The value of the current member based on the object argument.
0834              * @since 1.0
0835              * @javascript Re-compilers must convert the instance invocation of this method into
0836              * the JavaScript expression: 
0837              * <pre>o.m</pre>
0838              * where <tt>m</tt> is the identifier name resolved from the current member
0839              * instance of the invocation.
0840              */
0841             public KeyEvent with(ObjectLike o) {
0842                 return new KeyEvent(super.with(o));
0843             }
0844             @Override
0845             /**
0846              * <p>Evaluates a property, represented by the current member instance, of the
0847              * JavaScript global object, that is, evaluates the member to a global identifier.</p>
0848              * @return The value of the current member based on the JavaScript global object.
0849              * @since 1.0
0850              * @javascript Re-compilers must convert the instance invocation of this method into
0851              * the JavaScript expression: 
0852              * <pre>m</pre>
0853              * where <tt>m</tt> is the identifier name resolved from the current member
0854              * instance of the invocation.
0855              */
0856             public KeyEvent with() {
0857                 return with(Js.win());
0858             }
0859 
0860             /**
0861              * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0862              * name of this field, qualified by the current member instance of the field, and 
0863              * to access the property of the name on an object.</p>
0864              * @since 1.0
0865              * @javascript Re-compilers must resolve the member of this instance field to the
0866              * identifier of the field name appending to the identifier resolved from its 
0867              * qualifying member with a dot in between.
0868              */
0869             public final Prototype.Member prototype = new Prototype.Member(this, Members.prototype);
0870         }
0871 
0872         /**
0873          * <p>Casts an <b>opaque</b> object to the current <b>opaque</b> type by wrapping it
0874          * with the wrapping constructor.</p>
0875          * @param var The argument of an <b>opaque</b> object.
0876          * @since 1.0
0877          * @javascript Re-compilers must ignore the construction operation of this constructor,
0878          * that is, replacing it with its only argument.
0879          */
0880         public KeyEvent(JsObject var) {
0881             super(var(var, (JsFunction<?>)null));
0882         }
0883 
0884         /**
0885          * <p>An <b>opaque</b> static field defining a member that is named by the field name
0886          * without a qualifying member and to access the property of the name on an object.</p>
0887          * @since 1.0
0888          * @javascript Re-compilers must resolve the member of this static field to the
0889          * identifier of the field name.
0890          */
0891         public static final Prototype.Member prototype = new Prototype.Member(Members.prototype);
0892 
0893         /**
0894          * <p>An <b>opaque</b> class representing the prototype of the enclosing global
0895          * class of JavaScript.</p>
0896          *
0897          * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.jscripter.org" target="_blank">http://www.jscripter.org</a>
0898          * 
0899          * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be
0900          * generated into the target codes. Re-compilers must exit with error on the operations of
0901          * accessing that kind of class objects.
0902          * The <tt>checkcast</tt> operation to the class literal of this interface must be ignored
0903          * and <tt>instanceof</tt> to it always <tt>true</tt>.
0904          */
0905         public static class Prototype extends JsUIEvent
0906         {
0907             /**
0908              * <p>An <b>opaque</b> class representing members of its enclosing <b>opaque</b> type.</p>
0909              * <p>Note that, this class is <b>opaque</b> but its constructors are all <b>internal</b>. 
0910              * This class and the subclasses of this class are used to declare either <b>opaque</b> 
0911              * <tt>public</tt> instance fields of the opaque type {@link js.Var.Member} or the 
0912              * <b>opaque</b> <tt>public</tt> static fields of other <b>opaque</b> types while their 
0913              * constructors are used to define the fields inside <b>opaque</b> classes. Under 
0914              * either circumstance, the field names must be exactly same as the member names, as 
0915              * the <b>opaque</b> fields of <b>opaque</b> types are resolved by re-compilers directly 
0916              * based on the field names.</p>
0917              *
0918              * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.jscripter.org" target="_blank">http://www.jscripter.org</a>
0919              * 
0920              * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be created
0921              * in the target codes. Re-compilers must exit with error on operations accessing that kind 
0922              * of class objects.
0923              * Re-compilers must resolve an <b>opaque</b> instance field declared by this class in
0924              * {@link js.Var.Member} or its subclasses to the JavaScript identifier: 
0925              * <pre>q.m</pre>
0926              * where <tt>m</tt> is the identifier of the field name and <tt>q</tt> is the identifier
0927              * resolved from the instance of the enclosing member. Re-compilers must resolve an 
0928              * <b>opaque</b> static field declared by this class in <b>opaque</b> types other than 
0929              * {@link js.Var.Member} and its subclasses to the JavaScript identifier: 
0930              * <pre>m</pre>
0931              * where <tt>m</tt> is the identifier of the field name. And re-compilers must report
0932              * error on the access to <b>opaque</b> fields declared by this class under any other 
0933              * circumstances.
0934              */
0935             public static class Member extends JsUIEvent.Member
0936             {
0937                 /**
0938                  * <p>Internally constructs a member based on a qualifying member.</p>
0939                  * <p>This constructor is <b>internal</b> and only called inside of <b>opaque</b>
0940                  * or <b>internal</b> classes or class members.</p>
0941                  * <p>Note that, this constructor is <b>internal</b> but its declaring class is
0942                  * <b>opaque</b>. This constructor is used to define <b>opaque</b> instance fields 
0943                  * declared in the declaring class of this constructor itself or its subclasses. 
0944                  * Under this circumstance, the field names must be exactly same as the member 
0945                  * names, as the <b>opaque</b> instance fields of the <b>opaque</b> type 
0946                  * {@link js.Var.Member} or its subclasses are resolved by re-compilers directly
0947                  * to their names appending to the name resolved from the specified qualifying 
0948                  * member with a dot in between.</p>
0949                  * @param q A qualifying member
0950                  * @param mid The ID of the member to construct
0951                  * @since 1.0
0952                  * @javascript Re-compilers must report error on the invocation to an <b>internal</b> constructor.
0953                  */
0954                 public Member(JsObject.Member q, Mid mid) {
0955                     super(q, mid);
0956                 }
0957                 /**
0958                  * <p>Internally constructs a member without a qualifying member.</p>
0959                  * <p>This constructor is <b>internal</b> and only called inside of <b>opaque</b>
0960                  * or <b>internal</b> classes or class members.</p>
0961                  * <p>Note that, this constructor is <b>internal</b> but its declaring class is
0962                  * <b>opaque</b>. This constructor is used to define <b>opaque</b> static fields, 
0963                  * declared in <b>opaque</b> types other than the declaring class of this constructor 
0964                  * itself and its subclasses. Under this circumstance, the field names must be
0965                  * exactly same as the member names, as the <b>opaque</b> static fields of <b>opaque</b>
0966                  * types are generally resolved by re-compilers directly to identifiers of their names.</p>
0967                  * @param mid The ID of the member to construct
0968                  * @since 1.0
0969                  * @javascript Re-compilers must report error on the invocation to an <b>internal</b> constructor.
0970                  */
0971                 public Member(Mid mid) {
0972                     super(mid);
0973                 }
0974                 @Override
0975                 /**
0976                  * <p>Evaluates the property, represented by the current member instance, of the
0977                  * argument object.</p>
0978                  * @param o The argument object
0979                  * @return The value of the current member based on the object argument.
0980                  * @since 1.0
0981                  * @javascript Re-compilers must convert the instance invocation of this method into
0982                  * the JavaScript expression: 
0983                  * <pre>o.m</pre>
0984                  * where <tt>m</tt> is the identifier name resolved from the current member
0985                  * instance of the invocation.
0986                  */
0987                 public Prototype with(ObjectLike o) {
0988                     return new Prototype(super.with(o));
0989                 }
0990 
0991                 /**
0992                  * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0993                  * name of this field, qualified by the current member instance of the field, and 
0994                  * to access the property of the name on an object.</p>
0995                  * @since 1.0
0996                  * @see JsKeyEvent#valueOf()
0997                  * @javascript Re-compilers must resolve the member of this instance field to the
0998                  * identifier of the field name appending to the identifier resolved from its 
0999                  * qualifying member with a dot in between.
1000                  */
1001                 public final JsFunction.Member<JsKeyEvent> valueOf = new JsFunction.Member<JsKeyEvent>(this, Members.valueOf);
1002             }
1003 
1004             /**
1005              * <p>Casts an <b>opaque</b> object to the current <b>opaque</b> type by wrapping it
1006              * with the wrapping constructor.</p>
1007              * @param var The argument of an <b>opaque</b> object.
1008              * @since 1.0
1009              * @javascript Re-compilers must ignore the construction operation of this constructor,
1010              * that is, replacing it with its only argument.
1011              */
1012             public Prototype(JsObject var) {
1013                 super(var(var, (JsFunction<?>)null));
1014             }
1015 
1016             /**
1017              * <p>An <b>opaque</b> static field defining a member that is named by the field name
1018              * without a qualifying member and to access the property of the name on an object.</p>
1019              * @since 1.0
1020              * @see JsKeyEvent#valueOf()
1021              * @javascript Re-compilers must resolve the member of this static field to the
1022              * identifier of the field name.
1023              */
1024             public static final JsFunction.Member<JsKeyEvent> valueOf = new JsFunction.Member<JsKeyEvent>(Members.valueOf);
1025         }
1026     }
1027     /**
1028      * <p>An <b>opaque</b> class representing the global <tt>MouseEvent</tt> class of JavaScript.</p>
1029      *
1030      * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.jscripter.org" target="_blank">http://www.jscripter.org</a>
1031      * 
1032      * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be
1033      * generated into the target codes. Re-compilers must exit with error on the operations of
1034      * accessing that kind of class objects.
1035      * The <tt>checkcast</tt> operation to the class literal of this interface must be ignored
1036      * and <tt>instanceof</tt> to it always <tt>true</tt>.
1037      */
1038     public class MouseEvent extends JsClass
1039     {
1040         /**
1041          * <p>An <b>opaque</b> class representing members of its enclosing <b>opaque</b> type.</p>
1042          * <p>Note that, this class is <b>opaque</b> but its constructors are all <b>internal</b>. 
1043          * This class and the subclasses of this class are used to declare either <b>opaque</b> 
1044          * <tt>public</tt> instance fields of the opaque type {@link js.Var.Member} or the 
1045          * <b>opaque</b> <tt>public</tt> static fields of other <b>opaque</b> types while their 
1046          * constructors are used to define the fields inside <b>opaque</b> classes. Under 
1047          * either circumstance, the field names must be exactly same as the member names, as 
1048          * the <b>opaque</b> fields of <b>opaque</b> types are resolved by re-compilers directly 
1049          * based on the field names.</p>
1050          *
1051          * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.jscripter.org" target="_blank">http://www.jscripter.org</a>
1052          * 
1053          * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be created
1054          * in the target codes. Re-compilers must exit with error on operations accessing that kind 
1055          * of class objects.
1056          * Re-compilers must resolve an <b>opaque</b> instance field declared by this class in
1057          * {@link js.Var.Member} or its subclasses to the JavaScript identifier: 
1058          * <pre>q.m</pre>
1059          * where <tt>m</tt> is the identifier of the field name and <tt>q</tt> is the identifier
1060          * resolved from the instance of the enclosing member. Re-compilers must resolve an 
1061          * <b>opaque</b> static field declared by this class in <b>opaque</b> types other than 
1062          * {@link js.Var.Member} and its subclasses to the JavaScript identifier: 
1063          * <pre>m</pre>
1064          * where <tt>m</tt> is the identifier of the field name. And re-compilers must report
1065          * error on the access to <b>opaque</b> fields declared by this class under any other 
1066          * circumstances.
1067          */
1068         public static class Member extends JsClass.Member
1069         {
1070             public Member(JsObject.Member q, Mid mid) {
1071                 super(q, mid);
1072             }
1073             public Member(Mid mid) {
1074                 super(mid);
1075             }
1076             @Override
1077             /**
1078              * <p>Evaluates the property, represented by the current member instance, of the
1079              * argument object.</p>
1080              * @param o The argument object
1081              * @return The value of the current member based on the object argument.
1082              * @since 1.0
1083              * @javascript Re-compilers must convert the instance invocation of this method into
1084              * the JavaScript expression: 
1085              * <pre>o.m</pre>
1086              * where <tt>m</tt> is the identifier name resolved from the current member
1087              * instance of the invocation.
1088              */
1089             public MouseEvent with(ObjectLike o) {
1090                 return new MouseEvent(super.with(o));
1091             }
1092             @Override
1093             /**
1094              * <p>Evaluates a property, represented by the current member instance, of the
1095              * JavaScript global object, that is, evaluates the member to a global identifier.</p>
1096              * @return The value of the current member based on the JavaScript global object.
1097              * @since 1.0
1098              * @javascript Re-compilers must convert the instance invocation of this method into
1099              * the JavaScript expression: 
1100              * <pre>m</pre>
1101              * where <tt>m</tt> is the identifier name resolved from the current member
1102              * instance of the invocation.
1103              */
1104             public MouseEvent with() {
1105                 return with(Js.win());
1106             }
1107 
1108             /**
1109              * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
1110              * name of this field, qualified by the current member instance of the field, and 
1111              * to access the property of the name on an object.</p>
1112              * @since 1.0
1113              * @javascript Re-compilers must resolve the member of this instance field to the
1114              * identifier of the field name appending to the identifier resolved from its 
1115              * qualifying member with a dot in between.
1116              */
1117             public final Prototype.Member prototype = new Prototype.Member(this, Members.prototype);
1118         }
1119 
1120         /**
1121          * <p>Casts an <b>opaque</b> object to the current <b>opaque</b> type by wrapping it
1122          * with the wrapping constructor.</p>
1123          * @param var The argument of an <b>opaque</b> object.
1124          * @since 1.0
1125          * @javascript Re-compilers must ignore the construction operation of this constructor,
1126          * that is, replacing it with its only argument.
1127          */
1128         public MouseEvent(JsObject var) {
1129             super(var(var, (JsFunction<?>)null));
1130         }
1131 
1132         /**
1133          * <p>An <b>opaque</b> static field defining a member that is named by the field name
1134          * without a qualifying member and to access the property of the name on an object.</p>
1135          * @since 1.0
1136          * @javascript Re-compilers must resolve the member of this static field to the
1137          * identifier of the field name.
1138          */
1139         public static final Prototype.Member prototype = new Prototype.Member(Members.prototype);
1140 
1141         /**
1142          * <p>An <b>opaque</b> class representing the prototype of the enclosing global
1143          * class of JavaScript.</p>
1144          *
1145          * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.jscripter.org" target="_blank">http://www.jscripter.org</a>
1146          * 
1147          * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be
1148          * generated into the target codes. Re-compilers must exit with error on the operations of
1149          * accessing that kind of class objects.
1150          * The <tt>checkcast</tt> operation to the class literal of this interface must be ignored
1151          * and <tt>instanceof</tt> to it always <tt>true</tt>.
1152          */
1153         public static class Prototype extends JsUIEvent
1154         {
1155             /**
1156              * <p>An <b>internal</b> class containing membership data for its enclosing
1157              * opaque class.</p>
1158              * <p>This class is only used inside of <b>opaque</b> or <b>internal</b> classes or
1159              * class members.</p>
1160              *
1161              * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.jscripter.org" target="_blank">http://www.jscripter.org</a>
1162              * 
1163              * @javascript Re-compilers must report error on resolving an <b>internal</b> class.
1164              */
1165             protected static abstract class Members extends JsUIEvent.Members
1166             {
1167                 /**
1168                  * <p>An <b>internal</b> static field defining a member ID of the field name and
1169                  * used internally to define a member of the same name.</p>
1170                  * @since 1.0
1171                  * @see DOM2Event.MouseEvent.Prototype#initMouseEvent
1172                  * @see DOM2Event.MouseEvent.Prototype.Member#initMouseEvent
1173                  * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
1174                  */
1175                 public final static Mid initMouseEvent = id("initMouseEvent");
1176             }
1177             /**
1178              * <p>An <b>opaque</b> class representing members of its enclosing <b>opaque</b> type.</p>
1179              * <p>Note that, this class is <b>opaque</b> but its constructors are all <b>internal</b>. 
1180              * This class and the subclasses of this class are used to declare either <b>opaque</b> 
1181              * <tt>public</tt> instance fields of the opaque type {@link js.Var.Member} or the 
1182              * <b>opaque</b> <tt>public</tt> static fields of other <b>opaque</b> types while their 
1183              * constructors are used to define the fields inside <b>opaque</b> classes. Under 
1184              * either circumstance, the field names must be exactly same as the member names, as 
1185              * the <b>opaque</b> fields of <b>opaque</b> types are resolved by re-compilers directly 
1186              * based on the field names.</p>
1187              *
1188              * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.jscripter.org" target="_blank">http://www.jscripter.org</a>
1189              * 
1190              * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be created
1191              * in the target codes. Re-compilers must exit with error on operations accessing that kind 
1192              * of class objects.
1193              * Re-compilers must resolve an <b>opaque</b> instance field declared by this class in
1194              * {@link js.Var.Member} or its subclasses to the JavaScript identifier: 
1195              * <pre>q.m</pre>
1196              * where <tt>m</tt> is the identifier of the field name and <tt>q</tt> is the identifier
1197              * resolved from the instance of the enclosing member. Re-compilers must resolve an 
1198              * <b>opaque</b> static field declared by this class in <b>opaque</b> types other than 
1199              * {@link js.Var.Member} and its subclasses to the JavaScript identifier: 
1200              * <pre>m</pre>
1201              * where <tt>m</tt> is the identifier of the field name. And re-compilers must report
1202              * error on the access to <b>opaque</b> fields declared by this class under any other 
1203              * circumstances.
1204              */
1205             public static class Member extends JsUIEvent.Member
1206             {
1207                 /**
1208                  * <p>Internally constructs a member based on a qualifying member.</p>
1209                  * <p>This constructor is <b>internal</b> and only called inside of <b>opaque</b>
1210                  * or <b>internal</b> classes or class members.</p>
1211                  * <p>Note that, this constructor is <b>internal</b> but its declaring class is
1212                  * <b>opaque</b>. This constructor is used to define <b>opaque</b> instance fields 
1213                  * declared in the declaring class of this constructor itself or its subclasses. 
1214                  * Under this circumstance, the field names must be exactly same as the member 
1215                  * names, as the <b>opaque</b> instance fields of the <b>opaque</b> type 
1216                  * {@link js.Var.Member} or its subclasses are resolved by re-compilers directly
1217                  * to their names appending to the name resolved from the specified qualifying 
1218                  * member with a dot in between.</p>
1219                  * @param q A qualifying member
1220                  * @param mid The ID of the member to construct
1221                  * @since 1.0
1222                  * @javascript Re-compilers must report error on the invocation to an <b>internal</b> constructor.
1223                  */
1224                 public Member(JsObject.Member q, Mid mid) {
1225                     super(q, mid);
1226                 }
1227                 /**
1228                  * <p>Internally constructs a member without a qualifying member.</p>
1229                  * <p>This constructor is <b>internal</b> and only called inside of <b>opaque</b>
1230                  * or <b>internal</b> classes or class members.</p>
1231                  * <p>Note that, this constructor is <b>internal</b> but its declaring class is
1232                  * <b>opaque</b>. This constructor is used to define <b>opaque</b> static fields, 
1233                  * declared in <b>opaque</b> types other than the declaring class of this constructor 
1234                  * itself and its subclasses. Under this circumstance, the field names must be
1235                  * exactly same as the member names, as the <b>opaque</b> static fields of <b>opaque</b>
1236                  * types are generally resolved by re-compilers directly to identifiers of their names.</p>
1237                  * @param mid The ID of the member to construct
1238                  * @since 1.0
1239                  * @javascript Re-compilers must report error on the invocation to an <b>internal</b> constructor.
1240                  */
1241                 public Member(Mid mid) {
1242                     super(mid);
1243                 }
1244                 @Override
1245                 /**
1246                  * <p>Evaluates the property, represented by the current member instance, of the
1247                  * argument object.</p>
1248                  * @param o The argument object
1249                  * @return The value of the current member based on the object argument.
1250                  * @since 1.0
1251                  * @javascript Re-compilers must convert the instance invocation of this method into
1252                  * the JavaScript expression: 
1253                  * <pre>o.m</pre>
1254                  * where <tt>m</tt> is the identifier name resolved from the current member
1255                  * instance of the invocation.
1256                  */
1257                 public Prototype with(ObjectLike o) {
1258                     return new Prototype(super.with(o));
1259                 }
1260 
1261                 /**
1262                  * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
1263                  * name of this field, qualified by the current member instance of the field, and 
1264                  * to access the property of the name on an object.</p>
1265                  * @since 1.0
1266                  * @see JsMouseEvent#valueOf()
1267                  * @javascript Re-compilers must resolve the member of this instance field to the
1268                  * identifier of the field name appending to the identifier resolved from its 
1269                  * qualifying member with a dot in between.
1270                  */
1271                 public final JsFunction.Member<JsMouseEvent> valueOf = new JsFunction.Member<JsMouseEvent>(this, Members.valueOf);
1272                 /**
1273                  * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
1274                  * name of this field, qualified by the current member instance of the field, and 
1275                  * to access the property of the name on an object.</p>
1276                  * @since 1.0
1277                  * @see JsMouseEvent#initMouseEvent(String, Boolean, Boolean, JsWindow, Number, Number, Number, Number, Number, Boolean, Boolean, Boolean, Boolean, Number, JsElement)
1278                  * @javascript Re-compilers must resolve the member of this instance field to the
1279                  * identifier of the field name appending to the identifier resolved from its 
1280                  * qualifying member with a dot in between.
1281                  */
1282                 public final JsFunction.Member<?> initMouseEvent = new JsFunction.Member<java.lang.Object>(this, Members.initMouseEvent);
1283             }
1284 
1285             /**
1286              * <p>Casts an <b>opaque</b> object to the current <b>opaque</b> type by wrapping it
1287              * with the wrapping constructor.</p>
1288              * @param var The argument of an <b>opaque</b> object.
1289              * @since 1.0
1290              * @javascript Re-compilers must ignore the construction operation of this constructor,
1291              * that is, replacing it with its only argument.
1292              */
1293             public Prototype(JsObject var) {
1294                 super(var(var, (JsFunction<?>)null));
1295             }
1296 
1297             /**
1298              * <p>An <b>opaque</b> static field defining a member that is named by the field name
1299              * without a qualifying member and to access the property of the name on an object.</p>
1300              * @since 1.0
1301              * @see JsMouseEvent#valueOf()
1302              * @javascript Re-compilers must resolve the member of this static field to the
1303              * identifier of the field name.
1304              */
1305             public static final JsFunction.Member<JsMouseEvent> valueOf = new JsFunction.Member<JsMouseEvent>(Members.valueOf);
1306             /**
1307              * <p>An <b>opaque</b> static field defining a member that is named by the field name
1308              * without a qualifying member and to access the property of the name on an object.</p>
1309              * @since 1.0
1310              * @see JsMouseEvent#initMouseEvent(String, Boolean, Boolean, JsWindow, Number, Number, Number, Number, Number, Boolean, Boolean, Boolean, Boolean, Number, JsElement)
1311              * @javascript Re-compilers must resolve the member of this static field to the
1312              * identifier of the field name.
1313              */
1314             public static final JsFunction.Member<?> initMouseEvent = new JsFunction.Member<java.lang.Object>(Members.initMouseEvent);
1315         }
1316     }
1317 }