* 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
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;
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");
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");