From 25a6102c6faf00a2f608df49e4eb3f61d33c21b9 Mon Sep 17 00:00:00 2001 From: Manolo Carrasco Date: Fri, 4 Mar 2011 13:13:49 +0000 Subject: update lazy interfaces --- .../java/com/google/gwt/query/client/LazyGQuery.java | 8 +++++++- .../google/gwt/query/client/plugins/LazyWidgets.java | 18 +++++++++++++++--- 2 files changed, 22 insertions(+), 4 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 d3a49767..09a14f4a 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 @@ -287,7 +287,7 @@ public interface LazyGQuery extends LazyBase{ * * */ - LazyGQuery css(CssSetter cssSetter); + LazyGQuery css(CssSetter... cssSetter); /** * Set a key/value object as style properties to all matched elements. This @@ -1218,6 +1218,12 @@ public interface LazyGQuery extends LazyBase{ */ W widget(); + /** + * Return the nth non null attached widget from the matched elements or null + * if there isn't any. + */ + W widget(int n); + /** * return the list of attached widgets matching the query */ diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyWidgets.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyWidgets.java index fbfee85d..39101214 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyWidgets.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyWidgets.java @@ -14,21 +14,24 @@ * the License. */ package com.google.gwt.query.client.plugins; +import java.util.ArrayList; +import java.util.List; import com.google.gwt.dom.client.Element; import com.google.gwt.query.client.Function; import com.google.gwt.query.client.GQuery; import com.google.gwt.query.client.plugins.widgets.ButtonWidgetFactory; +import com.google.gwt.query.client.plugins.widgets.DateBoxWidgetFactory; +import com.google.gwt.query.client.plugins.widgets.RichTextWidgetFactory; import com.google.gwt.query.client.plugins.widgets.TabPanelWidgetFactory; +import com.google.gwt.query.client.plugins.widgets.TabPanelWidgetFactory.TabPanelOptions; import com.google.gwt.query.client.plugins.widgets.TextBoxWidgetFactory; import com.google.gwt.query.client.plugins.widgets.WidgetFactory; import com.google.gwt.query.client.plugins.widgets.WidgetOptions; -import com.google.gwt.query.client.plugins.widgets.TabPanelWidgetFactory.TabPanelOptions; import com.google.gwt.user.client.ui.Button; import com.google.gwt.user.client.ui.TabPanel; import com.google.gwt.user.client.ui.TextBox; import com.google.gwt.user.client.ui.Widget; -import java.util.ArrayList; -import java.util.List; +import com.google.gwt.user.datepicker.client.DateBox; import com.google.gwt.query.client.LazyBase; public interface LazyWidgets extends LazyBase{ @@ -79,6 +82,15 @@ public interface LazyWidgets extends LazyBase{ */ LazyWidgets buttons(Function... initFunctions); + /** + * Create a {@link DateBox} widget for each selected element. The + * initFunctions will be called on each new {@link Button} + * created by passing them in parameter. + */ + LazyWidgets datebox(Function... initFunctions); + + LazyWidgets richtext(Function... initFunctions); + /** * Create an return a {@link TextBox} widget with the first element of the * query.The initFunctions will be called on the new -- cgit v1.2.3