]> source.dussan.org Git - gwtquery.git/commitdiff
remove the asWidget() method from GQuery class as Widgets plugin is in a experimental...
authorJulien Dramaix <julien.dramaix@gmail.com>
Wed, 2 Mar 2011 21:07:54 +0000 (21:07 +0000)
committerJulien Dramaix <julien.dramaix@gmail.com>
Wed, 2 Mar 2011 21:07:54 +0000 (21:07 +0000)
gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java
gwtquery-core/src/main/java/com/google/gwt/query/client/LazyGQuery.java
gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryCoreTest.java
gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryWidgetsTest.java

index 5f96cb7a849d2dd3dd3028d69703b994deccbb1b..9922eeac505dc164a82e168cd192bbb396d282e5 100644 (file)
@@ -726,9 +726,9 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
    * tagName.\r
    * \r
    */\r
-  public Widget asWidget() {\r
-    return as(Widgets).widget();\r
-  }\r
+//  public Widget asWidget() {\r
+//    return as(Widgets).widget();\r
+//  }\r
 \r
   /**\r
    * Set a key/value object as properties to all matched elements.\r
index 4489a8ed8965ba36cdccf64288dde5b02c211cda..2c62ea6150eb5d0da9c124e8a328d6d34d636db9 100644 (file)
@@ -163,7 +163,7 @@ public interface LazyGQuery<T> extends LazyBase<T>{
    * tagName.
    * 
    */
-  Widget asWidget();
+  // Widget asWidget();
 
   /**
    * Set a key/value object as properties to all matched elements.
index 304dc9e8253136adfbc14e5cc941c4451deba5a2..af0c70c256d23855b548f0054b330b598a9da9a1 100644 (file)
@@ -31,6 +31,7 @@ import com.google.gwt.event.dom.client.ClickHandler;
 import com.google.gwt.junit.client.GWTTestCase;
 import com.google.gwt.query.client.impl.SelectorEngineImpl;
 import com.google.gwt.query.client.impl.SelectorEngineSizzle;
+import com.google.gwt.query.client.plugins.Widgets;
 import com.google.gwt.user.client.Event;
 import com.google.gwt.user.client.ui.Button;
 import com.google.gwt.user.client.ui.HTML;
@@ -791,10 +792,10 @@ public class GQueryCoreTest extends GWTTestCase {
     RootPanel.get().add(b1);
     
     GQuery g = $(b1);
-    Button b2 = (Button) g.asWidget();
+    Button b2 = (Button) g.widget();
     assertEquals(b1, b2);
     
-    b2 = (Button)$("<button>Click-me</button>").appendTo(document).asWidget();
+    b2 = $("<button>Click-me</button>").appendTo(document).as(Widgets.Widgets).button();
     b2.addClickHandler(new ClickHandler() {
       public void onClick(ClickEvent event) {
         $(b1).css("color", "red");
index e9de213b31d65aa58c728f597d6e90097884b5fa..3ae8a40506af14cc32644ce625dc41eb60c93091 100644 (file)
@@ -112,7 +112,7 @@ public class GQueryWidgetsTest extends GWTTestCase {
     assertEquals(b1, b2);
     
     
-    b2 = (Button)$("<button>Click-me</button>").appendTo(document).asWidget();
+    b2 = $("<button>Click-me</button>").appendTo(document).as(Widgets.Widgets).button();
     b2.addClickHandler(new ClickHandler() {
       public void onClick(ClickEvent event) {
         $(b1).css("color", "red");