Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2012 Google Inc.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
   * use this file except in compliance with the License. You may obtain a copy of
   * the License at
   * 
   * http://www.apache.org/licenses/LICENSE-2.0
   * 
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  * License for the specific language governing permissions and limitations under
  * the License.
  */
 package elemental.events;
 
 import  elemental.events.*;
 import  elemental.stylesheets.*;
 
 
 import java.util.Date;

The DOM MouseEvent represents events that occur due to the user interacting with a pointing device (such as a mouse). It's represented by the nsINSDOMMouseEvent  interface, which extends the nsIDOMMouseEvent interface.
 
 public interface MouseEvent extends UIEvent {
  
Contains the set of standard values returned by button.
 
   public interface Button {
     public static final short PRIMARY = 0;
     public static final short AUXILIARY = 1;
     public static final short SECONDARY = 2;
   }


  
true if the alt key was down when the mouse event was fired. Read only.
 
   boolean isAltKey();


  
The button number that was pressed when the mouse event was fired: Left button=0, middle button=1 (if present), right button=2. For mice configured for left handed use in which the button actions are reversed the values are instead read from right to left. Read only.
 
   int getButton();


  
The X coordinate of the mouse pointer in local (DOM content) coordinates. Read only.
 
   int getClientX();


  
The Y coordinate of the mouse pointer in local (DOM content) coordinates. Read only.
 
   int getClientY();


  
true if the control key was down when the mouse event was fired. Read only.
 
   boolean isCtrlKey();
 
 
   Node getFromElement();


  
true if the meta key was down when the mouse event was fired. Read only.
 
   boolean isMetaKey();
 
   int getOffsetX();
 
   int getOffsetY();


  
The target to which the event applies. Read only.
 
The X coordinate of the mouse pointer in global (screen) coordinates. Read only.
 
  int getScreenX();


  
The Y coordinate of the mouse pointer in global (screen) coordinates. Read only.
  int getScreenY();


  
true if the shift key was down when the mouse event was fired. Read only.
  boolean isShiftKey();
  int getX();
  int getY();
  void initMouseEvent(String typeboolean canBubbleboolean cancelableWindow viewint detailint screenXint screenYint clientXint clientYboolean ctrlKeyboolean altKeyboolean shiftKeyboolean metaKeyint buttonEventTarget relatedTarget);
New to GrepCode? Check out our FAQ X