]> source.dussan.org Git - gwtquery.git/commitdiff
update lazy interfaces
authorManuel Carrasco Moñino <manuel.carrasco.m@gmail.com>
Thu, 5 Dec 2013 16:55:41 +0000 (17:55 +0100)
committerManuel Carrasco Moñino <manuel.carrasco.m@gmail.com>
Thu, 5 Dec 2013 16:55:41 +0000 (17:55 +0100)
gwtquery-core/src/main/java/com/google/gwt/query/client/LazyGQuery.java
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyEvents.java

index da0de164713b904afee012e8ea2deec12194969e..2d9ce894716420edb3ce859225a6eb37e8aeed84 100644 (file)
@@ -22,6 +22,7 @@ import com.google.gwt.core.client.JavaScriptObject;
 import com.google.gwt.core.client.JsArray;
 import com.google.gwt.core.client.JsArrayMixed;
 import com.google.gwt.core.client.JsArrayString;
+import com.google.gwt.core.client.ScriptInjector;
 import com.google.gwt.dom.client.*;
 import com.google.gwt.dom.client.Style.Display;
 import com.google.gwt.dom.client.Style.HasCssName;
@@ -1116,6 +1117,8 @@ public interface LazyGQuery<T> extends LazyBase<T>{
    * 'in' to a frequent task. Whenever the mouse cursor is moved over a matched element, the first
    * specified function is fired. Whenever the mouse moves off of the element, the second specified
    * function fires.
+   *
+   * Since GQuery 1.4.0, this method binds handlers for both mouseenter and mouseleave events.
    */
   LazyGQuery<T> hover(Function fover, Function fout);
 
@@ -2227,6 +2230,14 @@ public interface LazyGQuery<T> extends LazyBase<T>{
    */
   LazyGQuery<T> trigger(int eventbits, int... keys);
 
+  /**
+   * Trigger a event in all matched elements.
+   *
+   * @param eventName An string representing the type of the event desired
+   * @param datas Additional parameters to pass along to the event handlers.
+   */
+  LazyGQuery<T> trigger(String eventName, Object... datas);
+
   /**
    * Removes all events that match the eventbits.
    */
index 741cfb85ad023149b6e484ad9e08744e29c9ad3a..c0689af6367a41b2b795c4354d2fd22be09f4465 100644 (file)
@@ -13,6 +13,7 @@
  */
 package com.google.gwt.query.client.plugins;
 import com.google.gwt.dom.client.Element;
+import com.google.gwt.dom.client.FormElement;
 import com.google.gwt.dom.client.NativeEvent;
 import com.google.gwt.dom.client.Node;
 import com.google.gwt.query.client.Function;
@@ -132,11 +133,19 @@ public interface LazyEvents<T> extends LazyBase<T>{
   /**
    * Trigger a html event in all matched elements.
    *
-   * @param htmlEvent An string representing the html event desired
+   * @param htmlEvent A string representing the desired html event.
    * @functions a set of function to run if the event is not canceled.
    */
   LazyEvents<T> triggerHtmlEvent(String htmlEvent, Function... functions);
 
+  /**
+   * Trigger a html event in all matched elements.
+   *
+   * @param htmlEvent An string representing the desired html event.
+   * @functions a set of function to run if the event is not canceled.
+   */
+  LazyEvents<T> triggerHtmlEvent(String htmlEvent, Object[] datas, Function... functions);
+
   /**
    * Removes all handlers, that matches the events bits passed, from each element.
    *