001 
002 /*
003  *  JScripter Standard 1.0 - To Script In Java
004  *  Copyright (C) 2008-2011  J.J.Liu<jianjunliu@126.com> <http://www.jscripter.org>
005  *  
006  *  This program is free software: you can redistribute it and/or modify
007  *  it under the terms of the GNU Affero General Public License as published by
008  *  the Free Software Foundation, either version 3 of the License, or
009  *  (at your option) any later version.
010  *  
011  *  This program is distributed in the hope that it will be useful,
012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
014  *  GNU Affero General Public License for more details.
015  *  
016  *  You should have received a copy of the GNU Affero General Public License
017  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
018  */
019 
020 package js.user;
021 
022 import js.*;
023 import js.core.*;
024 
025 /**
026  * <p>An <b>opaque</b> class representing JavaScript client-side objects of the global 
027  * {@link JsClient#MouseEvent} class.</p>
028  * <p>The class represents the events of types "click", "mousedown", "mousemove", "mouseout", 
029  * "mouseover", and "mouseup". Note that in addition to the property members defined 
030  * in this class, it also inherits the properties of {@link JsUIEvent} and {@link JsEvent}.</p>
031  * 
032  * @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>
033  *
034  * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be
035  * generated into the target codes. Re-compilers must exit with error on the operations of
036  * accessing that kind of class objects.
037  * The <tt>checkcast</tt> operation to the class literal of this interface must be ignored
038  * and <tt>instanceof</tt> to it always <tt>true</tt>.
039  */
040 public class JsMouseEvent extends JsClient.MouseEvent.Prototype
041 {
042     /**
043      * <p>An <b>internal</b> class containing membership data for its enclosing
044      * opaque class.</p>
045      * <p>This class is only used inside of <b>opaque</b> or <b>internal</b> classes or
046      * class members.</p>
047      *
048      * @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>
049      * 
050      * @javascript Re-compilers must report error on resolving an <b>internal</b> class.
051      */
052     protected static abstract class Members extends JsClient.MouseEvent.Prototype.Members
053     {
054         /**
055          * <p>An <b>internal</b> static field defining a member ID of the field name and
056          * used internally to define a member of the same name.</p>
057          * @since 1.0
058          * @see JsMouseEvent#altKey
059          * @see JsMouseEvent.Member#altKey
060          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
061          */
062         public final static Mid altKey        = id("altKey"       );
063         /**
064          * <p>An <b>internal</b> static field defining a member ID of the field name and
065          * used internally to define a member of the same name.</p>
066          * @since 1.0
067          * @see JsMouseEvent#button
068          * @see JsMouseEvent.Member#button
069          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
070          */
071         public final static Mid button        = id("button"       );
072         /**
073          * <p>An <b>internal</b> static field defining a member ID of the field name and
074          * used internally to define a member of the same name.</p>
075          * @since 1.0
076          * @see JsMouseEvent#clientX
077          * @see JsMouseEvent.Member#clientX
078          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
079          */
080         public final static Mid clientX       = id("clientX"      );
081         /**
082          * <p>An <b>internal</b> static field defining a member ID of the field name and
083          * used internally to define a member of the same name.</p>
084          * @since 1.0
085          * @see JsMouseEvent#clientY
086          * @see JsMouseEvent.Member#clientY
087          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
088          */
089         public final static Mid clientY       = id("clientY"      );
090         /**
091          * <p>An <b>internal</b> static field defining a member ID of the field name and
092          * used internally to define a member of the same name.</p>
093          * @since 1.0
094          * @see JsMouseEvent#ctrlKey
095          * @see JsMouseEvent.Member#ctrlKey
096          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
097          */
098         public final static Mid ctrlKey       = id("ctrlKey"      );
099         /**
100          * <p>An <b>internal</b> static field defining a member ID of the field name and
101          * used internally to define a member of the same name.</p>
102          * @since 1.0
103          * @see JsMouseEvent#metaKey
104          * @see JsMouseEvent.Member#metaKey
105          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
106          */
107         public final static Mid metaKey       = id("metaKey"      );
108         /**
109          * <p>An <b>internal</b> static field defining a member ID of the field name and
110          * used internally to define a member of the same name.</p>
111          * @since 1.0
112          * @see JsMouseEvent#relatedTarget
113          * @see JsMouseEvent.Member#relatedTarget
114          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
115          */
116         public final static Mid relatedTarget = id("relatedTarget");
117         /**
118          * <p>An <b>internal</b> static field defining a member ID of the field name and
119          * used internally to define a member of the same name.</p>
120          * @since 1.0
121          * @see JsMouseEvent#screenX
122          * @see JsMouseEvent.Member#screenX
123          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
124          */
125         public final static Mid screenX       = id("screenX"      );
126         /**
127          * <p>An <b>internal</b> static field defining a member ID of the field name and
128          * used internally to define a member of the same name.</p>
129          * @since 1.0
130          * @see JsMouseEvent#screenY
131          * @see JsMouseEvent.Member#screenY
132          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
133          */
134         public final static Mid screenY       = id("screenY"      );
135         /**
136          * <p>An <b>internal</b> static field defining a member ID of the field name and
137          * used internally to define a member of the same name.</p>
138          * @since 1.0
139          * @see JsMouseEvent#shiftKey
140          * @see JsMouseEvent.Member#shiftKey
141          * @javascript Re-compilers must report error on accessing an <b>internal</b> field.
142          */
143         public final static Mid shiftKey      = id("shiftKey"     );
144     }
145 
146     /**
147      * <p>An <b>opaque</b> class representing members of its enclosing <b>opaque</b> type.</p>
148      * <p>Note that, this class is <b>opaque</b> but its constructors are all <b>internal</b>. 
149      * This class and the subclasses of this class are used to declare either <b>opaque</b> 
150      * <tt>public</tt> instance fields of the opaque type {@link js.Var.Member} or the 
151      * <b>opaque</b> <tt>public</tt> static fields of other <b>opaque</b> types while their 
152      * constructors are used to define the fields inside <b>opaque</b> classes. Under 
153      * either circumstance, the field names must be exactly same as the member names, as 
154      * the <b>opaque</b> fields of <b>opaque</b> types are resolved by re-compilers directly 
155      * based on the field names.</p>
156      *
157      * @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>
158      * 
159      * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be created
160      * in the target codes. Re-compilers must exit with error on operations accessing that kind 
161      * of class objects.
162      * Re-compilers must resolve an <b>opaque</b> instance field declared by this class in
163      * {@link js.Var.Member} or its subclasses to the JavaScript identifier: 
164      * <pre>q.m</pre>
165      * where <tt>m</tt> is the identifier of the field name and <tt>q</tt> is the identifier
166      * resolved from the instance of the enclosing member. Re-compilers must resolve an 
167      * <b>opaque</b> static field declared by this class in <b>opaque</b> types other than 
168      * {@link js.Var.Member} and its subclasses to the JavaScript identifier: 
169      * <pre>m</pre>
170      * where <tt>m</tt> is the identifier of the field name. And re-compilers must report
171      * error on the access to <b>opaque</b> fields declared by this class under any other 
172      * circumstances.
173      */
174     public static class Member extends JsClient.MouseEvent.Prototype.Member
175     {
176         /**
177          * <p>Internally constructs a member based on a qualifying member.</p>
178          * <p>This constructor is <b>internal</b> and only called inside of <b>opaque</b>
179          * or <b>internal</b> classes or class members.</p>
180          * <p>Note that, this constructor is <b>internal</b> but its declaring class is
181          * <b>opaque</b>. This constructor is used to define <b>opaque</b> instance fields 
182          * declared in the declaring class of this constructor itself or its subclasses. 
183          * Under this circumstance, the field names must be exactly same as the member 
184          * names, as the <b>opaque</b> instance fields of the <b>opaque</b> type 
185          * {@link js.Var.Member} or its subclasses are resolved by re-compilers directly
186          * to their names appending to the name resolved from the specified qualifying 
187          * member with a dot in between.</p>
188          * @param q A qualifying member
189          * @param mid The ID of the member to construct
190          * @since 1.0
191          * @javascript Re-compilers must report error on the invocation to an <b>internal</b> constructor.
192          */
193         public Member(JsObject.Member q, Mid mid) {
194             super(q, mid);
195         }
196         /**
197          * <p>Internally constructs a member without a qualifying member.</p>
198          * <p>This constructor is <b>internal</b> and only called inside of <b>opaque</b>
199          * or <b>internal</b> classes or class members.</p>
200          * <p>Note that, this constructor is <b>internal</b> but its declaring class is
201          * <b>opaque</b>. This constructor is used to define <b>opaque</b> static fields, 
202          * declared in <b>opaque</b> types other than the declaring class of this constructor 
203          * itself and its subclasses. Under this circumstance, the field names must be
204          * exactly same as the member names, as the <b>opaque</b> static fields of <b>opaque</b>
205          * types are generally resolved by re-compilers directly to identifiers of their names.</p>
206          * @param mid The ID of the member to construct
207          * @since 1.0
208          * @javascript Re-compilers must report error on the invocation to an <b>internal</b> constructor.
209          */
210         public Member(Mid mid) {
211             super(mid);
212         }
213         @Override
214         /**
215          * <p>Evaluates the property, represented by the current member instance, of the
216          * argument object.</p>
217          * @param o The argument object
218          * @return The value of the current member based on the object argument.
219          * @since 1.0
220          * @javascript Re-compilers must convert the instance invocation of this method into
221          * the JavaScript expression: 
222          * <pre>o.m</pre>
223          * where <tt>m</tt> is the identifier name resolved from the current member
224          * instance of the invocation.
225          */
226         public JsMouseEvent with(ObjectLike o) {
227             return new JsMouseEvent(super.with(o));
228         }
229 
230         /**
231          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
232          * name of this field, qualified by the current member instance of the field, and 
233          * to access the property of the name on an object.</p>
234          * <p>The property, identified by this member, of a {@link JsMouseEvent} object 
235          * refers to a read-only boolean value which tells whether the <tt>Alt</tt> key 
236          * was held down when the event occurred.</p>
237          * @since 1.0
238          * @javascript Re-compilers must resolve the member of this instance field to the
239          * identifier of the field name appending to the identifier resolved from its 
240          * qualifying member with a dot in between.
241          */
242         public final Value.Boolean.Member altKey   = new Value.Boolean.Member(this, Members.altKey );
243         /**
244          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
245          * name of this field, qualified by the current member instance of the field, and 
246          * to access the property of the name on an object.</p>
247          * <p>The property, identified by this member, of a {@link JsMouseEvent} object 
248          * refers to a read-only boolean value which tells whether the <tt>Ctrl</tt> key 
249          * was held down when the event occurred.</p>
250          * @since 1.0
251          * @javascript Re-compilers must resolve the member of this instance field to the
252          * identifier of the field name appending to the identifier resolved from its 
253          * qualifying member with a dot in between.
254          */
255         public final Value.Boolean.Member ctrlKey  = new Value.Boolean.Member(this, Members.ctrlKey);
256         /**
257          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
258          * name of this field, qualified by the current member instance of the field, and 
259          * to access the property of the name on an object.</p>
260          * <p>The property, identified by this member, of a {@link JsMouseEvent} object 
261          * refers to a read-only boolean value which tells whether the <tt>Meta</tt> key 
262          * was held down when the event occurred.</p>
263          * @since 1.0
264          * @javascript Re-compilers must resolve the member of this instance field to the
265          * identifier of the field name appending to the identifier resolved from its 
266          * qualifying member with a dot in between.
267          */
268         public final Value.Boolean.Member metaKey  = new Value.Boolean.Member(this, Members.ctrlKey);
269         /**
270          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
271          * name of this field, qualified by the current member instance of the field, and 
272          * to access the property of the name on an object.</p>
273          * <p>The property, identified by this member, of a {@link JsMouseEvent} object 
274          * refers to a read-only boolean value which tells whether the <tt>Shift</tt> key 
275          * was held down when the event occurred.</p>
276          * @since 1.0
277          * @javascript Re-compilers must resolve the member of this instance field to the
278          * identifier of the field name appending to the identifier resolved from its 
279          * qualifying member with a dot in between.
280          */
281         public final Value.Boolean.Member shiftKey = new Value.Boolean.Member(this, Members.metaKey);
282         /**
283          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
284          * name of this field, qualified by the current member instance of the field, and 
285          * to access the property of the name on an object.</p>
286          * <p>The property, identified by this member, of a {@link JsMouseEvent} object 
287          * refers to a read-only integer value which tells which mouse button changed 
288          * state during a "mousedown", "mouseup", or "click" event. A value of 0 indicates 
289          * the left button, a value of 2 indicates the right button, and a value of 1 
290          * indicates the middle mouse button. Note that this property is defined when 
291          * a button changes state; it is not used to report whether a button is held 
292          * down during a "mousemove" event. Also, this property is not a bitmap, that is, 
293          * it cannot tell you if more than one button is held down.</p>
294          * @since 1.0
295          * @javascript Re-compilers must resolve the member of this instance field to the
296          * identifier of the field name appending to the identifier resolved from its 
297          * qualifying member with a dot in between.
298          */
299         public final Value.Integer.Member button  = new Value.Integer.Member(this, Members.button );
300         /**
301          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
302          * name of this field, qualified by the current member instance of the field, and 
303          * to access the property of the name on an object.</p>
304          * <p>The property, identified by this member, of a {@link JsMouseEvent} object 
305          * refers to a read-only integer value representing the X-coordinate of the 
306          * mouse pointer relative to the "client area", or browser window. Note that 
307          * this value does not take document scrolling into account; if an event occurs 
308          * at the very top of the window, the value is 0 regardless of how far down the 
309          * document has been scrolled.</p> 
310          * @since 1.0
311          * @javascript Re-compilers must resolve the member of this instance field to the
312          * identifier of the field name appending to the identifier resolved from its 
313          * qualifying member with a dot in between.
314          */
315         public final Value.Integer.Member clientX = new Value.Integer.Member(this, Members.clientX);
316         /**
317          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
318          * name of this field, qualified by the current member instance of the field, and 
319          * to access the property of the name on an object.</p>
320          * <p>The property, identified by this member, of a {@link JsMouseEvent} object 
321          * refers to a read-only integer value representing the Y-coordinate of the 
322          * mouse pointer relative to the "client area", or browser window. Note that 
323          * this value does not take document scrolling into account; if an event occurs 
324          * at the very top of the window, the value is 0 regardless of how far down the 
325          * document has been scrolled.</p> 
326          * @since 1.0
327          * @javascript Re-compilers must resolve the member of this instance field to the
328          * identifier of the field name appending to the identifier resolved from its 
329          * qualifying member with a dot in between.
330          */
331         public final Value.Integer.Member clientY = new Value.Integer.Member(this, Members.clientY);
332         /**
333          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
334          * name of this field, qualified by the current member instance of the field, and 
335          * to access the property of the name on an object.</p>
336          * <p>The property, identified by this member, of a {@link JsMouseEvent} object 
337          * refers to a read-only integer value representing the X-coordinate of the 
338          * mouse pointer relative to the upper-left corner of the user's monitor.</p> 
339          * @since 1.0
340          * @javascript Re-compilers must resolve the member of this instance field to the
341          * identifier of the field name appending to the identifier resolved from its 
342          * qualifying member with a dot in between.
343          */
344         public final Value.Integer.Member screenX = new Value.Integer.Member(this, Members.screenX);
345         /**
346          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
347          * name of this field, qualified by the current member instance of the field, and 
348          * to access the property of the name on an object.</p>
349          * <p>The property, identified by this member, of a {@link JsMouseEvent} object 
350          * refers to a read-only integer value representing the Y-coordinate of the 
351          * mouse pointer relative to the upper-left corner of the user's monitor.</p> 
352          * @since 1.0
353          * @javascript Re-compilers must resolve the member of this instance field to the
354          * identifier of the field name appending to the identifier resolved from its 
355          * qualifying member with a dot in between.
356          */
357         public final Value.Integer.Member screenY = new Value.Integer.Member(this, Members.screenY);
358         /**
359          * <p>An <b>opaque</b> instance field defining a sub-member that is named by the
360          * name of this field, qualified by the current member instance of the field, and 
361          * to access the property of the name on an object.</p>
362          * <p>The property, identified by this member, of a {@link JsMouseEvent} object is 
363          * a read-only reference to a {@link JsElement} node that is related to the 
364          * {@link JsEvent#target} node of the event. For "mouseover" events, it is the 
365          * {@link JsElement} object that the mouse left when it moved over the target. 
366          * For "mouseout" events, it is the {@link JsElement} object that the mouse 
367          * entered when leaving the target.</p>
368          * @since 1.0
369          * @javascript Re-compilers must resolve the member of this instance field to the
370          * identifier of the field name appending to the identifier resolved from its 
371          * qualifying member with a dot in between.
372          */
373         public final JsElement.Member relatedTarget = new JsElement.Member(this, Members.relatedTarget);
374     }
375 
376     /**
377      * <p>Casts an <b>opaque</b> object to the current <b>opaque</b> type by wrapping it
378      * with the wrapping constructor.</p>
379      * @param var The argument of an <b>opaque</b> object.
380      * @since 1.0
381      * @javascript Re-compilers must ignore the construction operation of this constructor,
382      * that is, replacing it with its only argument.
383      */
384     public JsMouseEvent(JsObject var) {
385         super(var);
386     }
387 
388     /**
389      * <p>An <b>opaque</b> static field defining a member that is named by the field name
390      * without a qualifying member and to access the property of the name on an object.</p>
391      * <p>The property, identified by this member, of a {@link JsMouseEvent} object 
392      * refers to a read-only boolean value which tells whether the <tt>Alt</tt> key 
393      * was held down when the event occurred.</p>
394      * @since 1.0
395      * @javascript Re-compilers must resolve the member of this static field to the
396      * identifier of the field name.
397      */
398     public static final Value.Boolean.Member altKey   = new Value.Boolean.Member(Members.altKey );
399     /**
400      * <p>An <b>opaque</b> static field defining a member that is named by the field name
401      * without a qualifying member and to access the property of the name on an object.</p>
402      * <p>The property, identified by this member, of a {@link JsMouseEvent} object 
403      * refers to a read-only boolean value which tells whether the <tt>Ctrl</tt> key 
404      * was held down when the event occurred.</p>
405      * @since 1.0
406      * @javascript Re-compilers must resolve the member of this static field to the
407      * identifier of the field name.
408      */
409     public static final Value.Boolean.Member ctrlKey  = new Value.Boolean.Member(Members.ctrlKey);
410     /**
411      * <p>An <b>opaque</b> static field defining a member that is named by the field name
412      * without a qualifying member and to access the property of the name on an object.</p>
413      * <p>The property, identified by this member, of a {@link JsMouseEvent} object 
414      * refers to a read-only boolean value which tells whether the <tt>Meta</tt> key 
415      * was held down when the event occurred.</p>
416      * @since 1.0
417      * @javascript Re-compilers must resolve the member of this static field to the
418      * identifier of the field name.
419      */
420     public static final Value.Boolean.Member metaKey  = new Value.Boolean.Member(Members.ctrlKey);
421     /**
422      * <p>An <b>opaque</b> static field defining a member that is named by the field name
423      * without a qualifying member and to access the property of the name on an object.</p>
424      * <p>The property, identified by this member, of a {@link JsMouseEvent} object 
425      * refers to a read-only boolean value which tells whether the <tt>Shift</tt> key 
426      * was held down when the event occurred.</p>
427      * @since 1.0
428      * @javascript Re-compilers must resolve the member of this static field to the
429      * identifier of the field name.
430      */
431     public static final Value.Boolean.Member shiftKey = new Value.Boolean.Member(Members.metaKey);
432     /**
433      * <p>An <b>opaque</b> static field defining a member that is named by the field name
434      * without a qualifying member and to access the property of the name on an object.</p>
435      * <p>The property, identified by this member, of a {@link JsMouseEvent} object 
436      * refers to a read-only integer value which tells which mouse button changed 
437      * state during a "mousedown", "mouseup", or "click" event. A value of 0 indicates 
438      * the left button, a value of 2 indicates the right button, and a value of 1 
439      * indicates the middle mouse button. Note that this property is defined when 
440      * a button changes state; it is not used to report whether a button is held 
441      * down during a "mousemove" event. Also, this property is not a bitmap, that is, 
442      * it cannot tell you if more than one button is held down.</p>
443      * @since 1.0
444      * @javascript Re-compilers must resolve the member of this static field to the
445      * identifier of the field name.
446      */
447     public static final Value.Integer.Member button  = new Value.Integer.Member(Members.button );
448     /**
449      * <p>An <b>opaque</b> static field defining a member that is named by the field name
450      * without a qualifying member and to access the property of the name on an object.</p>
451      * <p>The property, identified by this member, of a {@link JsMouseEvent} object 
452      * refers to a read-only integer value representing the X-coordinate of the 
453      * mouse pointer relative to the "client area", or browser window. Note that 
454      * this value does not take document scrolling into account; if an event occurs 
455      * at the very top of the window, the value is 0 regardless of how far down the 
456      * document has been scrolled.</p> 
457      * @since 1.0
458      * @javascript Re-compilers must resolve the member of this static field to the
459      * identifier of the field name.
460      */
461     public static final Value.Integer.Member clientX = new Value.Integer.Member(Members.clientX);
462     /**
463      * <p>An <b>opaque</b> static field defining a member that is named by the field name
464      * without a qualifying member and to access the property of the name on an object.</p>
465      * <p>The property, identified by this member, of a {@link JsMouseEvent} object 
466      * refers to a read-only integer value representing the Y-coordinate of the 
467      * mouse pointer relative to the "client area", or browser window. Note that 
468      * this value does not take document scrolling into account; if an event occurs 
469      * at the very top of the window, the value is 0 regardless of how far down the 
470      * document has been scrolled.</p> 
471      * @since 1.0
472      * @javascript Re-compilers must resolve the member of this static field to the
473      * identifier of the field name.
474      */
475     public static final Value.Integer.Member clientY = new Value.Integer.Member(Members.clientY);
476     /**
477      * <p>An <b>opaque</b> static field defining a member that is named by the field name
478      * without a qualifying member and to access the property of the name on an object.</p>
479      * <p>The property, identified by this member, of a {@link JsMouseEvent} object 
480      * refers to a read-only integer value representing the X-coordinate of the 
481      * mouse pointer relative to the upper-left corner of the user's monitor.</p> 
482      * @since 1.0
483      * @javascript Re-compilers must resolve the member of this static field to the
484      * identifier of the field name.
485      */
486     public static final Value.Integer.Member screenX = new Value.Integer.Member(Members.screenX);
487     /**
488      * <p>An <b>opaque</b> static field defining a member that is named by the field name
489      * without a qualifying member and to access the property of the name on an object.</p>
490      * <p>The property, identified by this member, of a {@link JsMouseEvent} object 
491      * refers to a read-only integer value representing the Y-coordinate of the 
492      * mouse pointer relative to the upper-left corner of the user's monitor.</p> 
493      * @since 1.0
494      * @javascript Re-compilers must resolve the member of this static field to the
495      * identifier of the field name.
496      */
497     public static final Value.Integer.Member screenY = new Value.Integer.Member(Members.screenY);
498     /**
499      * <p>An <b>opaque</b> static field defining a member that is named by the field name
500      * without a qualifying member and to access the property of the name on an object.</p>
501      * <p>The property, identified by this member, of a {@link JsMouseEvent} object is 
502      * a read-only reference to a {@link JsElement} node that is related to the 
503      * {@link JsEvent#target} node of the event. For "mouseover" events, it is the 
504      * {@link JsElement} object that the mouse left when it moved over the target. 
505      * For "mouseout" events, it is the {@link JsElement} object that the mouse 
506      * entered when leaving the target.</p>
507      * @since 1.0
508      * @javascript Re-compilers must resolve the member of this static field to the
509      * identifier of the field name.
510      */
511     public static final JsElement.Member relatedTarget = new JsElement.Member(Members.relatedTarget);
512 
513     @Override
514     /**
515      * <p>Returns the primitive value associated with the current instance, if there is one.
516      * This invocation simply returns the instance itself for the current instance is an 
517      * object and there is no primitive value for it.</p>
518      * @return The current object itself.
519      * @since 1.0
520      * @javascript Re-compilers must convert the instance invocation of this method directly
521      * into a JavaScript invocation on its current object instance without changing the 
522      * method name, but expanding variable arguments, if any, into comma-separated values. 
523      */
524     public JsMouseEvent valueOf() {
525         return new JsMouseEvent((JsObject)var().valueOf());
526     }
527 
528     /**
529      * <p>Initializes the properties of a newly created {@link JsMouseEvent} object.</p>
530      * <p>This method initializes the various properties of the {@link JsMouseEvent} 
531      * object and may be called only before it is passed to {@link JsElement#dispatchEvent(JsEvent)}.</p>
532      * @param eventType The type of event.
533      * @param canBubble Specifies whether the event will bubble.
534      * @param cancelable Specifies whether the event can be canceled with {@link JsEvent#preventDefault()}.
535      * @param view The {@link JsWindow} object in which the event occurred.
536      * @param detail The {@link JsUIEvent#detail} property for the event.
537      * @param screenX Specifies the initial value of the {@link #screenX} property of this {@link JsMouseEvent} object.
538      * @param screenY Specifies the initial value of the {@link #screenY} property of this {@link JsMouseEvent} object.
539      * @param clientX Specifies the initial value of the {@link #clientX} property of this {@link JsMouseEvent} object.
540      * @param clientY Specifies the initial value of the {@link #clientY} property of this {@link JsMouseEvent} object.
541      * @param ctrlKey Specifies the initial value of the {@link #ctrlKey} property of this {@link JsMouseEvent} object.
542      * @param altKey Specifies the initial value of the {@link #altKey} property of this {@link JsMouseEvent} object.
543      * @param shiftKey Specifies the initial value of the {@link #shiftKey} property of this {@link JsMouseEvent} object.
544      * @param metaKey Specifies the initial value of the {@link #metaKey} property of this {@link JsMouseEvent} object.
545      * @param button Specifies the initial value of the {@link #button} property of this {@link JsMouseEvent} object.
546      * @param relatedTarget Specifies the initial value of the {@link #relatedTarget} property of this {@link JsMouseEvent} object.
547      * @since 1.0
548      * @see JsDocument#createEvent(String)
549      * @see JsEvent#initEvent(String, Boolean, Boolean)
550      * @see JsUIEvent#initEvent(String, Boolean, Boolean)
551      * @javascript Re-compilers must convert the instance invocation of this method directly
552      * into a JavaScript invocation on its current object instance without changing the 
553      * method name, but expanding variable arguments, if any, into comma-separated values. 
554      */
555     public final void initMouseEvent(String eventType,
556                                      Boolean canBubble,
557                                      Boolean cancelable,
558                                      JsWindow view,
559                                      Number detail,
560                                      Number screenX,
561                                      Number screenY,
562                                      Number clientX,
563                                      Number clientY,
564                                      Boolean ctrlKey,
565                                      Boolean altKey,
566                                      Boolean shiftKey,
567                                      Boolean metaKey,
568                                      Number button,
569                                      JsElement relatedTarget) {
570         call(initMouseEvent, new Vars<Object>().add(eventType)
571                                                .add(canBubble)
572                                                .add(cancelable)
573                                                .add(view)
574                                                .add(detail)
575                                                .add(screenX)
576                                                .add(screenY)
577                                                .add(clientX)
578                                                .add(clientY)
579                                                .add(ctrlKey)
580                                                .add(altKey)
581                                                .add(shiftKey)
582                                                .add(metaKey)
583                                                .add(button)
584                                                .add(relatedTarget)
585         );
586     }
587 }