]> source.dussan.org Git - gwtquery.git/commitdiff
Changing script to generate lazy interfaces so as plugins could import any class...
authorManolo Carrasco <manolo@apache.org>
Sun, 2 Feb 2014 06:34:58 +0000 (07:34 +0100)
committerManolo Carrasco <manolo@apache.org>
Sun, 2 Feb 2014 06:34:58 +0000 (07:34 +0100)
extractInterface.pl
gwtquery-core/src/main/java/com/google/gwt/query/client/IsProperties.java
gwtquery-core/src/main/java/com/google/gwt/query/client/LazyGQuery.java
gwtquery-core/src/main/java/com/google/gwt/query/client/Properties.java
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyEffects.java
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyEvents.java
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyWidgets.java

index 0414e37356304b345dcc6e96a53835c32e38c317..c1b1e6b5a4beef156139ca8bd456f9345f5f2e00 100644 (file)
@@ -76,7 +76,7 @@ close(F);
 my $class = "public interface $oclass";
 if ($lazy) {
   $class .= "<T> extends LazyBase<T>" if ($lazy);
-  $head .= "import com.google.gwt.query.client.GQuery.Offset;\n";
+  $head .= "import com.google.gwt.query.client.GQuery.*;\n";
   $head .= "import com.google.gwt.query.client.LazyBase;\n\n";
 }
 
index f973afb071f37e118354d30533aab48e4d3a037f..bcd79cdb960ad44852c1c9b1ca17d287fbc18e3a 100644 (file)
@@ -66,7 +66,7 @@ public interface IsProperties {
    * Example {"user":{"name":"manolo","surname":"carrasco"}}
    */
   String toJsonWithName();
-
+  
   /**
    * return a string which represents the object in a queryString format.
    */
@@ -78,5 +78,9 @@ public interface IsProperties {
   String getJsonName();
   
   
+  /**
+   * converts a JsonBuilder instance into another JsonBuilder type but
+   * preserving the underlying data object. 
+   */
   <T extends JsonBuilder> T as (Class<T> clz);
 }
index 958ed2a8db9c946a4d2ae3751aaf62e9c8bcc02b..804e533b88b7ffd040283948e8723ab0572448a2 100644 (file)
@@ -65,7 +65,7 @@ import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
 import static com.google.gwt.query.client.plugins.QueuePlugin.Queue;
-import com.google.gwt.query.client.GQuery.Offset;
+import com.google.gwt.query.client.GQuery.*;
 import com.google.gwt.query.client.LazyBase;
 
 public interface LazyGQuery<T> extends LazyBase<T>{
index ce703aed9c1c47fc691a82bea83b3c8c522ff66c..ed39d4ebe14930e9439d86170f57f59aed9609b8 100644 (file)
@@ -223,7 +223,11 @@ public class Properties extends JavaScriptObject implements IsProperties {
   }
   
   public final String toJsonWithName() {
-    return "{\"properties\":{" + toJson() + "}";
+    return toJsonWithName(getJsonName());
+  }
+  
+  public final String toJsonWithName(String name) {
+    return "{\"" + name + "\":{" + toJson() + "}";
   }
 
   @SuppressWarnings("unchecked")
index b59ebeb2c74228068dc8bdf1dadc063da2056127..cf62be4fabc724020f74fc10821b8bba9591ccf6 100644 (file)
@@ -25,7 +25,7 @@ import com.google.gwt.query.client.plugins.effects.Fx;
 import com.google.gwt.query.client.plugins.effects.PropertiesAnimation.Easing;
 import com.google.gwt.query.client.plugins.effects.PropertiesAnimation.EasingCurve;
 import com.google.gwt.query.client.plugins.effects.TransitionsAnimation.TransitionsClipAnimation;
-import com.google.gwt.query.client.GQuery.Offset;
+import com.google.gwt.query.client.GQuery.*;
 import com.google.gwt.query.client.LazyBase;
 
 public interface LazyEffects<T> extends LazyBase<T>{
index 1d84d8a6169ea049885058bb9dc2741395b41a50..37244237a0eb4bbdd55ed8ba4565abddd375c47b 100644 (file)
@@ -23,7 +23,7 @@ import com.google.gwt.query.client.plugins.events.EventsListener;
 import com.google.gwt.query.client.plugins.events.EventsListener.SpecialEvent;
 import com.google.gwt.query.client.plugins.events.GqEvent;
 import com.google.gwt.user.client.Event;
-import com.google.gwt.query.client.GQuery.Offset;
+import com.google.gwt.query.client.GQuery.*;
 import com.google.gwt.query.client.LazyBase;
 
 public interface LazyEvents<T> extends LazyBase<T>{
index c678c8f1e33ae7b0a0481be05fb367cd4d05a885..8c40c2937dc58dae2a833fbecdb12eb563f1f368 100644 (file)
@@ -33,7 +33,7 @@ import com.google.gwt.user.client.ui.PasswordTextBox;
 import com.google.gwt.user.client.ui.TextArea;
 import com.google.gwt.user.client.ui.TextBox;
 import com.google.gwt.user.client.ui.Widget;
-import com.google.gwt.query.client.GQuery.Offset;
+import com.google.gwt.query.client.GQuery.*;
 import com.google.gwt.query.client.LazyBase;
 
 public interface LazyWidgets<T> extends LazyBase<T>{