Package elemental.events

Examples of elemental.events.MouseEvent.initMouseEvent()


    return elems;
  }

  private void mouseevent(Element target, String type) {
    MouseEvent evt = (MouseEvent) Elements.getDocument().createEvent(Document.Event.MOUSE);
    evt.initMouseEvent(type, true, true, null, 0, 0, 0, 0, 0, false, false, false, false,
        MouseEvent.Button.PRIMARY, null);
    target.dispatchEvent(evt);
  }

View Full Code Here


   * Fires a left-click event on the given target (typically a DOM node).
   */
  public static void click(EventTarget target) {
    MouseEvent evt = (MouseEvent) getDocument().createEvent(
        Document.Events.MOUSE);
    evt.initMouseEvent("click", true, true, null, 0, 0, 0, 0, 0, false, false,
        false, false, MouseEvent.Button.PRIMARY, null);
    target.dispatchEvent(evt);
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.