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.user;
0021 
0022 import js.*;
0023 import js.core.*;
0024 
0025 /**
0026  * <p>An <b>opaque</b> class representing JavaScript client-side objects of the global 
0027  * {@link JsClient#Event} class.</p>
0028  * <p>The {@link JsEvent} object properties, identified by the members of this class, 
0029  * provide details about an event. The methods of a {@link JsEvent} object can control 
0030  * the propagation of the event. The DOM Level 2 Events standard defines a standard 
0031  * event model, which is implemented by all modern browsers except Internet Explorer, 
0032  * which defines its own, incompatible model. The members defined in this class identify 
0033  * the properties of both the standard {@link JsEvent} object and also of the IE {@link JsEvent} 
0034  * object.</p>
0035  * <p>For the standard event model, the subclasses of this class define additional 
0036  * property members that provide details pertinent to specific types of events. The IE 
0037  * event model defines a completely different set of properties for an event and does 
0038  * not define an inheritance hierarchy for different types of events, so all property 
0039  * members relevant to any type of event are defined in this single class which is used 
0040  * for events of all types.</p>
0041  * <p>Note that an {@link JsEvent} object is passed to event handler functions in the 
0042  * {@link JsWindow#event} property of the 
0043  * {@link JsWindow#window}, in the IE event 
0044  * model.</p>
0045  *
0046  * @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>
0047  *
0048  * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be
0049  * generated into the target codes. Re-compilers must exit with error on the operations of
0050  * accessing that kind of class objects.
0051  * The <tt>checkcast</tt> operation to the class literal of this interface must be ignored
0052  * and <tt>instanceof</tt> to it always <tt>true</tt>.
0053  */
0054 public class JsEvent extends JsClient.Event.Prototype
0055 {
0056     /**
0057      * A legal value for the {@link #eventPhase} property of a {@link JsEvent} object 
0058      * indicating currently the propagation of the event is in the capturing phase.
0059      * @since 1.0
0060      * @see js.dom.DOM2Event.Event#CAPTURING_PHASE
0061      * @see js.dom.DOM2Event.Event.Member#CAPTURING_PHASE
0062      */
0063     public static final int CAPTURING_PHASE = 1;
0064     /**
0065      * A legal value for the {@link #eventPhase} property of a {@link JsEvent} object 
0066      * indicating currently the propagation of the event is in the normal event 
0067      * dispatching phase.
0068      * @since 1.0
0069      * @see js.dom.DOM2Event.Event#AT_TARGET
0070      * @see js.dom.DOM2Event.Event.Member#AT_TARGET
0071      */
0072     public static final int AT_TARGET       = 2;
0073     /**
0074      * A legal value for the {@link #eventPhase} property of a {@link JsEvent} object 
0075      * indicating currently the propagation of the event is in the bubbling phase.
0076      * @since 1.0
0077      * @see js.dom.DOM2Event.Event#BUBBLING_PHASE
0078      * @see js.dom.DOM2Event.Event.Member#BUBBLING_PHASE
0079      */
0080     public static final int BUBBLING_PHASE  = 3;
0081     /**
0082      * <p>An <b>internal</b> class containing membership data for its enclosing
0083      * opaque class.</p>
0084      * <p>This class is only used inside of <b>opaque</b> or <b>internal</b> classes or
0085      * class members.</p>
0086      *
0087      * @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>
0088      * 
0089      * @javascript Re-compilers must report error on resolving an <b>internal</b> class.
0090      */
0091     protected static abstract class Members extends JsClient.Event.Prototype.Members
0092     {
0093         /**
0094          * <p>An <b>internal</b> static field defining a member ID of the field name and
0095          * used internally to define a member of the same name.</p>
0096          * @since 1.0
0097          * @see JsEvent#bubbles
0098          * @see JsEvent.Member#bubbles
0099          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0100          */
0101         public final static Mid bubbles       = id("bubbles"      );
0102         /**
0103          * <p>An <b>internal</b> static field defining a member ID of the field name and
0104          * used internally to define a member of the same name.</p>
0105          * @since 1.0
0106          * @see JsEvent#cancelable
0107          * @see JsEvent.Member#cancelable
0108          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0109          */
0110         public final static Mid cancelable    = id("cancelable"   );
0111         /**
0112          * <p>An <b>internal</b> static field defining a member ID of the field name and
0113          * used internally to define a member of the same name.</p>
0114          * @since 1.0
0115          * @see JsEvent#currentTarget
0116          * @see JsEvent.Member#currentTarget
0117          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0118          */
0119         public final static Mid currentTarget = id("currentTarget");
0120         /**
0121          * <p>An <b>internal</b> static field defining a member ID of the field name and
0122          * used internally to define a member of the same name.</p>
0123          * @since 1.0
0124          * @see JsEvent#eventPhase
0125          * @see JsEvent.Member#eventPhase
0126          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0127          */
0128         public final static Mid eventPhase    = id("eventPhase"   );
0129         /**
0130          * <p>An <b>internal</b> static field defining a member ID of the field name and
0131          * used internally to define a member of the same name.</p>
0132          * @since 1.0
0133          * @see JsEvent#target
0134          * @see JsEvent.Member#target
0135          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0136          */
0137         public final static Mid target        = id("target"       );
0138         /**
0139          * <p>An <b>internal</b> static field defining a member ID of the field name and
0140          * used internally to define a member of the same name.</p>
0141          * @since 1.0
0142          * @see JsEvent#timeStamp
0143          * @see JsEvent.Member#timeStamp
0144          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0145          */
0146         public final static Mid timeStamp     = id("timeStamp"    );
0147         /**
0148          * <p>An <b>internal</b> static field defining a member ID of the field name and
0149          * used internally to define a member of the same name.</p>
0150          * @since 1.0
0151          * @see JsEvent#type
0152          * @see JsEvent.Member#type
0153          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0154          */
0155         public final static Mid type          = id("type"         );
0156         /**
0157          * <p>An <b>internal</b> static field defining a member ID of the field name and
0158          * used internally to define a member of the same name.</p>
0159          * @since 1.0
0160          * @see JsEvent#altKey
0161          * @see JsEvent.Member#altKey
0162          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0163          */
0164         public final static Mid altKey        = id("altKey"       );
0165         /**
0166          * <p>An <b>internal</b> static field defining a member ID of the field name and
0167          * used internally to define a member of the same name.</p>
0168          * @since 1.0
0169          * @see JsEvent#button
0170          * @see JsEvent.Member#button
0171          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0172          */
0173         public final static Mid button        = id("button"       );
0174         /**
0175          * <p>An <b>internal</b> static field defining a member ID of the field name and
0176          * used internally to define a member of the same name.</p>
0177          * @since 1.0
0178          * @see JsEvent#cancelBubble
0179          * @see JsEvent.Member#cancelBubble
0180          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0181          */
0182         public final static Mid cancelBubble  = id("cancelBubble" );
0183         /**
0184          * <p>An <b>internal</b> static field defining a member ID of the field name and
0185          * used internally to define a member of the same name.</p>
0186          * @since 1.0
0187          * @see JsEvent#clientX
0188          * @see JsEvent.Member#clientX
0189          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0190          */
0191         public final static Mid clientX       = id("clientX"      );
0192         /**
0193          * <p>An <b>internal</b> static field defining a member ID of the field name and
0194          * used internally to define a member of the same name.</p>
0195          * @since 1.0
0196          * @see JsEvent#clientY
0197          * @see JsEvent.Member#clientY
0198          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0199          */
0200         public final static Mid clientY       = id("clientY"      );
0201         /**
0202          * <p>An <b>internal</b> static field defining a member ID of the field name and
0203          * used internally to define a member of the same name.</p>
0204          * @since 1.0
0205          * @see JsEvent#ctrlKey
0206          * @see JsEvent.Member#ctrlKey
0207          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0208          */
0209         public final static Mid ctrlKey       = id("ctrlKey"      );
0210         /**
0211          * <p>An <b>internal</b> static field defining a member ID of the field name and
0212          * used internally to define a member of the same name.</p>
0213          * @since 1.0
0214          * @see JsEvent#fromElement
0215          * @see JsEvent.Member#fromElement
0216          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0217          */
0218         public final static Mid fromElement   = id("fromElement"  );
0219         /**
0220          * <p>An <b>internal</b> static field defining a member ID of the field name and
0221          * used internally to define a member of the same name.</p>
0222          * @since 1.0
0223          * @see JsEvent#keyCode
0224          * @see JsEvent.Member#keyCode
0225          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0226          */
0227         public final static Mid keyCode       = id("keyCode"      );
0228         /**
0229          * <p>An <b>internal</b> static field defining a member ID of the field name and
0230          * used internally to define a member of the same name.</p>
0231          * @since 1.0
0232          * @see JsEvent#offsetX
0233          * @see JsEvent.Member#offsetX
0234          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0235          */
0236         public final static Mid offsetX       = id("offsetX"      );
0237         /**
0238          * <p>An <b>internal</b> static field defining a member ID of the field name and
0239          * used internally to define a member of the same name.</p>
0240          * @since 1.0
0241          * @see JsEvent#offsetY
0242          * @see JsEvent.Member#offsetY
0243          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0244          */
0245         public final static Mid offsetY       = id("offsetY"      );
0246         /**
0247          * <p>An <b>internal</b> static field defining a member ID of the field name and
0248          * used internally to define a member of the same name.</p>
0249          * @since 1.0
0250          * @see JsEvent#returnValue
0251          * @see JsEvent.Member#returnValue
0252          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0253          */
0254         public final static Mid returnValue   = id("returnValue"  );
0255         /**
0256          * <p>An <b>internal</b> static field defining a member ID of the field name and
0257          * used internally to define a member of the same name.</p>
0258          * @since 1.0
0259          * @see JsEvent#screenX
0260          * @see JsEvent.Member#screenX
0261          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0262          */
0263         public final static Mid screenX       = id("screenX"      );
0264         /**
0265          * <p>An <b>internal</b> static field defining a member ID of the field name and
0266          * used internally to define a member of the same name.</p>
0267          * @since 1.0
0268          * @see JsEvent#screenY
0269          * @see JsEvent.Member#screenY
0270          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0271          */
0272         public final static Mid screenY       = id("screenY"      );
0273         /**
0274          * <p>An <b>internal</b> static field defining a member ID of the field name and
0275          * used internally to define a member of the same name.</p>
0276          * @since 1.0
0277          * @see JsEvent#shiftKey
0278          * @see JsEvent.Member#shiftKey
0279          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0280          */
0281         public final static Mid shiftKey      = id("shiftKey"     );
0282         /**
0283          * <p>An <b>internal</b> static field defining a member ID of the field name and
0284          * used internally to define a member of the same name.</p>
0285          * @since 1.0
0286          * @see JsEvent#srcElement
0287          * @see JsEvent.Member#srcElement
0288          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0289          */
0290         public final static Mid srcElement    = id("srcElement"   );
0291         /**
0292          * <p>An <b>internal</b> static field defining a member ID of the field name and
0293          * used internally to define a member of the same name.</p>
0294          * @since 1.0
0295          * @see JsEvent#toElement
0296          * @see JsEvent.Member#toElement
0297          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0298          */
0299         public final static Mid toElement     = id("toElement"    );
0300         /**
0301          * <p>An <b>internal</b> static field defining a member ID of the field name and
0302          * used internally to define a member of the same name.</p>
0303          * @since 1.0
0304          * @see JsEvent#x
0305          * @see JsEvent.Member#x
0306          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0307          */
0308         public final static Mid x             = id("x"            );
0309         /**
0310          * <p>An <b>internal</b> static field defining a member ID of the field name and
0311          * used internally to define a member of the same name.</p>
0312          * @since 1.0
0313          * @see JsEvent#y
0314          * @see JsEvent.Member#y
0315          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0316          */
0317         public final static Mid y             = id("y"            );
0318         /**
0319          * <p>An <b>internal</b> static field defining a member ID of the field name and
0320          * used internally to define a member of the same name.</p>
0321          * @since 1.0
0322          * @see JsEvent#pageX
0323          * @see JsEvent.Member#pageX
0324          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0325          */
0326         public final static Mid pageX         = id("pageX"        );
0327         /**
0328          * <p>An <b>internal</b> static field defining a member ID of the field name and
0329          * used internally to define a member of the same name.</p>
0330          * @since 1.0
0331          * @see JsEvent#pageY
0332          * @see JsEvent.Member#pageY
0333          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0334          */
0335         public final static Mid pageY         = id("pageY"        );
0336         /**
0337          * <p>An <b>internal</b> static field defining a member ID of the field name and
0338          * used internally to define a member of the same name.</p>
0339          * @since 1.0
0340          * @see JsEvent#time
0341          * @see JsEvent.Member#time
0342          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0343          */
0344         public final static Mid time          = id("time"         );
0345         /**
0346          * <p>An <b>internal</b> static field defining a member ID of the field name and
0347          * used internally to define a member of the same name.</p>
0348          * @since 1.0
0349          * @see JsEvent#charCode
0350          * @see JsEvent.Member#charCode
0351          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
0352          */
0353         public final static Mid charCode      = id("charCode"     );
0354     }
0355 
0356     /**
0357      * <p>An <b>opaque</b> class representing members of its enclosing <b>opaque</b> type.</p>
0358      * <p>Note that, this class is <b>opaque</b> but its constructors are all <b>internal</b>. 
0359      * This class and the subclasses of this class are used to declare either <b>opaque</b> 
0360      * <tt>public</tt> instance fields of the opaque type {@link js.Var.Member} or the 
0361      * <b>opaque</b> <tt>public</tt> static fields of other <b>opaque</b> types while their 
0362      * constructors are used to define the fields inside <b>opaque</b> classes. Under 
0363      * either circumstance, the field names must be exactly same as the member names, as 
0364      * the <b>opaque</b> fields of <b>opaque</b> types are resolved by re-compilers directly 
0365      * based on the field names.</p>
0366      *
0367      * @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>
0368      * 
0369      * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be created
0370      * in the target codes. Re-compilers must exit with error on operations accessing that kind 
0371      * of class objects.
0372      * Re-compilers must resolve an <b>opaque</b> instance field declared by this class in
0373      * {@link js.Var.Member} or its subclasses to the JavaScript identifier: 
0374      * <pre>q.m</pre>
0375      * where <tt>m</tt> is the identifier of the field name and <tt>q</tt> is the identifier
0376      * resolved from the instance of the enclosing member. Re-compilers must resolve an 
0377      * <b>opaque</b> static field declared by this class in <b>opaque</b> types other than 
0378      * {@link js.Var.Member} and its subclasses to the JavaScript identifier: 
0379      * <pre>m</pre>
0380      * where <tt>m</tt> is the identifier of the field name. And re-compilers must report
0381      * error on the access to <b>opaque</b> fields declared by this class under any other 
0382      * circumstances.
0383      */
0384     public static class Member extends JsClient.Event.Prototype.Member
0385     {
0386         /**
0387          * <p>Internally constructs a member based on a qualifying member.</p>
0388          * <p>This constructor is <b>internal</b> and only called inside of <b>opaque</b>
0389          * or <b>internal</b> classes or class members.</p>
0390          * <p>Note that, this constructor is <b>internal</b> but its declaring class is
0391          * <b>opaque</b>. This constructor is used to define <b>opaque</b> instance fields 
0392          * declared in the declaring class of this constructor itself or its subclasses. 
0393          * Under this circumstance, the field names must be exactly same as the member 
0394          * names, as the <b>opaque</b> instance fields of the <b>opaque</b> type 
0395          * {@link js.Var.Member} or its subclasses are resolved by re-compilers directly
0396          * to their names appending to the name resolved from the specified qualifying 
0397          * member with a dot in between.</p>
0398          * @param q A qualifying member
0399          * @param mid The ID of the member to construct
0400          * @since 1.0
0401          * @javascript Re-compilers must report error on the invocation to an <b>internal</b> constructor.
0402          */
0403         public Member(JsObject.Member q, Mid mid) {
0404             super(q, mid);
0405         }
0406         /**
0407          * <p>Internally constructs a member without a qualifying member.</p>
0408          * <p>This constructor is <b>internal</b> and only called inside of <b>opaque</b>
0409          * or <b>internal</b> classes or class members.</p>
0410          * <p>Note that, this constructor is <b>internal</b> but its declaring class is
0411          * <b>opaque</b>. This constructor is used to define <b>opaque</b> static fields, 
0412          * declared in <b>opaque</b> types other than the declaring class of this constructor 
0413          * itself and its subclasses. Under this circumstance, the field names must be
0414          * exactly same as the member names, as the <b>opaque</b> static fields of <b>opaque</b>
0415          * types are generally resolved by re-compilers directly to identifiers of their names.</p>
0416          * @param mid The ID of the member to construct
0417          * @since 1.0
0418          * @javascript Re-compilers must report error on the invocation to an <b>internal</b> constructor.
0419          */
0420         public Member(Mid mid) {
0421             super(mid);
0422         }
0423         @Override
0424         /**
0425          * <p>Evaluates the property, represented by the current member instance, of the
0426          * argument object.</p>
0427          * @param o The argument object
0428          * @return The value of the current member based on the object argument.
0429          * @since 1.0
0430          * @javascript Re-compilers must convert the instance invocation of this method into
0431          * the JavaScript expression: 
0432          * <pre>o.m</pre>
0433          * where <tt>m</tt> is the identifier name resolved from the current member
0434          * instance of the invocation.
0435          */
0436         public JsEvent with(ObjectLike o) {
0437             return new JsEvent(super.with(o));
0438         }
0439 
0440         /**
0441          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0442          * name of this field, qualified by the current member instance of the field, and 
0443          * to access the property of the name on an object.</p>
0444          * <p>The property, identified by this member, of a {@link JsEvent} object 
0445          * refers to a read-only boolean value that is <tt>true<tt>, if the event is of 
0446          * a type that bubbles unless {@link JsEvent#stopPropagation()} is called on the 
0447          * event, or <tt>false</tt> otherwise.</p>
0448          * <p>The property is defined by the DOM Level 2 Events standard.</p>
0449          * @since 1.0
0450          * @javascript Re-compilers must resolve the member of this instance field to the
0451          * identifier of the field name appending to the identifier resolved from its 
0452          * qualifying member with a dot in between.
0453          */
0454         public final Value.Boolean.Member bubbles    = new Value.Boolean.Member(this, Members.bubbles   );
0455         /**
0456          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0457          * name of this field, qualified by the current member instance of the field, and 
0458          * to access the property of the name on an object.</p>
0459          * <p>The property, identified by this member, of a {@link JsEvent} object 
0460          * refers to a read-only boolean value that is <tt>true<tt>, if the the default action 
0461          * associated with the event can be canceled with {@link JsEvent#preventDefault()}, 
0462          * or <tt>false</tt> otherwise.</p>
0463          * <p>The property is defined by the DOM Level 2 Events standard.</p>
0464          * @since 1.0
0465          * @javascript Re-compilers must resolve the member of this instance field to the
0466          * identifier of the field name appending to the identifier resolved from its 
0467          * qualifying member with a dot in between.
0468          */
0469         public final Value.Boolean.Member cancelable = new Value.Boolean.Member(this, Members.cancelable);
0470         /**
0471          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0472          * name of this field, qualified by the current member instance of the field, and 
0473          * to access the property of the name on an object.</p>
0474          * <p>The property, identified by this member, of a {@link JsEvent} object is 
0475          * read-only reference to the {@link JsElement}, {@link JsDocument}, or {@link JsWindow} 
0476          * object that is currently handling this event. During capturing and bubbling, 
0477          * it is different from {@link JsEvent#target} property.</p>
0478          * <p>The property is defined by the DOM Level 2 Events standard.</p>
0479          * @since 1.0
0480          * @javascript Re-compilers must resolve the member of this instance field to the
0481          * identifier of the field name appending to the identifier resolved from its 
0482          * qualifying member with a dot in between.
0483          */
0484         public final JsObject.Member currentTarget  = new JsObject.Member(this, Members.currentTarget);
0485         /**
0486          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0487          * name of this field, qualified by the current member instance of the field, and 
0488          * to access the property of the name on an object.</p>
0489          * <p>The property, identified by this member, of a {@link JsEvent} object is 
0490          * read-only reference to the {@link JsElement}, {@link JsDocument}, or {@link JsWindow} 
0491          * object that generated the event.</p>
0492          * <p>The property is defined by the DOM Level 2 Events standard.</p>
0493          * @since 1.0
0494          * @javascript Re-compilers must resolve the member of this instance field to the
0495          * identifier of the field name appending to the identifier resolved from its 
0496          * qualifying member with a dot in between.
0497          */
0498         public final JsObject.Member target         = new JsObject.Member(this, Members.target       );
0499         /**
0500          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0501          * name of this field, qualified by the current member instance of the field, and 
0502          * to access the property of the name on an object.</p>
0503          * <p>The property, identified by this member, of a {@link JsEvent} object is 
0504          * read-only reference to a {@link JsDate} object representing the date and 
0505          * time at which the event occurred or, more precisely, at which the {@link JsEvent} 
0506          * object was created. Implementations are not required to provide valid time 
0507          * data in this field, and if they do not, the {@link JsDate#getTime()} method of 
0508          * the {@link JsDate} object should return 0.</p>
0509          * <p>The property is defined by the DOM Level 2 Events standard.</p>
0510          * @since 1.0
0511          * @javascript Re-compilers must resolve the member of this instance field to the
0512          * identifier of the field name appending to the identifier resolved from its 
0513          * qualifying member with a dot in between.
0514          */
0515         public final JsDate.Member timeStamp     = new JsDate.Member(this, Members.timeStamp);
0516         /**
0517          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0518          * name of this field, qualified by the current member instance of the field, and 
0519          * to access the property of the name on an object.</p>
0520          * <p>The property, identified by this member, of a {@link JsEvent} object 
0521          * refers to a read-only number indicating the current phase of event propagation. 
0522          * The legal value of the property is {@link JsEvent#CAPTURING_PHASE}, {@link JsEvent#AT_TARGET}, 
0523          * or {@link JsEvent#BUBBLING_PHASE} representing the capturing phase, normal event dispatch, 
0524          * and the bubbling phase respectively.</p>
0525          * <p>The property is defined by the DOM Level 2 Events standard.</p>
0526          * @since 1.0
0527          * @javascript Re-compilers must resolve the member of this instance field to the
0528          * identifier of the field name appending to the identifier resolved from its 
0529          * qualifying member with a dot in between.
0530          */
0531         public final Value.Number.Member eventPhase  = new Value.Number.Member(this, Members.eventPhase);
0532         /**
0533          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0534          * name of this field, qualified by the current member instance of the field, and 
0535          * to access the property of the name on an object.</p>
0536          * <p>The property, identified by this member, of a {@link JsEvent} object is 
0537          * read-only reference to the name of the event that the {@link JsEvent} object 
0538          * represents. This is the name under which the event handler was registered, or 
0539          * the name of the event-handler property with the leading "on" removed.</p>
0540          * <p>The property is defined by the DOM Level 2 Events standard.</p>
0541          * @since 1.0
0542          * @javascript Re-compilers must resolve the member of this instance field to the
0543          * identifier of the field name appending to the identifier resolved from its 
0544          * qualifying member with a dot in between.
0545          */
0546         public final Value.String.Member type        = new Value.String.Member(this, Members.type      );
0547         /**
0548          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0549          * name of this field, qualified by the current member instance of the field, and 
0550          * to access the property of the name on an object.</p>
0551          * <p>The property, identified by this member, of a {@link JsEvent} object is 
0552          * reference to a boolean value which tells whether the <tt>Alt</tt> key was 
0553          * held down when the event occurred.</p>
0554          * <p>Note that the property is IE-Specific.</p>
0555          * @since 1.0
0556          * @javascript Re-compilers must resolve the member of this instance field to the
0557          * identifier of the field name appending to the identifier resolved from its 
0558          * qualifying member with a dot in between.
0559          */
0560         public final Value.Boolean.Member altKey       = new Value.Boolean.Member(this, Members.altKey       );
0561         /**
0562          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0563          * name of this field, qualified by the current member instance of the field, and 
0564          * to access the property of the name on an object.</p>
0565          * <p>The property, identified by this member, of a {@link JsEvent} object is 
0566          * reference to a boolean value which determines whether the event must be stopped 
0567          * from being propagated up to containing objects.</p> 
0568          * <p>Note that the property is IE-Specific.</p>
0569          * @since 1.0
0570          * @javascript Re-compilers must resolve the member of this instance field to the
0571          * identifier of the field name appending to the identifier resolved from its 
0572          * qualifying member with a dot in between.
0573          */
0574         public final Value.Boolean.Member cancelBubble = new Value.Boolean.Member(this, Members.cancelBubble );
0575         /**
0576          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0577          * name of this field, qualified by the current member instance of the field, and 
0578          * to access the property of the name on an object.</p>
0579          * <p>The property, identified by this member, of a {@link JsEvent} object is 
0580          * reference to a boolean value which tells whether the <tt>Ctrl</tt> key was 
0581          * held down when the event occurred.</p>
0582          * <p>Note that the property is IE-Specific.</p>
0583          * @since 1.0
0584          * @javascript Re-compilers must resolve the member of this instance field to the
0585          * identifier of the field name appending to the identifier resolved from its 
0586          * qualifying member with a dot in between.
0587          */
0588         public final Value.Boolean.Member ctrlKey      = new Value.Boolean.Member(this, Members.ctrlKey      );
0589         /**
0590          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0591          * name of this field, qualified by the current member instance of the field, and 
0592          * to access the property of the name on an object.</p>
0593          * <p>The property, identified by this member, of a {@link JsEvent} object is 
0594          * reference to a boolean value. If the property is set, its value takes precedence 
0595          * over the value actually returned by the event handler. Set it to <tt>false</tt> 
0596          * to cancel the default action of the source element on which the event 
0597          * occurred.</p>
0598          * <p>Note that the property is IE-Specific.</p>
0599          * @since 1.0
0600          * @javascript Re-compilers must resolve the member of this instance field to the
0601          * identifier of the field name appending to the identifier resolved from its 
0602          * qualifying member with a dot in between.
0603          */
0604         public final Value.Boolean.Member returnValue  = new Value.Boolean.Member(this, Members.returnValue  );
0605         /**
0606          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0607          * name of this field, qualified by the current member instance of the field, and 
0608          * to access the property of the name on an object.</p>
0609          * <p>The property, identified by this member, of a {@link JsEvent} object is 
0610          * reference to a boolean value which tells whether the <tt>Shift</tt> key was 
0611          * held down when the event occurred.</p>
0612          * <p>Note that the property is IE-Specific.</p>
0613          * @since 1.0
0614          * @javascript Re-compilers must resolve the member of this instance field to the
0615          * identifier of the field name appending to the identifier resolved from its 
0616          * qualifying member with a dot in between.
0617          */
0618         public final Value.Boolean.Member shiftKey     = new Value.Boolean.Member(this, Members.shiftKey     );
0619         /**
0620          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0621          * name of this field, qualified by the current member instance of the field, and 
0622          * to access the property of the name on an object.</p>
0623          * <p>The property, identified by this member, of a {@link JsEvent} object is 
0624          * reference to the object from which the mouse pointer is moving for 
0625          * "mouseover" and "mouseout" events.</p> 
0626          * <p>Note that the property is IE-Specific.</p>
0627          * @since 1.0
0628          * @javascript Re-compilers must resolve the member of this instance field to the
0629          * identifier of the field name appending to the identifier resolved from its 
0630          * qualifying member with a dot in between.
0631          */
0632         public final JsElement.Member fromElement  = new JsElement.Member(this, Members.fromElement  );
0633         /**
0634          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0635          * name of this field, qualified by the current member instance of the field, and 
0636          * to access the property of the name on an object.</p>
0637          * <p>The property, identified by this member, of a {@link JsEvent} object is 
0638          * reference to the object into which the mouse pointer is moving for 
0639          * "mouseover" and "mouseout" events.</p> 
0640          * <p>Note that the property is IE-Specific.</p>
0641          * @since 1.0
0642          * @javascript Re-compilers must resolve the member of this instance field to the
0643          * identifier of the field name appending to the identifier resolved from its 
0644          * qualifying member with a dot in between.
0645          */
0646         public final JsElement.Member toElement    = new JsElement.Member(this, Members.toElement    );
0647         /**
0648          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0649          * name of this field, qualified by the current member instance of the field, and 
0650          * to access the property of the name on an object.</p>
0651          * <p>The property, identified by this member, of a {@link JsEvent} object is 
0652          * reference to an integer value. For mouse events, the bit mask value specifies 
0653          * which mouse button or buttons were pressed. The 1 bit is set if the left button 
0654          * was pressed; The 2 bit is set if the right button was pressed; and the 4 bit 
0655          * is set if the middle button, of a three-button mouse, was pressed.</p> 
0656          * <p>Note that the property is IE-Specific.</p>
0657          * @since 1.0
0658          * @javascript Re-compilers must resolve the member of this instance field to the
0659          * identifier of the field name appending to the identifier resolved from its 
0660          * qualifying member with a dot in between.
0661          */
0662         public final Value.Integer.Member button  = new Value.Integer.Member(this, Members.button );
0663         /**
0664          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0665          * name of this field, qualified by the current member instance of the field, and 
0666          * to access the property of the name on an object.</p>
0667          * <p>The property, identified by this member, of a {@link JsEvent} object is 
0668          * reference to an integer value representing the X-coordinate, relative to the 
0669          * web browser page, at which the event occurred.</p> 
0670          * <p>Note that the property is IE-Specific.</p>
0671          * @since 1.0
0672          * @javascript Re-compilers must resolve the member of this instance field to the
0673          * identifier of the field name appending to the identifier resolved from its 
0674          * qualifying member with a dot in between.
0675          */
0676         public final Value.Number.Member clientX = new Value.Number.Member(this, Members.clientX);
0677         /**
0678          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0679          * name of this field, qualified by the current member instance of the field, and 
0680          * to access the property of the name on an object.</p>
0681          * <p>The property, identified by this member, of a {@link JsEvent} object is 
0682          * reference to an integer value representing the Y-coordinate, relative to the 
0683          * web browser page, at which the event occurred.</p> 
0684          * <p>Note that the property is IE-Specific.</p>
0685          * @since 1.0
0686          * @javascript Re-compilers must resolve the member of this instance field to the
0687          * identifier of the field name appending to the identifier resolved from its 
0688          * qualifying member with a dot in between.
0689          */
0690         public final Value.Number.Member clientY = new Value.Number.Member(this, Members.clientY);
0691         /**
0692          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0693          * name of this field, qualified by the current member instance of the field, and 
0694          * to access the property of the name on an object.</p>
0695          * <p>The property, identified by this member, of a {@link JsEvent} object is 
0696          * reference to an integer value representing the unicode character code 
0697          * generated by the key that was struck for "keypress" events. For "keydown" 
0698          * and "keyup" events, it represents the virtual key code of the key that was 
0699          * struck. Virtual key codes may be dependent on the keyboard layout in use.</p> 
0700          * <p>Note that the property is IE-Specific.</p>
0701          * @since 1.0
0702          * @javascript Re-compilers must resolve the member of this instance field to the
0703          * identifier of the field name appending to the identifier resolved from its 
0704          * qualifying member with a dot in between.
0705          */
0706         public final Value.Integer.Member keyCode = new Value.Integer.Member(this, Members.keyCode);
0707         /**
0708          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0709          * name of this field, qualified by the current member instance of the field, and 
0710          * to access the property of the name on an object.</p>
0711          * <p>The property, identified by this member, of a {@link JsEvent} object is 
0712          * reference to an integer value representing the X-coordinate at which the 
0713          * event occurred within the coordinate system of the event's source element.</p> 
0714          * <p>Note that the property is IE-Specific.</p>
0715          * @since 1.0
0716          * @see #srcElement
0717          * @javascript Re-compilers must resolve the member of this instance field to the
0718          * identifier of the field name appending to the identifier resolved from its 
0719          * qualifying member with a dot in between.
0720          */
0721         public final Value.Number.Member offsetX = new Value.Number.Member(this, Members.offsetX);
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          * <p>The property, identified by this member, of a {@link JsEvent} object is 
0727          * reference to an integer value representing the Y-coordinate at which the 
0728          * event occurred within the coordinate system of the event's source element.</p> 
0729          * <p>Note that the property is IE-Specific.</p>
0730          * @since 1.0
0731          * @see #srcElement
0732          * @javascript Re-compilers must resolve the member of this instance field to the
0733          * identifier of the field name appending to the identifier resolved from its 
0734          * qualifying member with a dot in between.
0735          */
0736         public final Value.Number.Member offsetY = new Value.Number.Member(this, Members.offsetY);
0737         /**
0738          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0739          * name of this field, qualified by the current member instance of the field, and 
0740          * to access the property of the name on an object.</p>
0741          * <p>The property, identified by this member, of a {@link JsEvent} object is 
0742          * reference to an integer value representing the X-coordinate at which the 
0743          * event occurred relative to the document or the innermost containing element 
0744          * that is dynamically positioned using CSS.</p> 
0745          * <p>Note that the property is IE-Specific.</p>
0746          * @since 1.0
0747          * @see #x
0748          * @javascript Re-compilers must resolve the member of this instance field to the
0749          * identifier of the field name appending to the identifier resolved from its 
0750          * qualifying member with a dot in between.
0751          */
0752         public final Value.Number.Member pageX   = new Value.Number.Member(this, Members.pageX  );
0753         /**
0754          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0755          * name of this field, qualified by the current member instance of the field, and 
0756          * to access the property of the name on an object.</p>
0757          * <p>The property, identified by this member, of a {@link JsEvent} object is 
0758          * reference to an integer value representing the Y-coordinate at which the 
0759          * event occurred relative to the document or the innermost containing element 
0760          * that is dynamically positioned using CSS.</p> 
0761          * <p>Note that the property is IE-Specific.</p>
0762          * @since 1.0
0763          * @see #y
0764          * @javascript Re-compilers must resolve the member of this instance field to the
0765          * identifier of the field name appending to the identifier resolved from its 
0766          * qualifying member with a dot in between.
0767          */
0768         public final Value.Number.Member pageY   = new Value.Number.Member(this, Members.pageY  );
0769         /**
0770          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0771          * name of this field, qualified by the current member instance of the field, and 
0772          * to access the property of the name on an object.</p>
0773          * <p>The property, identified by this member, of a {@link JsEvent} object is 
0774          * reference to an integer value representing the X-coordinate, relative to the 
0775          * screen, at which the event occurred.</p> 
0776          * <p>Note that the property is IE-Specific.</p>
0777          * @since 1.0
0778          * @javascript Re-compilers must resolve the member of this instance field to the
0779          * identifier of the field name appending to the identifier resolved from its 
0780          * qualifying member with a dot in between.
0781          */
0782         public final Value.Number.Member screenX = new Value.Number.Member(this, Members.screenX);
0783         /**
0784          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0785          * name of this field, qualified by the current member instance of the field, and 
0786          * to access the property of the name on an object.</p>
0787          * <p>The property, identified by this member, of a {@link JsEvent} object is 
0788          * reference to an integer value representing the Y-coordinate, relative to the 
0789          * screen, at which the event occurred.</p> 
0790          * <p>Note that the property is IE-Specific.</p>
0791          * @since 1.0
0792          * @javascript Re-compilers must resolve the member of this instance field to the
0793          * identifier of the field name appending to the identifier resolved from its 
0794          * qualifying member with a dot in between.
0795          */
0796         public final Value.Number.Member screenY = new Value.Number.Member(this, Members.screenY);
0797         /**
0798          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0799          * name of this field, qualified by the current member instance of the field, and 
0800          * to access the property of the name on an object.</p>
0801          * <p>The property, identified by this member, of a {@link JsEvent} object is 
0802          * reference to an integer value representing the X-coordinate at which the 
0803          * event occurred relative to the document or the innermost containing element 
0804          * that is dynamically positioned using CSS.</p> 
0805          * <p>Note that the property is IE-Specific.</p>
0806          * @since 1.0
0807          * @see #pageX
0808          * @javascript Re-compilers must resolve the member of this instance field to the
0809          * identifier of the field name appending to the identifier resolved from its 
0810          * qualifying member with a dot in between.
0811          */
0812         public final Value.Number.Member x       = new Value.Number.Member(this, Members.x      );
0813         /**
0814          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0815          * name of this field, qualified by the current member instance of the field, and 
0816          * to access the property of the name on an object.</p>
0817          * <p>The property, identified by this member, of a {@link JsEvent} object is 
0818          * reference to an integer value representing the Y-coordinate at which the 
0819          * event occurred relative to the document or the innermost containing element 
0820          * that is dynamically positioned using CSS.</p> 
0821          * <p>Note that the property is IE-Specific.</p>
0822          * @since 1.0
0823          * @see #pageY
0824          * @javascript Re-compilers must resolve the member of this instance field to the
0825          * identifier of the field name appending to the identifier resolved from its 
0826          * qualifying member with a dot in between.
0827          */
0828         public final Value.Number.Member y       = new Value.Number.Member(this, Members.y      );
0829         /**
0830          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0831          * name of this field, qualified by the current member instance of the field, and 
0832          * to access the property of the name on an object.</p>
0833          * <p>Note that the property is IE-Specific.</p>
0834          * @since 1.0
0835          * @javascript Re-compilers must resolve the member of this instance field to the
0836          * identifier of the field name appending to the identifier resolved from its 
0837          * qualifying member with a dot in between.
0838          */
0839         public final Value.Number.Member time = new Value.Number.Member(this, Members.time   );
0840         /**
0841          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0842          * name of this field, qualified by the current member instance of the field, and 
0843          * to access the property of the name on an object.</p>
0844          * <p>Note that the property is IE-Specific.</p>
0845          * @since 1.0
0846          * @javascript Re-compilers must resolve the member of this instance field to the
0847          * identifier of the field name appending to the identifier resolved from its 
0848          * qualifying member with a dot in between.
0849          */
0850         public final JsObject.Member srcElement = new JsObject.Member(this, Members.srcElement);
0851         /**
0852          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
0853          * name of this field, qualified by the current member instance of the field, and 
0854          * to access the property of the name on an object.</p>
0855          * <p>The property, identified by this member, of a {@link JsEvent} object 
0856          * refers to a read-only integer value specifying the unicode encoding of the 
0857          * printable character (if any) generated by a "keypress" event. This property 
0858          * is 0 for non-printable function keys and is not used for "keydown" and "keyup" 
0859          * events. Use {@link js.core.JsGlobal.String#fromCharCode(Object)} to convert this 
0860          * property to a string.</p>
0861          * <p>Note that the property is IE-Specific.</p>
0862          * @since 1.0
0863          * @javascript Re-compilers must resolve the member of this instance field to the
0864          * identifier of the field name appending to the identifier resolved from its 
0865          * qualifying member with a dot in between.
0866          */
0867         public final Value.Number.Member charCode = new Value.Number.Member(this, Members.charCode);
0868     }
0869 
0870     /**
0871      * <p>Casts an <b>opaque</b> object to the current <b>opaque</b> type by wrapping it
0872      * with the wrapping constructor.</p>
0873      * @param var The argument of an <b>opaque</b> object.
0874      * @since 1.0
0875      * @javascript Re-compilers must ignore the construction operation of this constructor,
0876      * that is, replacing it with its only argument.
0877      */
0878     public JsEvent(JsObject var) {
0879         super(var);
0880     }
0881 
0882     /**
0883      * <p>An <b>opaque</b> static field defining a member that is named by the field name
0884      * without a qualifying member and to access the property of the name on an object.</p>
0885      * <p>The property, identified by this member, of a {@link JsEvent} object 
0886      * refers to a read-only boolean value that is <tt>true<tt>, if the event is of 
0887      * a type that bubbles unless {@link #stopPropagation()} is called on the 
0888      * event, or <tt>false</tt> otherwise.</p>
0889      * <p>Note that the property is defined by the DOM Level 2 Events standard.</p>
0890      * @since 1.0
0891      * @javascript Re-compilers must resolve the member of this static field to the
0892      * identifier of the field name.
0893      */
0894     public static final Value.Boolean.Member bubbles    = new Value.Boolean.Member(Members.bubbles   );
0895     /**
0896      * <p>An <b>opaque</b> static field defining a member that is named by the field name
0897      * without a qualifying member and to access the property of the name on an object.</p>
0898      * <p>The property, identified by this member, of a {@link JsEvent} object 
0899      * refers to a read-only boolean value that is <tt>true<tt>, if the the default action 
0900      * associated with the event can be canceled with {@link JsEvent#preventDefault()}, 
0901      * or <tt>false</tt> otherwise.</p>
0902      * <p>Note that the property is defined by the DOM Level 2 Events standard.</p>
0903      * @since 1.0
0904      * @javascript Re-compilers must resolve the member of this static field to the
0905      * identifier of the field name.
0906      */
0907     public static final Value.Boolean.Member cancelable = new Value.Boolean.Member(Members.cancelable);
0908     /**
0909      * <p>An <b>opaque</b> static field defining a member that is named by the field name
0910      * without a qualifying member and to access the property of the name on an object.</p>
0911      * <p>The property, identified by this member, of a {@link JsEvent} object is 
0912      * read-only reference to the {@link JsElement}, {@link JsDocument}, or {@link JsWindow} 
0913      * object that is currently handling this event. During capturing and bubbling, 
0914      * it is different from {@link JsEvent#target} property.</p>
0915      * <p>Note that the property is defined by the DOM Level 2 Events standard.</p>
0916      * @since 1.0
0917      * @javascript Re-compilers must resolve the member of this static field to the
0918      * identifier of the field name.
0919      */
0920     public static final JsObject.Member currentTarget  = new JsObject.Member(Members.currentTarget);
0921     /**
0922      * <p>An <b>opaque</b> static field defining a member that is named by the field name
0923      * without a qualifying member and to access the property of the name on an object.</p>
0924      * <p>The property, identified by this member, of a {@link JsEvent} object is 
0925      * read-only reference to the {@link JsElement}, {@link JsDocument}, or {@link JsWindow} 
0926      * object that generated the event.</p>
0927      * <p>Note that the property is defined by the DOM Level 2 Events standard.</p>
0928      * @since 1.0
0929      * @javascript Re-compilers must resolve the member of this static field to the
0930      * identifier of the field name.
0931      */
0932     public static final JsObject.Member target         = new JsObject.Member(Members.target       );
0933     /**
0934      * <p>An <b>opaque</b> static field defining a member that is named by the field name
0935      * without a qualifying member and to access the property of the name on an object.</p>
0936      * <p>The property, identified by this member, of a {@link JsEvent} object is 
0937      * read-only reference to a {@link JsDate} object representing the date and 
0938      * time at which the event occurred or, more precisely, at which the {@link JsEvent} 
0939      * object was created. Implementations are not required to provide valid time 
0940      * data in this field, and if they do not, the {@link JsDate#getTime()} method of 
0941      * the {@link JsDate} object should return 0.</p>
0942      * <p>Note that the property is defined by the DOM Level 2 Events standard.</p>
0943      * @since 1.0
0944      * @javascript Re-compilers must resolve the member of this static field to the
0945      * identifier of the field name.
0946      */
0947     public static final JsDate.Member timeStamp     = new JsDate.Member(Members.timeStamp);
0948     /**
0949      * <p>An <b>opaque</b> static field defining a member that is named by the field name
0950      * without a qualifying member and to access the property of the name on an object.</p>
0951      * <p>The property, identified by this member, of a {@link JsEvent} object 
0952      * refers to a read-only number indicating the current phase of event propagation. 
0953      * The legal value of the property is {@link #CAPTURING_PHASE}, {@link #AT_TARGET}, 
0954      * or {@link #BUBBLING_PHASE} representing the capturing phase, normal event dispatch, 
0955      * and the bubbling phase respectively.</p>
0956      * <p>Note that the property is defined by the DOM Level 2 Events standard.</p>
0957      * @since 1.0
0958      * @javascript Re-compilers must resolve the member of this static field to the
0959      * identifier of the field name.
0960      */
0961     public static final Value.Number.Member eventPhase  = new Value.Number.Member(Members.eventPhase);
0962     /**
0963      * <p>An <b>opaque</b> static field defining a member that is named by the field name
0964      * without a qualifying member and to access the property of the name on an object.</p>
0965      * <p>The property, identified by this member, of a {@link JsEvent} object is 
0966      * read-only reference to the name of the event that the {@link JsEvent} object 
0967      * represents. This is the name under which the event handler was registered, or 
0968      * the name of the event-handler property with the leading "on" removed.</p>
0969      * <p>Note that the property is defined by the DOM Level 2 Events standard.</p>
0970      * @since 1.0
0971      * @javascript Re-compilers must resolve the member of this static field to the
0972      * identifier of the field name.
0973      */
0974     public static final Value.String.Member type        = new Value.String.Member(Members.type      );
0975     /**
0976      * <p>An <b>opaque</b> static field defining a member that is named by the field name
0977      * without a qualifying member and to access the property of the name on an object.</p>
0978      * <p>The property, identified by this member, of a {@link JsEvent} object is 
0979      * reference to a boolean value which tells whether the <tt>Alt</tt> key was 
0980      * held down when the event occurred.</p>
0981      * <p>Note that the property is IE-Specific.</p>
0982      * @since 1.0
0983      * @javascript Re-compilers must resolve the member of this static field to the
0984      * identifier of the field name.
0985      */
0986     public static final Value.Boolean.Member altKey       = new Value.Boolean.Member(Members.altKey       );
0987     /**
0988      * <p>An <b>opaque</b> static field defining a member that is named by the field name
0989      * without a qualifying member and to access the property of the name on an object.</p>
0990      * <p>The property, identified by this member, of a {@link JsEvent} object is 
0991      * reference to a boolean value which determines whether the event must be stopped 
0992      * from being propagated up to containing objects.</p> 
0993      * <p>Note that the property is IE-Specific.</p>
0994      * @since 1.0
0995      * @javascript Re-compilers must resolve the member of this static field to the
0996      * identifier of the field name.
0997      */
0998     public static final Value.Boolean.Member cancelBubble = new Value.Boolean.Member(Members.cancelBubble );
0999     /**
1000      * <p>An <b>opaque</b> static field defining a member that is named by the field name
1001      * without a qualifying member and to access the property of the name on an object.</p>
1002      * <p>The property, identified by this member, of a {@link JsEvent} object is 
1003      * reference to a boolean value which tells whether the <tt>Ctrl</tt> key was 
1004      * held down when the event occurred.</p>
1005      * <p>Note that the property is IE-Specific.</p>
1006      * @since 1.0
1007      * @javascript Re-compilers must resolve the member of this static field to the
1008      * identifier of the field name.
1009      */
1010     public static final Value.Boolean.Member ctrlKey      = new Value.Boolean.Member(Members.ctrlKey      );
1011     /**
1012      * <p>An <b>opaque</b> static field defining a member that is named by the field name
1013      * without a qualifying member and to access the property of the name on an object.</p>
1014      * <p>The property, identified by this member, of a {@link JsEvent} object is 
1015      * reference to a boolean value. If the property is set, its value takes precedence 
1016      * over the value actually returned by the event handler. Set it to <tt>false</tt> 
1017      * to cancel the default action of the source element on which the event 
1018      * occurred.</p>
1019      * <p>Note that the property is IE-Specific.</p>
1020      * @since 1.0
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 Value.Boolean.Member returnValue  = new Value.Boolean.Member(Members.returnValue  );
1025     /**
1026      * <p>An <b>opaque</b> static field defining a member that is named by the field name
1027      * without a qualifying member and to access the property of the name on an object.</p>
1028      * <p>The property, identified by this member, of a {@link JsEvent} object is 
1029      * reference to a boolean value which tells whether the <tt>Shift</tt> key was 
1030      * held down when the event occurred.</p>
1031      * <p>Note that the property is IE-Specific.</p>
1032      * @since 1.0
1033      * @javascript Re-compilers must resolve the member of this static field to the
1034      * identifier of the field name.
1035      */
1036     public static final Value.Boolean.Member shiftKey     = new Value.Boolean.Member(Members.shiftKey     );
1037     /**
1038      * <p>An <b>opaque</b> static field defining a member that is named by the field name
1039      * without a qualifying member and to access the property of the name on an object.</p>
1040      * <p>The property, identified by this member, of a {@link JsEvent} object is 
1041      * reference to the object from which the mouse pointer is moving for 
1042      * "mouseover" and "mouseout" events.</p> 
1043      * <p>Note that the property is IE-Specific.</p>
1044      * @since 1.0
1045      * @javascript Re-compilers must resolve the member of this static field to the
1046      * identifier of the field name.
1047      */
1048     public static final JsElement.Member fromElement  = new JsElement.Member(Members.fromElement  );
1049     /**
1050      * <p>An <b>opaque</b> static field defining a member that is named by the field name
1051      * without a qualifying member and to access the property of the name on an object.</p>
1052      * <p>The property, identified by this member, of a {@link JsEvent} object is 
1053      * reference to the object into which the mouse pointer is moving for 
1054      * "mouseover" and "mouseout" events.</p> 
1055      * <p>Note that the property is IE-Specific.</p>
1056      * @since 1.0
1057      * @javascript Re-compilers must resolve the member of this static field to the
1058      * identifier of the field name.
1059      */
1060     public static final JsElement.Member toElement    = new JsElement.Member(Members.toElement    );
1061     /**
1062      * <p>An <b>opaque</b> static field defining a member that is named by the field name
1063      * without a qualifying member and to access the property of the name on an object.</p>
1064      * <p>Note that the property is IE-Specific.</p>
1065      * <p>The property, identified by this member, of a {@link JsEvent} object is 
1066      * reference to an integer value. For mouse events, the bit mask value specifies 
1067      * which mouse button or buttons were pressed. The 1 bit is set if the left button 
1068      * was pressed; The 2 bit is set if the right button was pressed; and the 4 bit 
1069      * is set if the middle button, of a three-button mouse, was pressed.</p> 
1070      * <p>Note that the property is IE-Specific.</p>
1071      * @since 1.0
1072      * @javascript Re-compilers must resolve the member of this static field to the
1073      * identifier of the field name.
1074      */
1075     public static final Value.Integer.Member button  = new Value.Integer.Member(Members.button );
1076     /**
1077      * <p>An <b>opaque</b> static field defining a member that is named by the field name
1078      * without a qualifying member and to access the property of the name on an object.</p>
1079      * <p>The property, identified by this member, of a {@link JsEvent} object is 
1080      * reference to an integer value representing the X-coordinate, relative to the 
1081      * web browser page, at which the event occurred.</p> 
1082      * <p>Note that the property is IE-Specific.</p>
1083      * @since 1.0
1084      * @javascript Re-compilers must resolve the member of this static field to the
1085      * identifier of the field name.
1086      */
1087     public static final Value.Number.Member clientX = new Value.Number.Member(Members.clientX);
1088     /**
1089      * <p>An <b>opaque</b> static field defining a member that is named by the field name
1090      * without a qualifying member and to access the property of the name on an object.</p>
1091      * <p>The property, identified by this member, of a {@link JsEvent} object is 
1092      * reference to an integer value representing the Y-coordinate, relative to the 
1093      * web browser page, at which the event occurred.</p> 
1094      * <p>Note that the property is IE-Specific.</p>
1095      * @since 1.0
1096      * @javascript Re-compilers must resolve the member of this static field to the
1097      * identifier of the field name.
1098      */
1099     public static final Value.Number.Member clientY = new Value.Number.Member(Members.clientY);
1100     /**
1101      * <p>An <b>opaque</b> static field defining a member that is named by the field name
1102      * without a qualifying member and to access the property of the name on an object.</p>
1103      * <p>The property, identified by this member, of a {@link JsEvent} object is 
1104      * reference to an integer value representing the unicode character code 
1105      * generated by the key that was struck for "keypress" events. For "keydown" 
1106      * and "keyup" events, it represents the virtual key code of the key that was 
1107      * struck. Virtual key codes may be dependent on the keyboard layout in use.</p> 
1108      * <p>Note that the property is IE-Specific.</p>
1109      * @since 1.0
1110      * @javascript Re-compilers must resolve the member of this static field to the
1111      * identifier of the field name.
1112      */
1113     public static final Value.Number.Member keyCode = new Value.Number.Member(Members.keyCode);
1114     /**
1115      * <p>An <b>opaque</b> static field defining a member that is named by the field name
1116      * without a qualifying member and to access the property of the name on an object.</p>
1117      * <p>The property, identified by this member, of a {@link JsEvent} object is 
1118      * reference to an integer value representing the X-coordinate at which the 
1119      * event occurred within the coordinate system of the event's source element.</p> 
1120      * <p>Note that the property is IE-Specific.</p>
1121      * @since 1.0
1122      * @see #srcElement
1123      * @javascript Re-compilers must resolve the member of this static field to the
1124      * identifier of the field name.
1125      */
1126     public static final Value.Number.Member offsetX = new Value.Number.Member(Members.offsetX);
1127     /**
1128      * <p>An <b>opaque</b> static field defining a member that is named by the field name
1129      * without a qualifying member and to access the property of the name on an object.</p>
1130      * <p>The property, identified by this member, of a {@link JsEvent} object is 
1131      * reference to an integer value representing the Y-coordinate at which the 
1132      * event occurred within the coordinate system of the event's source element.</p> 
1133      * <p>Note that the property is IE-Specific.</p>
1134      * @since 1.0
1135      * @see #srcElement
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 Value.Number.Member offsetY = new Value.Number.Member(Members.offsetY);
1140     /**
1141      * <p>An <b>opaque</b> static field defining a member that is named by the field name
1142      * without a qualifying member and to access the property of the name on an object.</p>
1143      * <p>The property, identified by this member, of a {@link JsEvent} object is 
1144      * reference to an integer value representing the X-coordinate at which the 
1145      * event occurred relative to the document or the innermost containing element 
1146      * that is dynamically positioned using CSS.</p> 
1147      * <p>Note that the property is IE-Specific.</p>
1148      * @since 1.0
1149      * @see #x
1150      * @javascript Re-compilers must resolve the member of this static field to the
1151      * identifier of the field name.
1152      */
1153     public static final Value.Number.Member pageX   = new Value.Number.Member(Members.pageX  );
1154     /**
1155      * <p>An <b>opaque</b> static field defining a member that is named by the field name
1156      * without a qualifying member and to access the property of the name on an object.</p>
1157      * <p>The property, identified by this member, of a {@link JsEvent} object is 
1158      * reference to an integer value representing the Y-coordinate at which the 
1159      * event occurred relative to the document or the innermost containing element 
1160      * that is dynamically positioned using CSS.</p> 
1161      * <p>Note that the property is IE-Specific.</p>
1162      * @since 1.0
1163      * @see #y
1164      * @javascript Re-compilers must resolve the member of this static field to the
1165      * identifier of the field name.
1166      */
1167     public static final Value.Number.Member pageY   = new Value.Number.Member(Members.pageY  );
1168     /**
1169      * <p>An <b>opaque</b> static field defining a member that is named by the field name
1170      * without a qualifying member and to access the property of the name on an object.</p>
1171      * <p>The property, identified by this member, of a {@link JsEvent} object is 
1172      * reference to an integer value representing the X-coordinate, relative to the 
1173      * screen, at which the event occurred.</p> 
1174      * <p>Note that the property is IE-Specific.</p>
1175      * @since 1.0
1176      * @javascript Re-compilers must resolve the member of this static field to the
1177      * identifier of the field name.
1178      */
1179     public static final Value.Number.Member screenX = new Value.Number.Member(Members.screenX);
1180     /**
1181      * <p>An <b>opaque</b> static field defining a member that is named by the field name
1182      * without a qualifying member and to access the property of the name on an object.</p>
1183      * <p>The property, identified by this member, of a {@link JsEvent} object is 
1184      * reference to an integer value representing the Y-coordinate, relative to the 
1185      * screen, at which the event occurred.</p> 
1186      * <p>Note that the property is IE-Specific.</p>
1187      * @since 1.0
1188      * @javascript Re-compilers must resolve the member of this static field to the
1189      * identifier of the field name.
1190      */
1191     public static final Value.Number.Member screenY = new Value.Number.Member(Members.screenY);
1192     /**
1193      * <p>An <b>opaque</b> static field defining a member that is named by the field name
1194      * without a qualifying member and to access the property of the name on an object.</p>
1195      * <p>The property, identified by this member, of a {@link JsEvent} object is 
1196      * reference to an integer value representing the X-coordinate at which the 
1197      * event occurred relative to the document or the innermost containing element 
1198      * that is dynamically positioned using CSS.</p> 
1199      * <p>Note that the property is IE-Specific.</p>
1200      * @since 1.0
1201      * @see #pageX
1202      * @javascript Re-compilers must resolve the member of this static field to the
1203      * identifier of the field name.
1204      */
1205     public static final Value.Number.Member x       = new Value.Number.Member(Members.x      );
1206     /**
1207      * <p>An <b>opaque</b> static field defining a member that is named by the field name
1208      * without a qualifying member and to access the property of the name on an object.</p>
1209      * <p>The property, identified by this member, of a {@link JsEvent} object is 
1210      * reference to an integer value representing the Y-coordinate at which the 
1211      * event occurred relative to the document or the innermost containing element 
1212      * that is dynamically positioned using CSS.</p> 
1213      * <p>Note that the property is IE-Specific.</p>
1214      * @since 1.0
1215      * @see #pageY
1216      * @javascript Re-compilers must resolve the member of this static field to the
1217      * identifier of the field name.
1218      */
1219     public static final Value.Number.Member y       = new Value.Number.Member(Members.y      );
1220     /**
1221      * <p>An <b>opaque</b> static field defining a member that is named by the field name
1222      * without a qualifying member and to access the property of the name on an object.</p>
1223      * <p>Note that the property is IE-Specific.</p>
1224      * @since 1.0
1225      * @javascript Re-compilers must resolve the member of this static field to the
1226      * identifier of the field name.
1227      */
1228     public static final Value.Number.Member time = new Value.Number.Member(Members.time);
1229     /**
1230      * <p>An <b>opaque</b> static field defining a member that is named by the field name
1231      * without a qualifying member and to access the property of the name on an object.</p>
1232      * <p>Note that the property is IE-Specific.</p>
1233      * @since 1.0
1234      * @javascript Re-compilers must resolve the member of this static field to the
1235      * identifier of the field name.
1236      */
1237     public static final JsObject.Member srcElement = new JsObject.Member(Members.srcElement);
1238     /**
1239      * <p>An <b>opaque</b> static field defining a member that is named by the field name
1240      * without a qualifying member and to access the property of the name on an object.</p>
1241      * <p>The property, identified by this member, of a {@link JsEvent} object 
1242      * refers to a read-only integer value specifying the unicode encoding of the 
1243      * printable character (if any) generated by a "keypress" event. This property 
1244      * is 0 for non-printable function keys and is not used for "keydown" and "keyup" 
1245      * events. Use {@link js.core.JsGlobal.String#fromCharCode(Object)} to convert this 
1246      * property to a string.</p>
1247      * <p>Note that the property is IE-Specific.</p>
1248      * @since 1.0
1249      * @javascript Re-compilers must resolve the member of this static field to the
1250      * identifier of the field name.
1251      */
1252     public static final Value.Number.Member charCode = new Value.Number.Member(Members.charCode);
1253 
1254     @Override
1255     /**
1256      * <p>Returns the primitive value associated with the current instance, if there is one.
1257      * This invocation simply returns the instance itself for the current instance is an 
1258      * object and there is no primitive value for it.</p>
1259      * @return The current object itself.
1260      * @since 1.0
1261      * @javascript Re-compilers must convert the instance invocation of this method directly
1262      * into a JavaScript invocation on its current object instance without changing the 
1263      * method name, but expanding variable arguments, if any, into comma-separated values. 
1264      */
1265     public JsEvent valueOf() {
1266         return new JsEvent((JsObject)var().valueOf());
1267     }
1268 
1269     /**
1270      * <p>Initializes the properties of a newly created {@link JsEvent} object.</p>
1271      * <p>This method initializes the {@link #type}, {@link #bubbles}, and {@link #cancelable} 
1272      * properties of a synthetic {@link JsEvent} object created by {@link JsDocument#createEvent(String)}. 
1273      * This method may be called on newly created {@link JsEvent} objects only before 
1274      * they have been dispatched with the {@link JsDocument#dispatchEvent(JsEvent)} or 
1275      * {@link JsElement#dispatchEvent(JsEvent)} method of the {@link JsDocument} or {@link JsElement} 
1276      * objects.</p>
1277      * @param eventType The type of event. This may be one of the predefined event types, 
1278      * such as "load" or "submit", or it may be a custom type of your own choosing. 
1279      * Names that begin with "DOM" are reserved, however.
1280      * @param canBubble Specifies whether the event will bubble.
1281      * @param cancelable Specifies whether the event can be canceled with {@link #preventDefault()}.
1282      * @since 1.0
1283      * @see JsDocument#createEvent(String)
1284      * @see JsMouseEvent#initMouseEvent(String, Boolean, Boolean, JsWindow, Number, Number, Number, Number, Number, Boolean, Boolean, Boolean, Boolean, Number, JsElement)
1285      * @see JsUIEvent#initUIEvent(String, Boolean, Boolean, JsWindow, Long)
1286      * @javascript Re-compilers must convert the instance invocation of this method directly
1287      * into a JavaScript invocation on its current object instance without changing the 
1288      * method name, but expanding variable arguments, if any, into comma-separated values. 
1289      */
1290     public final void initEvent(String eventType, Boolean canBubble, Boolean cancelable) {
1291         call(initEvent, new Vars<Object>().add(eventType).add(canBubble).add(cancelable));
1292     }
1293     /**
1294      * <p>Tells the web browser not to perform the default action associated with this 
1295      * event, if there is one.</p>
1296      * <p>Note that if the {@link #cancelable} property of a {@link JsEvent} object is 
1297      * <tt>false</tt>, either there is no default action or there is a default action 
1298      * that cannot be prevented, calling this method has no effect.</p>
1299      * @since 1.0
1300      * @javascript Re-compilers must convert the instance invocation of this method directly
1301      * into a JavaScript invocation on its current object instance without changing the 
1302      * method name, but expanding variable arguments, if any, into comma-separated values. 
1303      */
1304     public final void preventDefault() {
1305         call(preventDefault);
1306     }
1307     /**
1308      * <p>Stops the event from propagating any further through the capturing, target, or 
1309      * bubbling phases of event propagation.</p>
1310      * <p>After this method is called, any other event handlers for the same event on 
1311      * the same node are called, but the event is not dispatched to any other nodes.</p>
1312      * <p>This method stops the propagation of an event and prevents it from being 
1313      * dispatched to any other {@link JsDocument} nodes. It may be called during any 
1314      * phase of event propagation. Note that this method does not prevent other event 
1315      * handlers on the same {@link JsDocument} node from being called, but it does 
1316      * prevent the event from being dispatched to any other nodes.</p>
1317      * @since 1.0
1318      * @javascript Re-compilers must convert the instance invocation of this method directly
1319      * into a JavaScript invocation on its current object instance without changing the 
1320      * method name, but expanding variable arguments, if any, into comma-separated values. 
1321      */
1322     public final void stopPropagation() {
1323         call(stopPropagation);
1324     }
1325 }