]> source.dussan.org Git - gwtquery.git/commitdiff
updated Lazy interface with new GQuery methods
authorManolo Carrasco <manolo@apache.org>
Wed, 23 Jun 2010 09:36:32 +0000 (09:36 +0000)
committerManolo Carrasco <manolo@apache.org>
Wed, 23 Jun 2010 09:36:32 +0000 (09:36 +0000)
gwtquery-core/src/main/java/com/google/gwt/query/client/LazyGQuery.java

index a336d1649072c757e2473381745dfe77c2fe797a..fb4ce6ff593cfa918d41fac743039e42240c8035 100644 (file)
@@ -20,6 +20,7 @@ import com.google.gwt.core.client.GWT;
 import com.google.gwt.core.client.JavaScriptObject;
 import com.google.gwt.core.client.JsArray;
 import com.google.gwt.core.client.JsArrayString;
+import com.google.gwt.dom.client.BodyElement;
 import com.google.gwt.dom.client.ButtonElement;
 import com.google.gwt.dom.client.Document;
 import com.google.gwt.dom.client.Element;
@@ -37,7 +38,6 @@ import com.google.gwt.query.client.css.Percentage;
 import com.google.gwt.query.client.css.TakesLength;
 import com.google.gwt.query.client.css.TakesPercentage;
 import com.google.gwt.query.client.impl.DocumentStyleImpl;
-import com.google.gwt.query.client.impl.SelectorEngineImpl;
 import com.google.gwt.user.client.Event;
 import com.google.gwt.user.client.Window;
 import com.google.gwt.query.client.LazyBase;
@@ -110,13 +110,32 @@ public interface LazyGQuery<T> extends LazyBase<T>{
   LazyGQuery<T> append(String html);
 
   /**
-   * Append all of the matched elements to another, specified, set of elements.
-   * This operation is, essentially, the reverse of doing a regular
-   * $(A).append(B), in that instead of appending B to A, you're appending A to
-   * B.
+   * All of the matched set of elements will be inserted at the end 
+   * of the element(s) specified by the parameter other.
+   * 
+   * The operation $(A).appendTo(B) is, essentially, the reverse of doing a regular
+   * $(A).append(B), instead of appending B to A, you're appending A to B.
    */
   LazyGQuery<T> appendTo(GQuery other);
 
+  /**
+   * All of the matched set of elements will be inserted at the end 
+   * of the element(s) specified by the parameter other.
+   * 
+   * The operation $(A).appendTo(B) is, essentially, the reverse of doing a regular
+   * $(A).append(B), instead of appending B to A, you're appending A to B.
+   */
+  LazyGQuery<T> appendTo(Node n);
+
+  /**
+   * All of the matched set of elements will be inserted at the end 
+   * of the element(s) specified by the parameter other.
+   * 
+   * The operation $(A).appendTo(B) is, essentially, the reverse of doing a regular
+   * $(A).append(B), instead of appending B to A, you're appending A to B.
+   */
+  LazyGQuery<T> appendTo(String html);
+
   /**
    * Convert to Plugin interface provided by Class literal.
    */
@@ -741,12 +760,31 @@ public interface LazyGQuery<T> extends LazyBase<T>{
   LazyGQuery<T> prepend(String html);
 
   /**
-   * Prepend all of the matched elements to another, specified, set of elements.
-   * This operation is, essentially, the reverse of doing a regular
-   * $(A).prepend(B), in that instead of prepending B to A, you're prepending A
-   * to B.
+   * All of the matched set of elements will be inserted at the beginning 
+   * of the element(s) specified by the parameter other.
+   * 
+   * The operation $(A).prependTo(B) is, essentially, the reverse of doing a regular
+   * $(A).prepend(B), instead of prepending B to A, you're prepending A to B.
    */
-  LazyGQuery<T> prependTo(GQuery elms);
+  LazyGQuery<T> prependTo(GQuery other);
+
+  /**
+   * All of the matched set of elements will be inserted at the beginning 
+   * of the element(s) specified by the parameter other.
+   * 
+   * The operation $(A).prependTo(B) is, essentially, the reverse of doing a regular
+   * $(A).prepend(B), instead of prepending B to A, you're prepending A to B.
+   */
+  LazyGQuery<T> prependTo(Node n);
+
+  /**
+   * All of the matched set of elements will be inserted at the beginning 
+   * of the element(s) specified by the parameter other.
+   * 
+   * The operation $(A).prependTo(B) is, essentially, the reverse of doing a regular
+   * $(A).prepend(B), instead of prepending B to A, you're prepending A to B.
+   */
+  LazyGQuery<T> prependTo(String html);
 
   /**
    * Get a set of elements containing the unique previous siblings of each of
@@ -839,6 +877,12 @@ public interface LazyGQuery<T> extends LazyBase<T>{
    */
   void saveCssAttrs(String... cssProps);
 
+  /**
+   * Force the current matched set of elements to become
+   * the specified array of elements.
+   */
+  LazyGQuery<T> setArray(NodeList<Element> nodes);
+
   /**
    * Bind a set of functions to the scroll event of each matched element.
    * Or trigger the event if no functions are provided.