]> source.dussan.org Git - gwtquery.git/commitdiff
update lazy interface with last gquery new methods
authorManolo Carrasco <manolo@apache.org>
Sun, 27 Feb 2011 12:58:36 +0000 (12:58 +0000)
committerManolo Carrasco <manolo@apache.org>
Sun, 27 Feb 2011 12:58:36 +0000 (12:58 +0000)
gwtquery-core/src/main/java/com/google/gwt/query/client/LazyGQuery.java

index 7a3c2e9bb4fa41828ee387262df749a150265062..5ec1d83175aca0f34000bf9c67e297c67c540a9c 100644 (file)
@@ -17,6 +17,11 @@ package com.google.gwt.query.client;
 import static com.google.gwt.query.client.plugins.Effects.Effects;
 import static com.google.gwt.query.client.plugins.Events.Events;
 import static com.google.gwt.query.client.plugins.Widgets.Widgets;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
 import com.google.gwt.core.client.GWT;
 import com.google.gwt.core.client.JavaScriptObject;
 import com.google.gwt.core.client.JsArray;
@@ -31,9 +36,9 @@ import com.google.gwt.dom.client.Node;
 import com.google.gwt.dom.client.NodeList;
 import com.google.gwt.dom.client.OptionElement;
 import com.google.gwt.dom.client.SelectElement;
-import com.google.gwt.dom.client.TextAreaElement;
 import com.google.gwt.dom.client.Style.Display;
 import com.google.gwt.dom.client.Style.HasCssName;
+import com.google.gwt.dom.client.TextAreaElement;
 import com.google.gwt.query.client.css.CSS;
 import com.google.gwt.query.client.css.CssProperty;
 import com.google.gwt.query.client.css.TakeCssValue;
@@ -45,10 +50,6 @@ import com.google.gwt.user.client.Event;
 import com.google.gwt.user.client.EventListener;
 import com.google.gwt.user.client.Window;
 import com.google.gwt.user.client.ui.Widget;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
 import com.google.gwt.query.client.LazyBase;
 
 public interface LazyGQuery<T> extends LazyBase<T>{
@@ -325,8 +326,6 @@ public interface LazyGQuery<T> extends LazyBase<T>{
    */
   LazyGQuery<T> css(String prop, String val);
 
-  // <S, T extends TakeCssValue<S>> LazyGQuery<T> css(T cssProperty, S value);
-
   /**
    * Set CSS a single style property on every matched element using type-safe
    * enumerations. This method allows you to set manually the value or set
@@ -1235,6 +1234,15 @@ public interface LazyGQuery<T> extends LazyBase<T>{
    */
   List<Widget> widgets();
 
+  /**
+   * Return the list of attached widgets instance of the provided class matching the query.
+   * 
+   * This method is very useful for decoupled views, so as we can access widgets from other
+   * views without maintaining methods which export them.
+   *  
+   */
+  <W extends Widget> List<W> widgets(Class<W> clazz);
+
   /**
    * Get the current computed, pixel, width of the first matched element.
    * It does not include margin, padding nor border.