MouseEvent.java revision 286
286N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 286N/A * This code is free software; you can redistribute it and/or modify it 286N/A * under the terms of the GNU General Public License version 2 only, as 286N/A * published by the Free Software Foundation. Oracle designates this 286N/A * particular file as subject to the "Classpath" exception as provided 286N/A * by Oracle in the LICENSE file that accompanied this code. 286N/A * This code is distributed in the hope that it will be useful, but WITHOUT 286N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 286N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 286N/A * version 2 for more details (a copy is included in the LICENSE file that 286N/A * accompanied this code). 286N/A * You should have received a copy of the GNU General Public License version 286N/A * 2 along with this work; if not, write to the Free Software Foundation, 286N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 286N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 286N/A * or visit www.oracle.com if you need additional information or have any 286N/A * This file is available under and governed by the GNU General Public 286N/A * License version 2 only, as published by the Free Software Foundation. 286N/A * However, the following notice accompanied the original version of this 286N/A * file and, per its terms, should not be removed: 286N/A * Copyright (c) 2000 World Wide Web Consortium, 286N/A * (Massachusetts Institute of Technology, Institut National de 286N/A * Recherche en Informatique et en Automatique, Keio University). All 286N/A * Rights Reserved. This program is distributed under the W3C's Software 286N/A * Intellectual Property License. This program is distributed in the 286N/A * hope that it will be useful, but WITHOUT ANY WARRANTY; without even 286N/A * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 286N/A * The <code>MouseEvent</code> interface provides specific contextual 286N/A * information associated with Mouse events. 286N/A * <p>The <code>detail</code> attribute inherited from <code>UIEvent</code> 286N/A * indicates the number of times a mouse button has been pressed and 286N/A * released over the same screen location during a user action. The 286N/A * attribute value is 1 when the user begins this action and increments by 1 286N/A * for each full sequence of pressing and releasing. If the user moves the 286N/A * mouse between the mousedown and mouseup the value will be set to 0, 286N/A * indicating that no click is occurring. 286N/A * <p>In the case of nested elements mouse events are always targeted at the 286N/A * most deeply nested element. Ancestors of the targeted element may use 286N/A * bubbling to obtain notification of mouse events which occur within its 286N/A * The horizontal coordinate at which the event occurred relative to the 286N/A * origin of the screen coordinate system. 286N/A * The vertical coordinate at which the event occurred relative to the 286N/A * origin of the screen coordinate system. 286N/A * The horizontal coordinate at which the event occurred relative to the 286N/A * DOM implementation's client area. 286N/A * The vertical coordinate at which the event occurred relative to the DOM 286N/A * implementation's client area. 286N/A * Used to indicate whether the 'ctrl' key was depressed during the firing 286N/A * Used to indicate whether the 'shift' key was depressed during the 286N/A * Used to indicate whether the 'alt' key was depressed during the firing 286N/A * of the event. On some platforms this key may map to an alternative 286N/A * Used to indicate whether the 'meta' key was depressed during the firing 286N/A * of the event. On some platforms this key may map to an alternative 286N/A * During mouse events caused by the depression or release of a mouse 286N/A * button, <code>button</code> is used to indicate which mouse button 286N/A * changed state. The values for <code>button</code> range from zero to 286N/A * indicate the left button of the mouse, one to indicate the middle 286N/A * button if present, and two to indicate the right button. For mice 286N/A * configured for left handed use in which the button actions are 286N/A * reversed the values are instead read from right to left. 286N/A * Used to identify a secondary <code>EventTarget</code> related to a UI 286N/A * event. Currently this attribute is used with the mouseover event to 286N/A * indicate the <code>EventTarget</code> which the pointing device 286N/A * exited and with the mouseout event to indicate the 286N/A * <code>EventTarget</code> which the pointing device entered. 286N/A * The <code>initMouseEvent</code> method is used to initialize the value 286N/A * of a <code>MouseEvent</code> created through the 286N/A * <code>DocumentEvent</code> interface. This method may only be called 286N/A * before the <code>MouseEvent</code> has been dispatched via the 286N/A * <code>dispatchEvent</code> method, though it may be called multiple 286N/A * times during that phase if necessary. If called multiple times, the 286N/A * final invocation takes precedence. 286N/A * @param typeArg Specifies the event type. 286N/A * @param canBubbleArg Specifies whether or not the event can bubble. 286N/A * @param cancelableArg Specifies whether or not the event's default 286N/A * action can be prevented. 286N/A * @param viewArg Specifies the <code>Event</code>'s 286N/A * <code>AbstractView</code>. 286N/A * @param detailArg Specifies the <code>Event</code>'s mouse click count. 286N/A * @param screenXArg Specifies the <code>Event</code>'s screen x 286N/A * @param screenYArg Specifies the <code>Event</code>'s screen y 286N/A * @param clientXArg Specifies the <code>Event</code>'s client x 286N/A * @param clientYArg Specifies the <code>Event</code>'s client y 286N/A * @param ctrlKeyArg Specifies whether or not control key was depressed 286N/A * during the <code>Event</code>. 286N/A * @param altKeyArg Specifies whether or not alt key was depressed during 286N/A * the <code>Event</code>. 286N/A * @param shiftKeyArg Specifies whether or not shift key was depressed 286N/A * during the <code>Event</code>. 286N/A * @param metaKeyArg Specifies whether or not meta key was depressed 286N/A * during the <code>Event</code>. 286N/A * @param buttonArg Specifies the <code>Event</code>'s mouse button. 286N/A * @param relatedTargetArg Specifies the <code>Event</code>'s related 286N/A * <code>EventTarget</code>.