All Downloads are FREE. Search and download functionalities are using the official Maven repository.

elemental.events.MouseEvent Maven / Gradle / Ivy

Go to download

Vaadin is a web application framework for Rich Internet Applications (RIA). Vaadin enables easy development and maintenance of fast and secure rich web applications with a stunning look and feel and a wide browser support. It features a server-side architecture with the majority of the logic running on the server. Ajax technology is used at the browser-side to ensure a rich and interactive user experience.

There is a newer version: 8.26.0
Show newest version
/*
 * 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.dom.Node;
import elemental.dom.Clipboard;
import elemental.html.Window;

import elemental.events.*;
import elemental.util.*;
import elemental.dom.*;
import elemental.html.*;
import elemental.css.*;
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 {@link #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();

  Clipboard getDataTransfer();

  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.
    */
  EventTarget getRelatedTarget();


  /**
    * 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();

  Node getToElement();

  int getWebkitMovementX();

  int getWebkitMovementY();

  int getX();

  int getY();

  void initMouseEvent(String type, boolean canBubble, boolean cancelable, Window view, int detail, int screenX, int screenY, int clientX, int clientY, boolean ctrlKey, boolean altKey, boolean shiftKey, boolean metaKey, int button, EventTarget relatedTarget);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy