diff options
author | Manolo Carrasco <manolo@apache.org> | 2011-01-16 10:16:01 +0000 |
---|---|---|
committer | Manolo Carrasco <manolo@apache.org> | 2011-01-16 10:16:01 +0000 |
commit | 90a09550edf798074cae57e6e33b0b5a7a93fb69 (patch) | |
tree | 3f129ebc209c1c4e51eaa17581f6e7033d0e9ae6 | |
parent | 233d3e71c31ceadf60498fd0cb44a630fcd5f96e (diff) | |
download | gwtquery-90a09550edf798074cae57e6e33b0b5a7a93fb69.tar.gz gwtquery-90a09550edf798074cae57e6e33b0b5a7a93fb69.zip |
adding Lazy interface for Widgets plugin. Fixing a test
3 files changed, 37 insertions, 4 deletions
diff --git a/extractLazyInterfaces.sh b/extractLazyInterfaces.sh index 25d480c4..89f13b80 100644 --- a/extractLazyInterfaces.sh +++ b/extractLazyInterfaces.sh @@ -2,4 +2,5 @@ perl extractInterface.pl --lazy --input=./gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Events.java perl extractInterface.pl --lazy --input=./gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Effects.java +perl extractInterface.pl --lazy --input=./gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Widgets.java perl extractInterface.pl --lazy --input=./gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyWidgets.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyWidgets.java new file mode 100644 index 00000000..27ec1ee3 --- /dev/null +++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyWidgets.java @@ -0,0 +1,32 @@ +/* + * Copyright 2009 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.google.gwt.query.client.plugins; +import com.google.gwt.dom.client.Element; +import com.google.gwt.dom.client.NodeList; +import com.google.gwt.query.client.GQuery; +import com.google.gwt.query.client.JSArray; +import com.google.gwt.query.client.Plugin; +import com.google.gwt.user.client.ui.Button; +import com.google.gwt.user.client.ui.HTML; +import com.google.gwt.user.client.ui.TextBox; +import com.google.gwt.user.client.ui.Widget; +import com.google.gwt.query.client.LazyBase; + +public interface LazyWidgets<T> extends LazyBase<T>{ + + Widget widget(); + +} diff --git a/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryCoreTest.java b/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryCoreTest.java index e287f294..061f8277 100644 --- a/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryCoreTest.java +++ b/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryCoreTest.java @@ -303,18 +303,18 @@ public class GQueryCoreTest extends GWTTestCase { public void testIssue23() { $(e).html("<table><tr><td><input type='radio' name='n' value='v1'>1</input><input type='radio' name='n' value='v2' checked='checked'>2</input></td><td><button>Click</button></tr><td></table>"); $("button").click(new Function() { - public boolean f(Event e) { - $("table > tbody > tr > td > input:checked").each(new Function() { + public boolean f(Event ev) { + done = 0; + $("table > tbody > tr > td > input:checked", e).each(new Function() { public void f(Element e) { done++; } }); + assertEquals(1, done); return true; } }); - done = 0; $("button").click(); - assertEquals(1,done); } public void testModifyMethods() { |