From 1d41c7399d8df35d0d16e07eeb44ea832f87f67c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Manuel=20Carrasco=20Mo=C3=B1ino?= Date: Thu, 5 Dec 2013 17:55:41 +0100 Subject: [PATCH] update lazy interfaces --- .../java/com/google/gwt/query/client/LazyGQuery.java | 11 +++++++++++ .../google/gwt/query/client/plugins/LazyEvents.java | 11 ++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) 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 extends LazyBase{ * '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 hover(Function fover, Function fout); @@ -2227,6 +2230,14 @@ public interface LazyGQuery extends LazyBase{ */ LazyGQuery 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 trigger(String eventName, Object... datas); + /** * Removes all events that match the 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,11 +133,19 @@ public interface LazyEvents extends LazyBase{ /** * 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 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 triggerHtmlEvent(String htmlEvent, Object[] datas, Function... functions); + /** * Removes all handlers, that matches the events bits passed, from each element. * -- 2.39.5