diff options
author | Manuel Carrasco Moñino <manuel.carrasco.m@gmail.com> | 2013-12-05 17:55:41 +0100 |
---|---|---|
committer | Manuel Carrasco Moñino <manuel.carrasco.m@gmail.com> | 2013-12-05 17:55:41 +0100 |
commit | 1d41c7399d8df35d0d16e07eeb44ea832f87f67c (patch) | |
tree | 2ff32c54072c915695a3b0da66f3f9a94abd1768 | |
parent | 4a9488aca04b5212f784e848cc9e2d1083fbe31c (diff) | |
download | gwtquery-1d41c7399d8df35d0d16e07eeb44ea832f87f67c.tar.gz gwtquery-1d41c7399d8df35d0d16e07eeb44ea832f87f67c.zip |
update lazy interfaces
-rw-r--r-- | gwtquery-core/src/main/java/com/google/gwt/query/client/LazyGQuery.java | 11 | ||||
-rw-r--r-- | gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyEvents.java | 11 |
2 files changed, 21 insertions, 1 deletions
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/LazyGQuery.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/LazyGQuery.java index da0de164..2d9ce894 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/client/LazyGQuery.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/LazyGQuery.java @@ -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); @@ -2228,6 +2231,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. */ LazyGQuery<T> unbind(int eventbits); diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyEvents.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyEvents.java index 741cfb85..c0689af6 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyEvents.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyEvents.java @@ -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,12 +133,20 @@ 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. * * Example: unbind(Event.ONCLICK | Event.ONMOUSEOVER) |