aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/LazyGQuery.java8
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyWidgets.java18
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<T> extends LazyBase<T>{
* </pre>
*
*/
- LazyGQuery<T> css(CssSetter cssSetter);
+ LazyGQuery<T> css(CssSetter... cssSetter);
/**
* Set a key/value object as style properties to all matched elements. This
@@ -1219,6 +1219,12 @@ public interface LazyGQuery<T> extends LazyBase<T>{
<W extends Widget> W widget();
/**
+ * Return the nth non null attached widget from the matched elements or null
+ * if there isn't any.
+ */
+ <W extends Widget> W widget(int n);
+
+ /**
* return the list of attached widgets matching the query
*/
List<Widget> widgets();
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<T> extends LazyBase<T>{
@@ -80,6 +83,15 @@ public interface LazyWidgets<T> extends LazyBase<T>{
LazyWidgets<T> buttons(Function... initFunctions);
/**
+ * Create a {@link DateBox} widget for each selected element. The
+ * <code>initFunctions</code> will be called on each new {@link Button}
+ * created by passing them in parameter.
+ */
+ LazyWidgets<T> datebox(Function... initFunctions);
+
+ LazyWidgets<T> richtext(Function... initFunctions);
+
+ /**
* Create an return a {@link TextBox} widget with the first element of the
* query.The <code>initFunctions</code> will be called on the new
* {@link TextBox} created by passing it in parameter.