Browse Source

adding Lazy interface for Widgets plugin. Fixing a test

tags/release-1.3.2
Manolo Carrasco 13 years ago
parent
commit
90a09550ed

+ 1
- 0
extractLazyInterfaces.sh View File

@@ -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

+ 32
- 0
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyWidgets.java View File

@@ -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();

}

+ 4
- 4
gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryCoreTest.java View File

@@ -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() {

Loading…
Cancel
Save