aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--extractInterface.pl2
-rw-r--r--gwtquery-core/src/main/code-style/gwt-checkstyle.xml5
-rw-r--r--gwtquery-core/src/main/code-style/gwt-format.xml8
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/Browser.java4
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/Function.java37
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/GQ.java4
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java115
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/IsProperties.java2
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/Lazy.java3
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/LazyBase.java3
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/LazyGQuery.java72
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/Promise.java7
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/Properties.java11
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/Selectors.java6
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/builders/JsonBuilder.java5
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/builders/JsonBuilderBase.java5
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/builders/JsonFactory.java3
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/builders/XmlBuilder.java12
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/builders/XmlBuilderBase.java7
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/css/BackgroundAttachmentProperty.java3
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/css/BackgroundImageProperty.java2
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/css/BackgroundPositionProperty.java15
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/css/BorderCollapseProperty.java3
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/css/BorderSpacingProperty.java2
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/css/BorderStyleProperty.java3
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/css/CSS.java3
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/css/CssProperty.java3
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/css/CursorProperty.java4
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/css/HeightProperty.java2
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/css/MarginProperty.java9
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/css/MultipleValueCssSetter.java7
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/css/OutlineProperty.java2
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/css/PaddingProperty.java9
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/css/TakesCssValue.java9
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/css/UnicodeBidiProperty.java4
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/css/UriValue.java4
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/css/WhiteSpaceProperty.java5
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/css/WidthProperty.java2
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/css/ZIndexProperty.java10
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/impl/AttributeImpl.java22
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/impl/AttributeTridentImpl.java8
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/impl/ConsoleBrowser.java98
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/impl/DocumentStyleImpl.java16
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/impl/DocumentStyleImplIE.java8
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/impl/HasSelector.java3
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngine.java43
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngineCssToXPath.java10
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngineSizzle.java12
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngineSizzleIE.java8
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineJS.java44
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineJSIE.java4
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineSizzleGwt.java40
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineXPath.java8
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsCache.java72
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsClosure.java4
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsMap.java7
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsNamedArray.java16
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsNodeArray.java4
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsObjectArray.java2
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsRegexp.java20
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsUtils.java161
-rwxr-xr-xgwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Effects.java24
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Events.java2
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyEffects.java28
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyEvents.java5
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyWidgets.java5
-rwxr-xr-xgwtquery-core/src/main/java/com/google/gwt/query/client/plugins/MouseOptions.java2
-rwxr-xr-xgwtquery-core/src/main/java/com/google/gwt/query/client/plugins/MousePlugin.java20
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/QueuePlugin.java10
-rwxr-xr-xgwtquery-core/src/main/java/com/google/gwt/query/client/plugins/UiPlugin.java12
-rwxr-xr-xgwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Widgets.java4
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/ajax/Ajax.java13
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/Callbacks.java9
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/FunctionDeferred.java3
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/PromiseRPC.java2
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/PromiseReqBuilder.java14
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/PromiseReqBuilderJSONP.java4
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Fx.java14
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/PropertiesAnimation.java34
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/TransitionsAnimation.java5
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/EventsListener.java40
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/GqEvent.java28
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/HtmlPanelWidgetFactory.java3
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/LabelWidgetFactory.java3
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/TextBoxBaseWidgetFactory.java7
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetFactory.java15
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetInitializer.java19
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetsHtmlPanel.java6
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetsUtils.java37
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/rebind/BrowserGenerator.java2
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/rebind/JsniBundleGenerator.java1
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/rebind/JsonBuilderGenerator.java2
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/rebind/SelectorGeneratorCssToXPath.java2
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/rebind/SelectorGeneratorJSOptimal.java2
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/rebind/XmlBuilderGenerator.java2
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/vm/AjaxTransportJre.java2
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/vm/CookieManager.java3
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/vm/JsonFactoryJre.java5
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/vm/ResponseJre.java2
-rw-r--r--gwtquery-core/src/main/java/com/google/web/bindery/requestfactory/shared/gquery/PromiseRF.java2
100 files changed, 630 insertions, 785 deletions
diff --git a/extractInterface.pl b/extractInterface.pl
index c1b1e6b5..9130c495 100644
--- a/extractInterface.pl
+++ b/extractInterface.pl
@@ -73,7 +73,7 @@ while(<F>) {
}
close(F);
-my $class = "public interface $oclass";
+my $class = "/**\n * $oclass.\n * \@param <T>\n */\npublic interface $oclass";
if ($lazy) {
$class .= "<T> extends LazyBase<T>" if ($lazy);
$head .= "import com.google.gwt.query.client.GQuery.*;\n";
diff --git a/gwtquery-core/src/main/code-style/gwt-checkstyle.xml b/gwtquery-core/src/main/code-style/gwt-checkstyle.xml
index 111e29c6..04f8c3e8 100644
--- a/gwtquery-core/src/main/code-style/gwt-checkstyle.xml
+++ b/gwtquery-core/src/main/code-style/gwt-checkstyle.xml
@@ -76,9 +76,6 @@ Description:
<property name="checkHtml" value="false"/>
<property name="tokens" value="CLASS_DEF,CTOR_DEF,INTERFACE_DEF,METHOD_DEF,VARIABLE_DEF"/>
</module>
- <module name="NeedBraces">
- <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="make sure if has braces"/>
- </module>
<module name="JavadocMethod">
<metadata name="com.atlassw.tools.eclipse.checkstyle.lastEnabledSeverity" value="info"/>
<property name="severity" value="info"/>
@@ -156,7 +153,7 @@ Description:
</module>
<module name="MethodName">
<property name="severity" value="error"/>
- <property name="format" value="^[a-z$][a-zA-Z0-9]*$"/>
+ <property name="format" value="^[a-z$XJD:][a-zA-Z0-9$]*$"/>
</module>
<module name="MemberName">
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Field names must start with [a-z], may not start with f[A-Z], and should not contain '_''s."/>
diff --git a/gwtquery-core/src/main/code-style/gwt-format.xml b/gwtquery-core/src/main/code-style/gwt-format.xml
index 1873dbdb..398c5d98 100644
--- a/gwtquery-core/src/main/code-style/gwt-format.xml
+++ b/gwtquery-core/src/main/code-style/gwt-format.xml
@@ -57,14 +57,14 @@
<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="100"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="250"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
@@ -258,7 +258,7 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/Browser.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/Browser.java
index dfe06f22..9dcc63ad 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/Browser.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/Browser.java
@@ -15,8 +15,6 @@
*/
package com.google.gwt.query.client;
-import com.google.gwt.query.rebind.BrowserGenerator;
-
/**
* This class is the equivalent to the jQuery.browser object in gQuery.
*
@@ -65,7 +63,7 @@ public abstract class Browser {
*/
public final boolean opera = isOpera();
/**
- * Maintained for jQuery compatibility
+ * Maintained for jQuery compatibility.
* @return true if webkit
* @deprecated use webkit() instead
*/
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/Function.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/Function.java
index 7416870d..3f96b17e 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/Function.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/Function.java
@@ -113,7 +113,7 @@ public abstract class Function {
}
/**
- * Set the list of arguments to be passed to the function
+ * Set the list of arguments to be passed to the function.
*/
public Function setArguments(Object...arguments) {
this.arguments = arguments;
@@ -121,7 +121,8 @@ public abstract class Function {
}
/**
- * Return the first element of the arguments list
+ * Return the first element of the arguments list.
+ *
* @deprecated use getArgument(idx) instead.
*/
@Deprecated
@@ -130,7 +131,7 @@ public abstract class Function {
}
/**
- * @deprecated use getArgument instead
+ * @deprecated use getArgument instead.
*/
@Deprecated
public Object getDataObject(int idx) {
@@ -193,7 +194,7 @@ public abstract class Function {
}
/**
- * Convenience alias for the getArguments(argIdx, pos) method;
+ * Convenience alias for the getArguments(argIdx, pos) method.
*/
public <T> T arguments(int argIdx, int pos) {
return getArgument(argIdx, pos);
@@ -250,7 +251,7 @@ public abstract class Function {
}
/**
- * @deprecated use: getArgument()
+ * @deprecated use: getArgument() instead.
*/
@Deprecated
public Properties getDataProperties() {
@@ -258,7 +259,7 @@ public abstract class Function {
}
/**
- * @deprecated use: getArgument(idx)
+ * @deprecated use: getArgument(idx) instead.
*/
@Deprecated
public Properties getDataProperties(int idx) {
@@ -266,7 +267,7 @@ public abstract class Function {
}
/**
- * @deprecated use: setArguments()
+ * @deprecated use: setArguments() instead.
*/
@Deprecated
public void setData(boolean b) {
@@ -274,7 +275,7 @@ public abstract class Function {
}
/**
- * @deprecated use: setArguments()
+ * @deprecated use: setArguments() instead.
*/
@Deprecated
public void setData(double b) {
@@ -282,7 +283,7 @@ public abstract class Function {
}
/**
- * @deprecated use use setArguments instead
+ * @deprecated use use setArguments instead.
*/
@Deprecated
public void setData(Object...arguments) {
@@ -298,7 +299,9 @@ public abstract class Function {
}
/**
- * Return the index in a loop execution. Used in GQuery.each()
+ * Return the index in a loop execution.
+ *
+ * Used in GQuery.each()
*/
public int getIndex() {
return index;
@@ -385,7 +388,7 @@ public abstract class Function {
}
/**
- * Override this method for bound callbacks
+ * Override this method for bound callbacks.
*/
public Object f(Object... args) {
setArguments(args);
@@ -394,14 +397,14 @@ public abstract class Function {
}
/**
- * Override this method for bound callbacks
+ * Override this method for bound callbacks.
*/
public void f(int i, Object arg) {
f(i, new Object[]{arg});
}
/**
- * Override this method for bound callbacks
+ * Override this method for bound callbacks.
*/
public void f(int i, Object... args) {
setIndex(i);
@@ -501,7 +504,7 @@ public abstract class Function {
/**
* Methods fe(...) should be used from asynchronous contexts so as we can
* catch the exception and send it to the GWT UncaughtExceptionHandler
- * They are intentionally final to avoid override them
+ * They are intentionally final to avoid override them.
*/
public final void fe(Object arg) {
fe(new Object[]{arg});
@@ -510,7 +513,7 @@ public abstract class Function {
/**
* Methods fe(...) should be used from asynchronous contexts so as we can
* catch the exception and send it to the GWT UncaughtExceptionHandler
- * They are intentionally final to avoid override them
+ * They are intentionally final to avoid override them.
*/
public final Object fe(Object... args) {
if (GWT.getUncaughtExceptionHandler() != null) {
@@ -527,7 +530,7 @@ public abstract class Function {
/**
* Methods fe(...) should be used from asynchronous contexts so as we can
* catch the exception and send it to the GWT UncaughtExceptionHandler
- * They are intentionally final to avoid override them
+ * They are intentionally final to avoid override them.
*/
public final boolean fe(Event ev, Object... args) {
if (GWT.getUncaughtExceptionHandler() != null) {
@@ -544,7 +547,7 @@ public abstract class Function {
/**
* Methods fe(...) should be used from asynchronous contexts so as we can
* catch the exception and send it to the GWT UncaughtExceptionHandler
- * They are intentionally final to avoid override them
+ * They are intentionally final to avoid override them.
*/
public final void fe(com.google.gwt.dom.client.Element elem) {
if (GWT.getUncaughtExceptionHandler() != null) {
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/GQ.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/GQ.java
index 9db9ea69..d8cf76a8 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/GQ.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/GQ.java
@@ -41,7 +41,7 @@ public abstract class GQ {
}
/**
- * Create an instance of a JsonBuilder object whose type is <T>
+ * Create an instance of a JsonBuilder object whose type is <T>.
*/
public static <T extends JsonBuilder> T create(Class<T> clz) {
return getFactory().create(clz);
@@ -89,7 +89,7 @@ public abstract class GQ {
/**
* Return the appropriate transport implementation depending on the runtime
- * environment: browser or JVM
+ * environment: browser or JVM.
*/
public static AjaxTransport getAjaxTransport() {
initFactory();
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java
index a88427e4..b51fc831 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java
@@ -32,9 +32,7 @@ import com.google.gwt.dom.client.NodeList;
import com.google.gwt.dom.client.OptionElement;
import com.google.gwt.dom.client.SelectElement;
import com.google.gwt.dom.client.Style.Display;
-import com.google.gwt.dom.client.Style.HasCssName;
import com.google.gwt.dom.client.TextAreaElement;
-import com.google.gwt.query.client.css.CSS;
import com.google.gwt.query.client.css.HasCssValue;
import com.google.gwt.query.client.css.TakesCssValue;
import com.google.gwt.query.client.css.TakesCssValue.CssSetter;
@@ -69,7 +67,6 @@ import com.google.gwt.user.client.ui.Widget;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-import java.util.Map;
/**
* GwtQuery is a GWT clone of the popular jQuery library.
@@ -102,7 +99,7 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
}
/**
- * Class used internally to create DOM element from html snippet
+ * Class used internally to create DOM element from html snippet.
*/
private static class TagWrapper {
public static final TagWrapper DEFAULT = new TagWrapper(0, "", "");
@@ -148,7 +145,7 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
public static final Document document = GWT.isClient() ? Document.get() : null;
/**
- * Static reference Effects plugin
+ * Static reference Effects plugin.
*/
public static Class<Effects> Effects = com.google.gwt.query.client.plugins.Effects.Effects;
@@ -158,7 +155,7 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
protected static SelectorEngine engine;
/**
- * Static reference Events plugin
+ * Static reference Events plugin.
*/
public static Class<Events> Events = com.google.gwt.query.client.plugins.Events.Events;
@@ -185,7 +182,7 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
private static RegExp tagNameRegex = RegExp.compile("<([\\w:-]+)");
/**
- * Static reference to the Widgets plugin
+ * Static reference to the Widgets plugin.
*/
public static Class<Widgets> Widgets = com.google.gwt.query.client.plugins.Widgets.Widgets;
@@ -260,7 +257,7 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
/**
* Wrap a GQuery around any object, supported objects are:
- * String, GQuery, Function, Widget, JavaScriptObject
+ * String, GQuery, Function, Widget, JavaScriptObject.
*
* In the case of string, we accept a CSS selector which is then used to match a set of
* elements, or a raw HTML to create a GQuery element containing those elements. Xpath
@@ -298,7 +295,7 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
/**
* Create a new GQuery given a list of {@link com.google.gwt.dom.client.Node} or
- * {@link com.google.gwt.user.client.ui.IsWidget}
+ * {@link com.google.gwt.user.client.ui.IsWidget}.
*/
public static GQuery $(List<?> nodesOrWidgets) {
JsNodeArray elms = JsNodeArray.create();
@@ -546,7 +543,7 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
}
/**
- * Execute a function around each object
+ * Execute a function around each object.
*/
public static void each(JsArrayMixed objects, Function f) {
for (int i = 0, l = objects.length(); i < l; i++) {
@@ -555,7 +552,7 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
}
/**
- * Execute a function around each object
+ * Execute a function around each object.
*/
public static <T> void each(List<T> objects, Function f) {
for (int i = 0, l = objects.size(); i < l; i++) {
@@ -564,7 +561,7 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
}
/**
- * Execute a function around each object
+ * Execute a function around each object.
*/
public static <T> void each(T[] objects, Function f) {
for (int i = 0, l = objects.length; i < l; i++) {
@@ -764,7 +761,7 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
/**
* A constructor function that returns a chainable utility object with methods to register
* multiple callbacks into callback queues, invoke callback queues, and relay the success
- * or failure state of any synchronous or asynchronous function
+ * or failure state of any synchronous or asynchronous function.
*/
public static Promise.Deferred Deferred() {
return new Deferred();
@@ -779,14 +776,12 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
private static native void scrollIntoViewImpl(Node n)
/*-{
-
if (n)
n.scrollIntoView()
}-*/;
private static native void setElementValue(Element e, String value)
/*-{
-
e.value = value;
}-*/;
@@ -794,12 +789,12 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
protected String currentSelector;
/**
- * Immutable array of matched elements, modify this using setArray
+ * Immutable array of matched elements, modify this using setArray.
*/
private Element[] elements = new Element[0];
/**
- * The nodeList of matched elements, modify this using setArray
+ * The nodeList of matched elements, modify this using setArray.
*/
// TODO: remove this and use elements, change return type of get()
private NodeList<Element> nodeList = JavaScriptObject.createArray().cast();
@@ -954,7 +949,7 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
* Example:
*
* <pre class="code">
- * //move the element from its original position to left:500px
+ * // move the element from its original position to left:500px
* $("#foo").animate("left:'500'");
*
* // Change the width html attribute of a table, note the symbol '$' to
@@ -971,7 +966,7 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
* Example:
*
* <pre class="code">
- * //move the element from its original position to 500px to the left for 500ms and
+ * // move the element from its original position to 500px to the left for 500ms and
* // change the background color of the element at the end of the animation
*
* $("#foo").animate("left:'+=500'", new Function(){
@@ -1014,7 +1009,7 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
* Example:
*
* <pre class="code">
- * //move the element from its original position to left:500px for 500ms using a swing easing
+ * // move the element from its original position to left:500px for 500ms using a swing easing
* $("#foo").animate("left:'500'", 500, Easing.SWING);
*
* // Change the width html attribute of a table, note the symbol '$' to
@@ -1032,8 +1027,8 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
* Example:
*
* <pre class="code">
- * //move the element from its original position to 500px to the left and 5OOpx down for 400ms.
- * //use a swing easing function for the transition
+ * // move the element from its original position to 500px to the left and 5OOpx down for 400ms.
+ * // use a swing easing function for the transition
* $("#foo").animate(Properties.create("{top:'+=500px',left:'+=500px'}"), 400, Easing.SWING);
* </pre>
*
@@ -1070,7 +1065,7 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
* Example:
*
* <pre class="code">
- * //move the element from its original position to left:500px for 500ms
+ * // move the element from its original position to left:500px for 500ms
* $("#foo").animate("left:'500'", 500);
*
* // Change the width html attribute of a table, note the symbol '$' to
@@ -1088,7 +1083,7 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
* Example:
*
* <pre class="code">
- * //move the element from its original position to 500px to the left for 1000ms and
+ * // move the element from its original position to 500px to the left for 1000ms and
* // change the background color of the element at the end of the animation
* $("#foo").animate("left:'+=500'", 1000, new Function(){
* public void f(Element e){
@@ -1105,9 +1100,8 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
* $("#foo").animate("backgroundColor:'red', color:'#ffffff', borderColor:'rgb(129, 0, 70)', 1000");
* </pre>
*
- * @param prop the property to animate : "cssName:'value'"
- * @param funcs an array of {@link Function} called once the animation is complete
- * @param duration the duration in milliseconds of the animation
+ * @param stringOrProperties the set of properties to animate : "cssName:'value'"
+ * @param funcs an array of {@link Function} called once the animation is complete.
*/
public GQuery animate(Object stringOrProperties, int duration, Function... funcs) {
return as(Effects).animate(stringOrProperties, duration, funcs);
@@ -2018,7 +2012,8 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
/**
* Remove all event handlers previously attached using {@link #live(String, Function)}. In order
* for this method to function correctly, the selector used with it must match exactly the
- * selector initially used with {@link #live(String, Function)}
+ * selector initially used with {@link #live(String, Function)}.
+ *
* @deprecated use {@link #off(String, String)} instead
*/
public GQuery die() {
@@ -2028,7 +2023,7 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
/**
* Remove an event handlers previously attached using {@link #live(int, Function)} In order for
* this method to function correctly, the selector used with it must match exactly the selector
- * initially used with {@link #live(int, Function)}
+ * initially used with {@link #live(int, Function)}.
* @deprecated use {@link #off(String)}
*/
public GQuery die(int eventbits) {
@@ -2038,7 +2033,7 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
/**
* Remove an event handlers previously attached using {@link #live(String, Function)} In order for
* this method to function correctly, the selector used with it must match exactly the selector
- * initially used with {@link #live(String, Function)}
+ * initially used with {@link #live(String, Function)}.
*/
public GQuery die(String eventName) {
return as(Events).die(eventName);
@@ -2646,7 +2641,7 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
}
/**
- * Return true if the first element is visible.isVisible
+ * Return true if the first element is visible.isVisible.
*/
public boolean isVisible() {
return isEmpty() ? false : getStyleImpl().isVisible(get(0));
@@ -3078,7 +3073,7 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
/**
* Get all following siblings of each element up to but not including the element matched by the
- * GQuery object, filtered by a selector
+ * GQuery object, filtered by a selector.
*
* @return
*/
@@ -3149,22 +3144,21 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
*/
public GQuery offset(int top, int left) {
for (Element element : elements()){
- GQuery $element = $(element);
+ GQuery g = $(element);
- String position = $element.css("position", true);
+ String position = g.css("position", true);
if ("static".equals(position)) {
css("position", "relative");
}
- Offset curOffset = $element.offset();
- String curCSSTop = $element.css("top", true);
- String curCSSLeft = $element.css("left", true);
+ Offset curOffset = g.offset();
+ String curCSSTop = g.css("top", true);
+ String curCSSLeft = g.css("left", true);
long curTop = 0;
long curLeft = 0;
- if (("absolute".equals(position) || "fixed".equals(position)) && ("auto".equals(curCSSTop) || "auto".equals
- (curCSSLeft))) {
- Offset curPosition = $element.position();
+ if (("absolute".equals(position) || "fixed".equals(position)) && ("auto".equals(curCSSTop) || "auto".equals(curCSSLeft))) {
+ Offset curPosition = g.position();
curTop = curPosition.top;
curLeft = curPosition.left;
} else {
@@ -3184,7 +3178,7 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
long newTop = top - curOffset.top + curTop;
long newLeft = left - curOffset.left + curLeft;
- $element.css("top", "" + newTop).css("left", "" + newLeft);
+ g.css("top", "" + newTop).css("left", "" + newLeft);
}
return this;
@@ -3252,21 +3246,21 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
}
/**
- * Remove an event handler
+ * Remove an event handler.
*/
public GQuery off(String eventName) {
return unbind(eventName, null);
}
/**
- * Remove an event handler
+ * Remove an event handler.
*/
public GQuery off(String eventName, Function f) {
return unbind(eventName, f);
}
/**
- * Remove an event handler
+ * Remove an event handler.
*/
public GQuery off(String eventName, String selector) {
if (selector == null || selector.isEmpty()) {
@@ -3939,9 +3933,9 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
List<Element> newElements = new ArrayList<Element>();
for (int i = 0, l = target.size(); i < l; i++) {
- GQuery _this = (i > 0 && mustBeCloned) ? this.clone() : this;
- $(target.get(i)).replaceWith(_this);
- newElements.addAll(Arrays.asList(_this.elements));
+ GQuery that = (i > 0 && mustBeCloned) ? this.clone() : this;
+ $(target.get(i)).replaceWith(that);
+ newElements.addAll(Arrays.asList(that.elements));
}
return $(newElements);
}
@@ -4065,8 +4059,9 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
* Scrolls the first matched element into view.
*/
public GQuery scrollIntoView() {
- if (!isEmpty())
+ if (!isEmpty()) {
scrollIntoViewImpl(get(0));
+ }
return this;
}
@@ -4206,7 +4201,7 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
}
/**
- * Make all matched elements visible
+ * Make all matched elements visible.
*/
public GQuery show() {
for (Element e : elements) {
@@ -4562,7 +4557,8 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
/**
* Remove all event delegation that have been bound using
- * {@link #delegate(String, int, Function...)} {@link #live(int, Function...)} methods
+ * {@link #delegate(String, int, Function...)} {@link #live(int, Function...)} methods.
+ *
* @deprecated use {@link #off()}
*/
public GQuery undelegate() {
@@ -4571,7 +4567,8 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
/**
* Undelegate is a way of removing event handlers that have been bound using
- * {@link #delegate(String, int, Function...)} method
+ * {@link #delegate(String, int, Function...)} method.
+ *
* @deprecated use {@link #off(String)}
*/
public GQuery undelegate(String selector) {
@@ -4584,7 +4581,8 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
/**
* Undelegate is a way of removing event handlers that have been bound using
- * {@link #delegate(String, int, Function...)} method
+ * {@link #delegate(String, int, Function...)} method.
+ *
* @deprecated use {@link #off(String)}
*/
public GQuery undelegate(String selector, int eventBit) {
@@ -4597,7 +4595,8 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
/**
* Undelegate is a way of removing event handlers that have been bound using
- * {@link #delegate(String, int, Function...)} method
+ * {@link #delegate(String, int, Function...)} method.
+ *
* @deprecated use {@link #off(String, String)}
*/
public GQuery undelegate(String selector, String eventName) {
@@ -4618,7 +4617,7 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
/**
* This method removes the element's parent. The matched elements replaces their parents within
- * the DOM structure. It is the inverse of {@link GQuery#wrap(GQuery)} method
+ * the DOM structure. It is the inverse of {@link GQuery#wrap(GQuery)} method.
*
* @return
*/
@@ -4626,8 +4625,8 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
for (Element parent : parent().elements) {
if (!"body".equalsIgnoreCase(parent.getTagName())) {
- GQuery $parent = $(parent);
- $parent.replaceWith($parent.children());
+ GQuery g = $(parent);
+ g.replaceWith(g.children());
}
}
return this;
@@ -4636,7 +4635,7 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
/**
* Gets the content of the value attribute of the first matched element, returns only the first
* value even if it is a multivalued element. To get an array of all values in multivalues
- * elements use vals()
+ * elements use vals().
*
* When the first element is a radio-button and is not checked, then it looks for the first
* checked radio-button that has the same name in the list of matched elements.
@@ -4807,7 +4806,7 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
}
/**
- * return the list of attached widgets matching the query
+ * return the list of attached widgets matching the query.
*/
public List<Widget> widgets() {
List<Widget> widgets = new ArrayList<Widget>();
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/IsProperties.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/IsProperties.java
index ac11b119..e2eff943 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/IsProperties.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/IsProperties.java
@@ -72,7 +72,7 @@ public interface IsProperties {
String toQueryString();
/**
- * return the name for this type
+ * return the name for this type.
*/
String getJsonName();
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/Lazy.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/Lazy.java
index 452688b1..e5395bf4 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/Lazy.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/Lazy.java
@@ -21,6 +21,9 @@ package com.google.gwt.query.client;
* method calls to the class which implements the Lazy interface. Methods in the
* generated class do not execute but instead queue up a deferred execution of
* the method.
+ *
+ * @param <S>
+ * @param <T>
*/
public interface Lazy<S, T extends LazyBase> {
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/LazyBase.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/LazyBase.java
index c5294aaa..b3dfb55f 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/LazyBase.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/LazyBase.java
@@ -18,8 +18,9 @@ package com.google.gwt.query.client;
/**
* All lazy interfaces must extend this baseclass. This ensures the done()
* method exists and returns an executable function.
+ *
+ * @param <S>
*/
public interface LazyBase<S> {
-
Function done();
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/LazyGQuery.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/LazyGQuery.java
index 3dbf86db..df766f9a 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/LazyGQuery.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/LazyGQuery.java
@@ -12,17 +12,15 @@
* the License.
*/
package com.google.gwt.query.client;
+
import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.NativeEvent;
import com.google.gwt.dom.client.Node;
import com.google.gwt.dom.client.NodeList;
-import com.google.gwt.dom.client.Style.HasCssName;
import com.google.gwt.query.client.GQuery.Offset;
-import com.google.gwt.query.client.css.CSS;
import com.google.gwt.query.client.css.HasCssValue;
import com.google.gwt.query.client.css.TakesCssValue;
import com.google.gwt.query.client.css.TakesCssValue.CssSetter;
-import com.google.gwt.query.client.impl.SelectorEngine;
import com.google.gwt.query.client.js.JsNamedArray;
import com.google.gwt.query.client.js.JsNodeArray;
import com.google.gwt.query.client.plugins.Effects;
@@ -30,9 +28,12 @@ import com.google.gwt.query.client.plugins.effects.PropertiesAnimation.Easing;
import com.google.gwt.user.client.ui.Widget;
import java.util.List;
-import java.util.Map;
-public interface LazyGQuery<T> extends LazyBase<T>{
+/**
+ * LazyGQuery.
+ * @param <T>
+ */
+public interface LazyGQuery<T> extends LazyBase<T> {
/**
* Add elements to the set of matched elements if they are not included yet.
@@ -93,7 +94,7 @@ public interface LazyGQuery<T> extends LazyBase<T>{
* Example:
*
* <pre class="code">
- * //move the element from its original position to left:500px
+ * // move the element from its original position to left:500px
* $("#foo").animate("left:'500'");
*
* // Change the width html attribute of a table, note the symbol '$' to
@@ -110,7 +111,7 @@ public interface LazyGQuery<T> extends LazyBase<T>{
* Example:
*
* <pre class="code">
- * //move the element from its original position to 500px to the left for 500ms and
+ * // move the element from its original position to 500px to the left for 500ms and
* // change the background color of the element at the end of the animation
*
* $("#foo").animate("left:'+=500'", new Function(){
@@ -151,7 +152,7 @@ public interface LazyGQuery<T> extends LazyBase<T>{
* Example:
*
* <pre class="code">
- * //move the element from its original position to left:500px for 500ms using a swing easing
+ * // move the element from its original position to left:500px for 500ms using a swing easing
* $("#foo").animate("left:'500'", 500, Easing.SWING);
*
* // Change the width html attribute of a table, note the symbol '$' to
@@ -169,8 +170,8 @@ public interface LazyGQuery<T> extends LazyBase<T>{
* Example:
*
* <pre class="code">
- * //move the element from its original position to 500px to the left and 5OOpx down for 400ms.
- * //use a swing easing function for the transition
+ * // move the element from its original position to 500px to the left and 5OOpx down for 400ms.
+ * // use a swing easing function for the transition
* $("#foo").animate(Properties.create("{top:'+=500px',left:'+=500px'}"), 400, Easing.SWING);
* </pre>
*
@@ -205,7 +206,7 @@ public interface LazyGQuery<T> extends LazyBase<T>{
* Example:
*
* <pre class="code">
- * //move the element from its original position to left:500px for 500ms
+ * // move the element from its original position to left:500px for 500ms
* $("#foo").animate("left:'500'", 500);
*
* // Change the width html attribute of a table, note the symbol '$' to
@@ -223,7 +224,7 @@ public interface LazyGQuery<T> extends LazyBase<T>{
* Example:
*
* <pre class="code">
- * //move the element from its original position to 500px to the left for 1000ms and
+ * // move the element from its original position to 500px to the left for 1000ms and
* // change the background color of the element at the end of the animation
* $("#foo").animate("left:'+=500'", 1000, new Function(){
* public void f(Element e){
@@ -240,9 +241,8 @@ public interface LazyGQuery<T> extends LazyBase<T>{
* $("#foo").animate("backgroundColor:'red', color:'#ffffff', borderColor:'rgb(129, 0, 70)', 1000");
* </pre>
*
- * @param prop the property to animate : "cssName:'value'"
- * @param funcs an array of {@link Function} called once the animation is complete
- * @param duration the duration in milliseconds of the animation
+ * @param stringOrProperties the set of properties to animate : "cssName:'value'"
+ * @param funcs an array of {@link Function} called once the animation is complete.
*/
LazyGQuery<T> animate(Object stringOrProperties, int duration, Function... funcs);
@@ -857,7 +857,8 @@ public interface LazyGQuery<T> extends LazyBase<T>{
/**
* Remove all event handlers previously attached using {@link #live(String, Function)}. In order
* for this method to function correctly, the selector used with it must match exactly the
- * selector initially used with {@link #live(String, Function)}
+ * selector initially used with {@link #live(String, Function)}.
+ *
* @deprecated use {@link #off(String, String)} instead
*/
LazyGQuery<T> die();
@@ -865,7 +866,7 @@ public interface LazyGQuery<T> extends LazyBase<T>{
/**
* Remove an event handlers previously attached using {@link #live(int, Function)} In order for
* this method to function correctly, the selector used with it must match exactly the selector
- * initially used with {@link #live(int, Function)}
+ * initially used with {@link #live(int, Function)}.
* @deprecated use {@link #off(String)}
*/
LazyGQuery<T> die(int eventbits);
@@ -873,7 +874,7 @@ public interface LazyGQuery<T> extends LazyBase<T>{
/**
* Remove an event handlers previously attached using {@link #live(String, Function)} In order for
* this method to function correctly, the selector used with it must match exactly the selector
- * initially used with {@link #live(String, Function)}
+ * initially used with {@link #live(String, Function)}.
*/
LazyGQuery<T> die(String eventName);
@@ -1205,7 +1206,7 @@ public interface LazyGQuery<T> extends LazyBase<T>{
boolean isEmpty();
/**
- * Return true if the first element is visible.isVisible
+ * Return true if the first element is visible.isVisible.
*/
boolean isVisible();
@@ -1533,7 +1534,7 @@ public interface LazyGQuery<T> extends LazyBase<T>{
/**
* Get all following siblings of each element up to but not including the element matched by the
- * GQuery object, filtered by a selector
+ * GQuery object, filtered by a selector.
*
* @return
*/
@@ -1605,17 +1606,17 @@ public interface LazyGQuery<T> extends LazyBase<T>{
LazyGQuery<T> off();
/**
- * Remove an event handler
+ * Remove an event handler.
*/
LazyGQuery<T> off(String eventName);
/**
- * Remove an event handler
+ * Remove an event handler.
*/
LazyGQuery<T> off(String eventName, Function f);
/**
- * Remove an event handler
+ * Remove an event handler.
*/
LazyGQuery<T> off(String eventName, String selector);
@@ -1686,9 +1687,9 @@ public interface LazyGQuery<T> extends LazyBase<T>{
/**
* Get the ancestors of each element in the current set of matched elements, up to but not
- * including the element matched by the selector.
+ * including the node.
*/
- LazyGQuery<T> parentsUntil(Node selector);
+ LazyGQuery<T> parentsUntil(Node node);
/**
* Gets the top and left position of an element relative to its offset parent. The returned object
@@ -2115,7 +2116,7 @@ public interface LazyGQuery<T> extends LazyBase<T>{
LazyGQuery<T> setSelector(String selector);
/**
- * Make all matched elements visible
+ * Make all matched elements visible.
*/
LazyGQuery<T> show();
@@ -2313,28 +2314,32 @@ public interface LazyGQuery<T> extends LazyBase<T>{
/**
* Remove all event delegation that have been bound using
- * {@link #delegate(String, int, Function...)} {@link #live(int, Function...)} methods
+ * {@link #delegate(String, int, Function...)} {@link #live(int, Function...)} methods.
+ *
* @deprecated use {@link #off()}
*/
LazyGQuery<T> undelegate();
/**
* Undelegate is a way of removing event handlers that have been bound using
- * {@link #delegate(String, int, Function...)} method
+ * {@link #delegate(String, int, Function...)} method.
+ *
* @deprecated use {@link #off(String)}
*/
LazyGQuery<T> undelegate(String selector);
/**
* Undelegate is a way of removing event handlers that have been bound using
- * {@link #delegate(String, int, Function...)} method
+ * {@link #delegate(String, int, Function...)} method.
+ *
* @deprecated use {@link #off(String)}
*/
LazyGQuery<T> undelegate(String selector, int eventBit);
/**
* Undelegate is a way of removing event handlers that have been bound using
- * {@link #delegate(String, int, Function...)} method
+ * {@link #delegate(String, int, Function...)} method.
+ *
* @deprecated use {@link #off(String, String)}
*/
LazyGQuery<T> undelegate(String selector, String eventName);
@@ -2347,7 +2352,7 @@ public interface LazyGQuery<T> extends LazyBase<T>{
/**
* This method removes the element's parent. The matched elements replaces their parents within
- * the DOM structure. It is the inverse of {@link GQuery#wrap(GQuery)} method
+ * the DOM structure. It is the inverse of {@link GQuery#wrap(GQuery)} method.
*
* @return
*/
@@ -2356,7 +2361,7 @@ public interface LazyGQuery<T> extends LazyBase<T>{
/**
* Gets the content of the value attribute of the first matched element, returns only the first
* value even if it is a multivalued element. To get an array of all values in multivalues
- * elements use vals()
+ * elements use vals().
*
* When the first element is a radio-button and is not checked, then it looks for the first
* checked radio-button that has the same name in the list of matched elements.
@@ -2427,7 +2432,7 @@ public interface LazyGQuery<T> extends LazyBase<T>{
<W extends Widget> W widget(int n);
/**
- * return the list of attached widgets matching the query
+ * return the list of attached widgets matching the query.
*/
List<Widget> widgets();
@@ -2549,4 +2554,5 @@ public interface LazyGQuery<T> extends LazyBase<T>{
* everything else.
*/
LazyGQuery<T> wrapInner(String html);
+
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/Promise.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/Promise.java
index 193ac624..3b0650e4 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/Promise.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/Promise.java
@@ -13,7 +13,6 @@
*/
package com.google.gwt.query.client;
-
/**
* Definition of jquery Promise interface used in gquery.
*/
@@ -44,9 +43,9 @@ public interface Promise {
Deferred resolve(Object... o);
}
- public static final String PENDING = "pending";
- public static final String REJECTED = "rejected";
- public static final String RESOLVED = "resolved";
+ String PENDING = "pending";
+ String REJECTED = "rejected";
+ String RESOLVED = "resolved";
/**
* Add handlers to be called when the Deferred object is either resolved or rejected.
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/Properties.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/Properties.java
index 027f8840..d0d899be 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/Properties.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/Properties.java
@@ -71,8 +71,7 @@ public class Properties extends JavaScriptObject implements IsProperties {
.replaceAll(";([^:]+):", ",$1:") // change semicolon
.replaceAll(";([^:]+):", ",$1:") // change semicolon second pass
.replaceAll(":\"(-?\\d[\\d\\.]*|null|false|true)\"[;,]", ":$1,") // numbers do not need quote
- .replaceAll("[;,]+([\\]\\}]|$)", "$1") // remove endings
- ;
+ .replaceAll("[;,]+([\\]\\}]|$)", "$1"); // remove endings
ret = ret.matches("(^[\\[\\{].*[\\]\\}]$)") ? ret : "{" + ret + "}";
return ret;
}
@@ -89,9 +88,7 @@ public class Properties extends JavaScriptObject implements IsProperties {
return this.<JsCache>cast();
}
- public final native Properties cloneProps()
- /*-{
-
+ public final native Properties cloneProps() /*-{
var props = {};
for(p in this) {
props[p] = this[p];
@@ -182,9 +179,7 @@ public class Properties extends JavaScriptObject implements IsProperties {
* Its useful for exporting or importing to javascript.
*
*/
- public final native <T> void setFunction(T name, Function f)
- /*-{
-
+ public final native <T> void setFunction(T name, Function f) /*-{
if (!f) return;
this[name] = function() {
f.@com.google.gwt.query.client.Function::fe(Ljava/lang/Object;)(arguments);
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/Selectors.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/Selectors.java
index 6c44caed..f20619ce 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/Selectors.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/Selectors.java
@@ -54,12 +54,12 @@ public interface Selectors {
* Set the context for all the selectors.
* By default they are evaluated in all the document.
*/
- public void setRoot(Node node);
+ void setRoot(Node node);
/**
* Get the configured root context.
*/
- public Node getRoot();
+ Node getRoot();
/**
* Used for benchmarking purposes, it returns true if the selector engine
@@ -68,5 +68,5 @@ public interface Selectors {
*
* It is useful to check if IE8 native selectors are being used.
*/
- public boolean isDegradated();
+ boolean isDegradated();
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/builders/JsonBuilder.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/builders/JsonBuilder.java
index 60b209c0..41d6cd7e 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/builders/JsonBuilder.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/builders/JsonBuilder.java
@@ -31,8 +31,9 @@ public interface JsonBuilder extends IsProperties {
/**
* Returns the wrapped object, normally a Properties jso in client
- * but can be used to return the underlying Json implementation in JVM
- * @deprecated use asObject() instead
+ * but can be used to return the underlying Json implementation in JVM.
+ *
+ * @deprecated use asObject() instead.
*/
<J> J getProperties();
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/builders/JsonBuilderBase.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/builders/JsonBuilderBase.java
index 4c25117a..13bf2344 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/builders/JsonBuilderBase.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/builders/JsonBuilderBase.java
@@ -22,6 +22,11 @@ import com.google.gwt.query.client.Properties;
import com.google.gwt.query.client.js.JsObjectArray;
import com.google.gwt.query.client.js.JsUtils;
+/**
+ * Common class for all JsonBuilder implementations.
+ *
+ * @param <J>
+ */
public abstract class JsonBuilderBase<J extends JsonBuilderBase<?>> implements JsonBuilder {
protected Properties p = Properties.create();
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/builders/JsonFactory.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/builders/JsonFactory.java
index b4d68323..8e4225c7 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/builders/JsonFactory.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/builders/JsonFactory.java
@@ -17,6 +17,9 @@ package com.google.gwt.query.client.builders;
import com.google.gwt.query.client.IsProperties;
+/**
+ * Factory interface.
+ */
public interface JsonFactory {
<T extends JsonBuilder> T create(Class<T> clz);
IsProperties create(String s);
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/builders/XmlBuilder.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/builders/XmlBuilder.java
index 42ee3af3..4d7cba47 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/builders/XmlBuilder.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/builders/XmlBuilder.java
@@ -39,32 +39,32 @@ public interface XmlBuilder {
Element getRootElement();
/**
- * Appends a node
+ * Appends a node.
*/
void append(XmlBuilder x);
/**
- * Appends xml content
+ * Appends xml content.
*/
void append(String x);
/**
- * Returns the text content of the element
+ * Returns the text content of the element.
*/
String getText();
/**
- * Sets the text content of the element
+ * Sets the text content of the element.
*/
<J> J setText(String t);
/**
- * Returns the text content of the element as a number
+ * Returns the text content of the element as a number.
*/
double getTextAsNumber();
/**
- * Returns the text content of the element as a date
+ * Returns the text content of the element as a date.
*/
Date getTextAsDate();
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/builders/XmlBuilderBase.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/builders/XmlBuilderBase.java
index c8a63495..d8327c77 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/builders/XmlBuilderBase.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/builders/XmlBuilderBase.java
@@ -26,9 +26,14 @@ import com.google.gwt.query.client.js.JsUtils;
import java.util.Date;
+/**
+ * Common code in XmlBuilder implementations.
+ *
+ * @param <J>
+ */
public abstract class XmlBuilderBase<J extends XmlBuilderBase<?>> implements XmlBuilder {
- //TODO empty document
+ // TODO empty document
protected GQuery g = $((Element)JsUtils.parseXML("<root/>"));
public void append(String xml) {
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BackgroundAttachmentProperty.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BackgroundAttachmentProperty.java
index 2be77855..a3afad98 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BackgroundAttachmentProperty.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BackgroundAttachmentProperty.java
@@ -25,6 +25,9 @@ import com.google.gwt.dom.client.Style.HasCssName;
public class BackgroundAttachmentProperty extends
CssProperty<BackgroundAttachmentProperty.BackgroundAttachment> {
+ /**
+ * BackgroundAttachment.
+ */
public static enum BackgroundAttachment implements HasCssName {
/**
* Background image is fixed.
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BackgroundImageProperty.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BackgroundImageProperty.java
index b0924e84..eb5f10d0 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BackgroundImageProperty.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BackgroundImageProperty.java
@@ -16,7 +16,7 @@
package com.google.gwt.query.client.css;
/**
- * This property sets the background image of an element,
+ * This property sets the background image of an element.
*/
public class BackgroundImageProperty extends CssProperty<UriValue> {
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BackgroundPositionProperty.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BackgroundPositionProperty.java
index e16a5daf..87940bf5 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BackgroundPositionProperty.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BackgroundPositionProperty.java
@@ -27,19 +27,16 @@ public class BackgroundPositionProperty extends
/**
* Value for <i>background-position</i> property.
- *
- * @author Julien Dramaix (julien.dramaix@gmail.com)
- *
*/
public static class BackgroundPosition implements HasCssName {
/**
- * Equivalent to {@link BackgroundPosition#CENTER_BOTTOM}
+ * Equivalent to {@link BackgroundPosition#CENTER_BOTTOM}.
*/
public static BackgroundPosition BOTTOM;
/**
- * Equivalent to {@link BackgroundPosition#CENTER_CENTER}
+ * Equivalent to {@link BackgroundPosition#CENTER_CENTER}.
*/
public static BackgroundPosition CENTER;
@@ -62,7 +59,7 @@ public class BackgroundPositionProperty extends
public static BackgroundPosition CENTER_TOP;
/**
- * Equivalent to {@link BackgroundPosition#LEFT_CENTER}
+ * Equivalent to {@link BackgroundPosition#LEFT_CENTER}.
*/
public static BackgroundPosition LEFT;
@@ -85,7 +82,7 @@ public class BackgroundPositionProperty extends
public static BackgroundPosition LEFT_TOP;
/**
- * Equivalent to {@link BackgroundPosition#RIGHT_CENTER}
+ * Equivalent to {@link BackgroundPosition#RIGHT_CENTER}.
*/
public static BackgroundPosition RIGHT;
@@ -108,7 +105,7 @@ public class BackgroundPositionProperty extends
public static BackgroundPosition RIGHT_TOP;
/**
- * Equivalent to {@link BackgroundPosition#CENTER_TOP}
+ * Equivalent to {@link BackgroundPosition#CENTER_TOP}.
*/
public static BackgroundPosition TOP;
@@ -138,7 +135,7 @@ public class BackgroundPositionProperty extends
/**
* Return a {@link BackgroundPosition} by specifying the horizontal and
- * vertical position. Pixel will be used as Unit
+ * vertical position. Pixel will be used as Unit.
*/
public static BackgroundPosition position(int xpos, int ypos) {
return position(xpos, ypos, Unit.PX);
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BorderCollapseProperty.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BorderCollapseProperty.java
index 3f5c4e66..edcfdac4 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BorderCollapseProperty.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BorderCollapseProperty.java
@@ -23,6 +23,9 @@ import com.google.gwt.dom.client.Style.HasCssName;
public class BorderCollapseProperty extends
CssProperty<BorderCollapseProperty.BorderCollapse> {
+ /**
+ * BorderCollapse.
+ */
public static enum BorderCollapse implements HasCssName {
/**
* Borders are collapsed into a single border when possible (border-spacing
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BorderSpacingProperty.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BorderSpacingProperty.java
index 979b5933..81d58fd1 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BorderSpacingProperty.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BorderSpacingProperty.java
@@ -38,7 +38,7 @@ public class BorderSpacingProperty extends
/**
* Construct a {@link BorderSpacing} object with same horizontal and
- * vertical spacing
+ * vertical spacing.
*/
public BorderSpacing(Length spacing) {
this(spacing, spacing);
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BorderStyleProperty.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BorderStyleProperty.java
index 385880aa..d1431407 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BorderStyleProperty.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BorderStyleProperty.java
@@ -24,6 +24,9 @@ import com.google.gwt.dom.client.Style.HasCssName;
public class BorderStyleProperty extends
CssProperty<BorderStyleProperty.BorderStyle> {
+ /**
+ * BorderStyle.
+ */
public static enum BorderStyle implements HasCssName {
/**
* The border is a series of short line segments.
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/CSS.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/CSS.java
index c72fa5ee..c6a43756 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/CSS.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/CSS.java
@@ -17,7 +17,6 @@ package com.google.gwt.query.client.css;
import com.google.gwt.query.client.css.MarginProperty.ShorthandMarginProperty;
import com.google.gwt.query.client.css.PaddingProperty.ShorthandPaddingProperty;
-import com.google.gwt.query.client.css.UnicodeBidiProperty.UnicodeBidi;
/**
* This class lists all CSS properties.
@@ -626,7 +625,7 @@ public class CSS {
/**
* CSS value specifying that the setting of the related property should be
- * inherited from the parent element
+ * inherited from the parent element.
*/
public static final String INHERIT = "inherit";
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/CssProperty.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/CssProperty.java
index 342c67b6..21b1f4b7 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/CssProperty.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/CssProperty.java
@@ -27,6 +27,9 @@ import com.google.gwt.dom.client.Style.HasCssName;
public class CssProperty<T extends HasCssName> implements
TakesCssValue<T> {
+ /**
+ * CssSetterImpl.
+ */
protected class CssSetterImpl implements CssSetter {
private T cssValue;
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/CursorProperty.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/CursorProperty.java
index ed706423..8cb6ae03 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/CursorProperty.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/CursorProperty.java
@@ -19,7 +19,7 @@ import com.google.gwt.dom.client.Style.Cursor;
/**
* The <i>cursor</i> property specifies the type of cursor to be displayed for
- * the pointing device
+ * the pointing device.
*/
public class CursorProperty extends CssProperty<Cursor> {
@@ -33,7 +33,7 @@ public class CursorProperty extends CssProperty<Cursor> {
super(CSS_PROPERTY);
}
- public CssSetter with(UriValue url){
+ public CssSetter with(UriValue url) {
return new SimpleCssSetter(this, url);
}
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/HeightProperty.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/HeightProperty.java
index 3aa8e163..e2cd01ff 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/HeightProperty.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/HeightProperty.java
@@ -17,7 +17,7 @@ package com.google.gwt.query.client.css;
/**
* All height css properties : <i>max-height</i>, <i>min-height</i>,
- * <i>height</i>
+ * <i>height</i>.
*/
public class HeightProperty extends CssProperty<Length> {
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/MarginProperty.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/MarginProperty.java
index 1355276c..6544508a 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/MarginProperty.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/MarginProperty.java
@@ -22,6 +22,9 @@ import com.google.gwt.dom.client.Style;
*/
public class MarginProperty extends CssProperty<Length> {
+ /**
+ * ShorthandMarginProperty.
+ */
public static class ShorthandMarginProperty implements HasCssValue {
private ShorthandMarginProperty() {
@@ -36,7 +39,7 @@ public class MarginProperty extends CssProperty<Length> {
}
/**
- * Apply the same margin to all sides
+ * Apply the same margin to all sides.
*/
public CssSetter with(Length margin) {
return new MultipleValueCssSetter(getCssName(), margin);
@@ -44,7 +47,7 @@ public class MarginProperty extends CssProperty<Length> {
/**
* The top and bottom margins are set to the first value and the right and
- * left margins are set to the second
+ * left margins are set to the second.
*/
public CssSetter with(Length topAndBottom, Length leftAndRight) {
return new MultipleValueCssSetter(getCssName(), topAndBottom, leftAndRight);
@@ -52,7 +55,7 @@ public class MarginProperty extends CssProperty<Length> {
/**
* The top margin is set to the first value, the left and right margins are
- * set to the second, and the bottom margin is set to the third
+ * set to the second, and the bottom margin is set to the third.
*/
public CssSetter with(Length top, Length leftAndRight, Length bottom) {
return new MultipleValueCssSetter(getCssName(), top, leftAndRight, bottom);
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/MultipleValueCssSetter.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/MultipleValueCssSetter.java
index 50305d01..27dbca04 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/MultipleValueCssSetter.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/MultipleValueCssSetter.java
@@ -17,16 +17,19 @@ package com.google.gwt.query.client.css;
import com.google.gwt.dom.client.Style.HasCssName;
+/**
+ * MultipleValueCssSetter.
+ */
public class MultipleValueCssSetter extends SimpleCssSetter {
public MultipleValueCssSetter(String cssPropertyName, HasCssName... values) {
super(cssPropertyName, computeValue(values));
}
- protected static String computeValue(HasCssName... values){
+ protected static String computeValue(HasCssName... values) {
StringBuilder valueBuilder = new StringBuilder();
- for (HasCssName cssValue : values){
+ for (HasCssName cssValue : values) {
valueBuilder.append(notNull(cssValue));
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/OutlineProperty.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/OutlineProperty.java
index 848750fc..820967be 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/OutlineProperty.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/OutlineProperty.java
@@ -28,7 +28,7 @@ import com.google.gwt.query.client.css.TakesCssValue.CssSetter;
* declaration.
*/
public class OutlineProperty implements
- HasCssValue{
+ HasCssValue {
private static final String CSS_PROPERTY = "outline";
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/PaddingProperty.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/PaddingProperty.java
index dac18f81..43a75f62 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/PaddingProperty.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/PaddingProperty.java
@@ -23,6 +23,9 @@ import com.google.gwt.dom.client.Style;
*/
public class PaddingProperty extends CssProperty<Length> {
+ /**
+ * ShorthandPaddingProperty.
+ */
public static class ShorthandPaddingProperty implements HasCssValue {
private ShorthandPaddingProperty() {
@@ -37,7 +40,7 @@ public class PaddingProperty extends CssProperty<Length> {
}
/**
- * Apply the same padding to all sides
+ * Apply the same padding to all sides.
*/
public CssSetter with(Length padding) {
return new MultipleValueCssSetter(getCssName(), padding);
@@ -45,7 +48,7 @@ public class PaddingProperty extends CssProperty<Length> {
/**
* The top and bottom paddings are set to the first value and the right and
- * left paddings are set to the second
+ * left paddings are set to the second.
*/
public CssSetter with(Length topAndBottom, Length leftAndRight) {
return new MultipleValueCssSetter(getCssName(), topAndBottom,
@@ -54,7 +57,7 @@ public class PaddingProperty extends CssProperty<Length> {
/**
* The top padding is set to the first value, the left and right paddings
- * are set to the second, and the bottom padding is set to the third
+ * are set to the second, and the bottom padding is set to the third.
*/
public CssSetter with(Length top, Length leftAndRight, Length bottom) {
return new MultipleValueCssSetter(getCssName(), top, leftAndRight, bottom);
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/TakesCssValue.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/TakesCssValue.java
index 62947bb5..def5d1f1 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/TakesCssValue.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/TakesCssValue.java
@@ -19,11 +19,16 @@ import com.google.gwt.dom.client.Element;
/**
* An CSS property with values of type T.
+ *
+ * @param <T>
*/
public interface TakesCssValue<T> extends HasCssValue {
- public interface CssSetter {
- public void applyCss(Element e);
+ /**
+ * CssSetter.
+ */
+ interface CssSetter {
+ void applyCss(Element e);
}
CssSetter with(T value);
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/UnicodeBidiProperty.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/UnicodeBidiProperty.java
index df0a3d9f..069f00ad 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/UnicodeBidiProperty.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/UnicodeBidiProperty.java
@@ -18,13 +18,13 @@ package com.google.gwt.query.client.css;
import com.google.gwt.dom.client.Style.HasCssName;
/**
- * This property defines the text direction/writing direction
+ * This property defines the text direction/writing direction.
*/
public class UnicodeBidiProperty extends
CssProperty<UnicodeBidiProperty.UnicodeBidi> {
/**
- * Define possible values for <i>unicode-bidi</i> property
+ * Define possible values for <i>unicode-bidi</i> property.
*
*/
public static enum UnicodeBidi implements HasCssName {
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/UriValue.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/UriValue.java
index fb03f115..0ea5ca25 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/UriValue.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/UriValue.java
@@ -18,12 +18,12 @@ package com.google.gwt.query.client.css;
import com.google.gwt.dom.client.Style.HasCssName;
/**
- * Image as css value
+ * Image as css value.
*/
public class UriValue implements HasCssName {
/**
- * Define an uri by an url
+ * Define an uri by an url.
*/
public static UriValue url(String url) {
return new UriValue("url('" + url + "')");
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/WhiteSpaceProperty.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/WhiteSpaceProperty.java
index 6821b085..38ecca52 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/WhiteSpaceProperty.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/WhiteSpaceProperty.java
@@ -19,11 +19,14 @@ import com.google.gwt.dom.client.Style.HasCssName;
/**
* The <i>white-space</i> property declares how white space inside the element
- * is handled
+ * is handled.
*/
public class WhiteSpaceProperty extends
CssProperty<WhiteSpaceProperty.WhiteSpace> {
+ /**
+ * WhiteSpace.
+ */
public enum WhiteSpace implements HasCssName {
/**
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/WidthProperty.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/WidthProperty.java
index 2cfff008..b1f7be26 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/WidthProperty.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/WidthProperty.java
@@ -16,7 +16,7 @@
package com.google.gwt.query.client.css;
/**
- * All width css properties : <i>max-width</i>, <i>min-width</i>, <i>width</i>
+ * All width css properties : <i>max-width</i>, <i>min-width</i>, <i>width</i>.
*/
public class WidthProperty extends CssProperty<Length> {
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/ZIndexProperty.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/ZIndexProperty.java
index 7202f5f3..2bd55ac9 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/ZIndexProperty.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/ZIndexProperty.java
@@ -52,20 +52,18 @@ public class ZIndexProperty implements TakesInteger {
/**
* returns a {@link CssSetter} object setting <i>z-index</i> property to the
- * specified <code>value</code>
+ * specified <code>value</code>.
*/
public CssSetter with(Integer value) {
return new SimpleCssSetter(CSS_PROPERTY, value != null ? value.toString() : null);
}
/**
- * See GWT issue 5548
+ * See GWT issue 5548.
* http://code.google.com/p/google-web-toolkit/issues/detail?id=5548
*/
- private native String getZIndex(Style s)
- /*-{
-
- //force to return a string
+ private native String getZIndex(Style s) /*-{
+ // force to return a string
return "" + s["zIndex"];
}-*/;
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/AttributeImpl.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/AttributeImpl.java
index 0a6a6642..3fc8e3bc 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/AttributeImpl.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/AttributeImpl.java
@@ -1,4 +1,5 @@
-/* Copyright 2011, The gwtquery team.
+/*
+ * Copyright 2011, The gwtquery team.
*
* 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
@@ -10,7 +11,8 @@
* 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. */
+ * the License.
+ */
package com.google.gwt.query.client.impl;
import com.google.gwt.dom.client.Element;
@@ -28,9 +30,9 @@ public class AttributeImpl {
* Interface used for attribute setter implementations.
*/
public interface AttributeSetter {
- public boolean isRemoval(Object value);
+ boolean isRemoval(Object value);
- public void setAttribute(Element e, String name, Object value);
+ void setAttribute(Element e, String name, Object value);
}
/**
@@ -56,7 +58,7 @@ public class AttributeImpl {
}
/**
- * value must be set on element directly
+ * value must be set on element directly.
*/
protected static class ValueAttrSetter extends DefaultSetter {
private static AttributeSetter INSTANCE;
@@ -75,7 +77,7 @@ public class AttributeImpl {
}
/**
- * Boolean attribute :
+ * Boolean attribute.
* - Ensure to set a boolean value to the element's property with the same
* name if this last exists
* - Ensure to set an attribute having the value equals to the name (i.e
@@ -124,7 +126,7 @@ public class AttributeImpl {
/**
* For button and inputs, the type cannot be changed once the element is
- * attached to the dom !
+ * attached to the DOM.
*/
private static class TypeAttrSetter extends DefaultSetter {
private static AttributeSetter INSTANCE;
@@ -145,12 +147,12 @@ public class AttributeImpl {
String tag = e.getNodeName();
if (NOT_AUTHORIZED_NODE.test(tag)
&& GQuery.$(e).parents("body").length() > 0) {
- //TODO maybe it's better to simply do nothing...
+ // TODO maybe it's better to simply do nothing...
throw new RuntimeException(
"You cannot change type of button or input element if the element is already attached to the dom");
}
if ("input".equals(tag.toLowerCase()) && "radio".equals(value)) {
- //some browser (IE6-9) resets value property of the input when you change the type to radio button
+ // some browser (IE6-9) resets value property of the input when you change the type to radio button
InputElement ie = InputElement.as(e);
String keepValue = ie.getValue();
super.setAttribute(ie, "type", value);
@@ -190,7 +192,7 @@ public class AttributeImpl {
value = fixValue(key, value);
for (Element e : gQuery.elements()) {
int nodeType = e.getNodeType();
- //don't set attribute on text, comment and attributes nodes
+ // don't set attribute on text, comment and attributes nodes
if (nodeType == 3 || nodeType == 8 || nodeType == 2) {
continue;
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/AttributeTridentImpl.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/AttributeTridentImpl.java
index 7b10f69e..d8492f29 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/AttributeTridentImpl.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/AttributeTridentImpl.java
@@ -60,9 +60,7 @@ public class AttributeTridentImpl extends AttributeImpl {
}
}
- private static native String getAttributeNode(Element e, String name)
- /*-{
-
+ private static native String getAttributeNode(Element e, String name) /*-{
var attrNode = e.getAttributeNode(name);
if (attrNode && attrNode.nodeValue !== "") {
return attrNode.nodeValue;
@@ -71,9 +69,7 @@ public class AttributeTridentImpl extends AttributeImpl {
}-*/;
private static native boolean setAttributeNode(Element e, String name,
- Object value)
- /*-{
-
+ Object value) /*-{
var attrNode = e.getAttributeNode(name);
if (attrNode) {
attrNode.nodeValue = value;
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/ConsoleBrowser.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/ConsoleBrowser.java
index ace13666..f6e65752 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/ConsoleBrowser.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/ConsoleBrowser.java
@@ -27,13 +27,11 @@ import com.google.gwt.query.client.js.JsObjectArray;
public class ConsoleBrowser implements Console {
/**
- * http://whattheheadsaid.com/2011/04/internet-explorer-9s-problematic-console-object
+ * http://whattheheadsaid.com/2011/04/internet-explorer-9s-problematic-console-object.
*/
private static class ConsoleIe8 extends ConsoleIe9 {
@Override
- protected native void init()
- /*-{
-
+ protected native void init() /*-{
try {
Function.prototype.call.call($wnd.console.log, $wnd.console, Array.prototype.slice.call(arguments));
this.@com.google.gwt.query.client.impl.ConsoleBrowser.ConsoleIe9::initialized = true;
@@ -43,7 +41,7 @@ public class ConsoleBrowser implements Console {
}
/**
- * See: http://whattheheadsaid.com/2011/04/internet-explorer-9s-problematic-console-object
+ * See: http://whattheheadsaid.com/2011/04/internet-explorer-9s-problematic-console-object.
*/
private static class ConsoleIe9 extends ConsoleImpl {
@@ -53,9 +51,7 @@ public class ConsoleBrowser implements Console {
init();
}
- protected native void init()
- /*-{
-
+ protected native void init() /*-{
try {
[ "log", "info", "warn", "error", "dir", "clear", "profile", "profileEnd" ]
.forEach(function(method) {
@@ -68,31 +64,45 @@ public class ConsoleBrowser implements Console {
@Override
public void clear() {
- if (initialized) super.clear();
+ if (initialized) {
+ super.clear();
+ }
}
@Override
public void dir(Object arg) {
- if (initialized) super.dir(arg);
+ if (initialized) {
+ super.dir(arg);
+ }
}
@Override
public void error(JavaScriptObject arg) {
- if (initialized) super.error(arg);
+ if (initialized) {
+ super.error(arg);
+ }
}
@Override
public void info(JavaScriptObject arg) {
- if (initialized) super.info(arg);
+ if (initialized) {
+ super.info(arg);
+ }
}
@Override
public void profile(String title) {
- if (initialized) super.profile(title);
+ if (initialized) {
+ super.profile(title);
+ }
}
@Override
public void profileEnd(String title) {
- if (initialized) super.profileEnd(title);
+ if (initialized) {
+ super.profileEnd(title);
+ }
}
@Override
public void warn(JavaScriptObject arg) {
- if (initialized) super.warn(arg);
+ if (initialized) {
+ super.warn(arg);
+ }
}
@Override
public void group(Object arg) {}
@@ -109,90 +119,62 @@ public class ConsoleBrowser implements Console {
}
/**
- * Default implementation: webkit, opera, FF, ie10
+ * Default implementation: webkit, opera, FF, IE10.
*/
private static class ConsoleImpl {
- public native void clear()
- /*-{
-
+ public native void clear() /*-{
$wnd.console.clear();
}-*/;
- public native void dir(Object arg)
- /*-{
-
+ public native void dir(Object arg) /*-{
$wnd.console.dir(arg);
}-*/;
- public native void error(JavaScriptObject arg)
- /*-{
-
+ public native void error(JavaScriptObject arg) /*-{
$wnd.console.error.apply($wnd.console, arg);
}-*/;
- public native void group(Object arg)
- /*-{
-
+ public native void group(Object arg) /*-{
$wnd.console.group(arg);
}-*/;
- public native void groupCollapsed(Object arg)
- /*-{
-
+ public native void groupCollapsed(Object arg) /*-{
$wnd.console.groupCollapsed(arg);
}-*/;
- public native void groupEnd()
- /*-{
-
+ public native void groupEnd() /*-{
$wnd.console.groupEnd();
}-*/;
- public native void info(JavaScriptObject arg)
- /*-{
-
+ public native void info(JavaScriptObject arg) /*-{
$wnd.console.info.apply($wnd.console, arg);
}-*/;
- public native void log(JavaScriptObject arg)
- /*-{
-
+ public native void log(JavaScriptObject arg) /*-{
$wnd.console.log.apply($wnd.console, arg);
}-*/;
- public native void profile(String title)
- /*-{
-
+ public native void profile(String title) /*-{
$wnd.console.profile(title);
}-*/;
- public native void profileEnd(String title)
- /*-{
-
+ public native void profileEnd(String title) /*-{
$wnd.console.profileEnd(title);
}-*/;
- public native void time(String title)
- /*-{
-
+ public native void time(String title) /*-{
$wnd.console.time(title);
}-*/;
- public native void timeEnd(String title)
- /*-{
-
+ public native void timeEnd(String title) /*-{
$wnd.console.timeEnd(title);
}-*/;
- public native void timeStamp(Object arg)
- /*-{
-
+ public native void timeStamp(Object arg) /*-{
$wnd.console.timeStamp(arg);
}-*/;
- public native void warn(JavaScriptObject arg)
- /*-{
-
+ public native void warn(JavaScriptObject arg) /*-{
$wnd.console.warn.apply($wnd.console, arg);
}-*/;
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/DocumentStyleImpl.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/DocumentStyleImpl.java
index 585cb4a1..6847b75f 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/DocumentStyleImpl.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/DocumentStyleImpl.java
@@ -92,7 +92,7 @@ public class DocumentStyleImpl {
return "";
}
name = fixPropertyName(name);
- //value defined in the element style
+ // value defined in the element style
String ret = elem.getStyle().getProperty(name);
if (force) {
@@ -124,7 +124,7 @@ public class DocumentStyleImpl {
Element lastParent = $(elem).parents().last().get(0);
if (lastParent == null){
- //the element itself is detached
+ // the element itself is detached
lastParent = elem;
}
@@ -251,9 +251,7 @@ public class DocumentStyleImpl {
}
protected native String getComputedStyle(Element elem, String hyphenName,
- String camelName, String pseudo)
- /*-{
-
+ String camelName, String pseudo) /*-{
try {
var cStyle = $doc.defaultView.getComputedStyle(elem, pseudo);
return cStyle && cStyle.getPropertyValue ? cStyle.getPropertyValue(hyphenName) : null;
@@ -280,18 +278,14 @@ public class DocumentStyleImpl {
return ret;
}
- public native Document getContentDocument(Node n)
- /*-{
-
+ public native Document getContentDocument(Node n) /*-{
var d = n.contentDocument || n.document || n.contentWindow.document;
if (!d.body)
this.@com.google.gwt.query.client.impl.DocumentStyleImpl::emptyDocument(Lcom/google/gwt/dom/client/Document;)(d);
return d;
}-*/;
- public native void emptyDocument(Document d)
- /*-{
-
+ public native void emptyDocument(Document d) /*-{
d.open();
d.write("<head/><body/>");
d.close();
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/DocumentStyleImplIE.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/DocumentStyleImplIE.java
index 6193dff3..04074656 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/DocumentStyleImplIE.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/DocumentStyleImplIE.java
@@ -62,9 +62,7 @@ public class DocumentStyleImplIE extends DocumentStyleImpl {
/**
* Remove a style property from an element.
*/
- public native void removeStyleProperty(Element e, String prop)
- /*-{
-
+ public native void removeStyleProperty(Element e, String prop) /*-{
if (e && e.style && 'removeAttribute' in e)
e.style.removeAttribute(prop);
}-*/;
@@ -84,9 +82,7 @@ public class DocumentStyleImplIE extends DocumentStyleImpl {
@Override
protected native String getComputedStyle(Element elem, String hyphenName,
- String camelName, String pseudo)
- /*-{
-
+ String camelName, String pseudo) /*-{
// code lifted from jQuery
if (!elem.style || !'currentStyle' in elem || !'runtimeStyle' in elem) return null;
var style = elem.style;
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/HasSelector.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/HasSelector.java
index b8e6fc67..9e80cae2 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/HasSelector.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/HasSelector.java
@@ -19,6 +19,9 @@ import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.Node;
import com.google.gwt.dom.client.NodeList;
+/**
+ *
+ */
public interface HasSelector {
/**
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngine.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngine.java
index 9a8d16d0..1266e817 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngine.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngine.java
@@ -23,7 +23,6 @@ import com.google.gwt.dom.client.Document;
import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.Node;
import com.google.gwt.dom.client.NodeList;
-import com.google.gwt.query.client.GQuery;
import com.google.gwt.query.client.Predicate;
import com.google.gwt.query.client.js.JsMap;
import com.google.gwt.query.client.js.JsNodeArray;
@@ -41,21 +40,15 @@ public class SelectorEngine implements HasSelector {
private static DocumentStyleImpl styleImpl;
public static native NodeList<Element> getElementsByClassName(String clazz,
- Node ctx)
- /*-{
-
+ Node ctx) /*-{
return ctx.getElementsByClassName(clazz);
}-*/;
- public static native Node getNextSibling(Node n)
- /*-{
-
+ public static native Node getNextSibling(Node n) /*-{
return n.nextSibling || null;
}-*/;
- public static native Node getPreviousSibling(Node n)
- /*-{
-
+ public static native Node getPreviousSibling(Node n) /*-{
return n.previousSibling || null;
}-*/;
@@ -71,23 +64,17 @@ public class SelectorEngine implements HasSelector {
}
public static native NodeList<Element> querySelectorAllImpl(String selector,
- Node ctx)
- /*-{
-
+ Node ctx) /*-{
return ctx.querySelectorAll(selector);
}-*/;
public static native NodeList<Element> elementsByTagName(String selector,
- Node ctx)
- /*-{
-
+ Node ctx) /*-{
return ctx.getElementsByTagName(selector);
}-*/;
public static native NodeList<Element> elementsByClassName(String selector,
- Node ctx)
- /*-{
-
+ Node ctx) /*-{
return ctx.getElementsByClassName(selector);
}-*/;
@@ -102,9 +89,7 @@ public class SelectorEngine implements HasSelector {
}
public static native NodeList<Element> xpathEvaluate(String selector,
- Node ctx, JsNodeArray r)
- /*-{
-
+ Node ctx, JsNodeArray r) /*-{
var node;
var ownerDoc = ctx && (ctx.ownerDocument || ctx );
var evalDoc = ownerDoc ? ownerDoc : $doc;
@@ -277,9 +262,7 @@ public class SelectorEngine implements HasSelector {
}
}
- public native boolean contains(Element a, Element b)
- /*-{
-
+ public native boolean contains(Element a, Element b) /*-{
return a.contains ? a != b && a.contains(b) : !!(a.compareDocumentPosition(b) & 16)
}-*/;
@@ -297,18 +280,14 @@ public class SelectorEngine implements HasSelector {
}
/**
- * Check if the browser has native support for css selectors
+ * Check if the browser has native support for css selectors.
*/
- public static native boolean hasQuerySelectorAll()
- /*-{
-
+ public static native boolean hasQuerySelectorAll() /*-{
return $doc.location.href.indexOf("_force_no_native") < 0 &&
typeof $doc.querySelectorAll == 'function';
}-*/;
- public static native boolean hasXpathEvaluate()
- /*-{
-
+ public static native boolean hasXpathEvaluate() /*-{
return !!$doc.evaluate;
}-*/;
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngineCssToXPath.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngineCssToXPath.java
index 2492214d..654653e1 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngineCssToXPath.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngineCssToXPath.java
@@ -42,14 +42,14 @@ public class SelectorEngineCssToXPath extends SelectorEngineImpl {
/**
* Interface for callbacks in replaceAll operations.
*/
- public static interface ReplaceCallback {
+ public interface ReplaceCallback {
String foundMatch(ArrayList<String> s);
}
/**
* Interface for replacer implementations (GWT and JVM).
*/
- public static interface Replacer {
+ public interface Replacer {
String replaceAll(String s, String expr, Object replacement);
}
@@ -115,7 +115,7 @@ public class SelectorEngineCssToXPath extends SelectorEngineImpl {
"\\s*,\\s*", "|.//",
// , + ~ >
"\\s*(\\+|~|>)\\s*", "$1",
- //* ~ + >
+ // * ~ + >
"([\\w\\-\\*])~([\\w\\-\\*])", "$1/following-sibling::$2",
"([\\w\\-\\*])\\+([\\w\\-\\*])", "$1/following-sibling::*[1]/self::$2",
"([\\w\\-\\*])>([\\w\\-\\*])", "$1/$2",
@@ -267,8 +267,8 @@ public class SelectorEngineCssToXPath extends SelectorEngineImpl {
if (!SelectorEngine.hasXpathEvaluate()) {
throw new RuntimeException("This Browser does not support Xpath selectors.", e);
}
- console.error("ERROR: xpathEvaluate invalid xpath expression:"
- + xsel + " css-selector:" + sel + " " + e.getMessage() + "\n");
+ console.error("ERROR: xpathEvaluate invalid xpath expression: "
+ + xsel + " css-selector: " + sel + " " + e.getMessage() + "\n");
}
return elm;
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngineSizzle.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngineSizzle.java
index 927a5259..8b17d4fc 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngineSizzle.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngineSizzle.java
@@ -28,9 +28,7 @@ import com.google.gwt.dom.client.NodeList;
*/
public class SelectorEngineSizzle extends SelectorEngineImpl {
- public static native void initialize()
- /*-{
-
+ public static native void initialize() /*-{
(function(){
var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
@@ -924,7 +922,7 @@ GQS.getText = function( elems ) {
div = null; // release memory in IE
})();
-//if ( document.querySelectorAll ) {
+// if ( document.querySelectorAll ) {
// (function(){
// var oldGQS = GQS, div = document.createElement("div");
// div.innerHTML = "<p class='TEST'></p>";
@@ -955,7 +953,7 @@ GQS.getText = function( elems ) {
//
// div = null; // release memory in IE
// })();
-//}
+// }
(function(){
var div = document.createElement("div");
@@ -1093,9 +1091,7 @@ $wnd.GQS = GQS;
})();
}-*/;
- private static native JsArray<Element> select(String selector, Node context, JsArray<Element> results, JsArray<Element> seed)
- /*-{
-
+ private static native JsArray<Element> select(String selector, Node context, JsArray<Element> results, JsArray<Element> seed) /*-{
return $wnd.GQS(selector, context, results, seed);
}-*/;
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngineSizzleIE.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngineSizzleIE.java
index 227e1a4b..0f4a387b 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngineSizzleIE.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngineSizzleIE.java
@@ -40,9 +40,7 @@ import com.google.gwt.dom.client.NodeList;
*/
public class SelectorEngineSizzleIE extends SelectorEngineImpl {
- public static native void initialize()
- /*-{
-
+ public static native void initialize() /*-{
(function(){
var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
@@ -933,9 +931,7 @@ $wnd.IES = IES;
})();
}-*/;
- private static native JsArray<Element> select(String selector, Node context, JsArray<Element> results, JsArray<Element> seed)
- /*-{
-
+ private static native JsArray<Element> select(String selector, Node context, JsArray<Element> results, JsArray<Element> seed) /*-{
return $wnd.IES(selector, context, results, seed);
}-*/;
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineJS.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineJS.java
index 733848f8..92da332d 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineJS.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineJS.java
@@ -139,34 +139,24 @@ public class SelectorEngineJS extends SelectorEngineImpl {
}
}
- public static native void clearAdded(Node node)
- /*-{
-
+ public static native void clearAdded(Node node) /*-{
node.added = null;
}-*/;
public static native NodeList<Element> getElementsByClassName(String clazz,
- Node ctx)
- /*-{
-
+ Node ctx) /*-{
return ctx.getElementsByClassName(clazz);
}-*/;
- public static native boolean isAdded(Node prevRef)
- /*-{
-
+ public static native boolean isAdded(Node prevRef) /*-{
return prevRef.added || false;
}-*/;
- public static native void setAdded(Node prevRef, boolean added)
- /*-{
-
+ public static native void setAdded(Node prevRef, boolean added) /*-{
prevRef.added = added;
}-*/;
- public static native void setSkipTag(JsNodeArray prevElem, boolean skip)
- /*-{
-
+ public static native void setSkipTag(JsNodeArray prevElem, boolean skip) /*-{
prevElem.skipTag = skip;
}-*/;
@@ -189,9 +179,7 @@ public class SelectorEngineJS extends SelectorEngineImpl {
return JsUtils.truth(attrVal) ? "^" + attrVal + "$" : null;
}
- private static native boolean checked(Node previous)
- /*-{
-
+ private static native boolean checked(Node previous) /*-{
return previous.checked || false;
}-*/;
@@ -201,9 +189,7 @@ public class SelectorEngineJS extends SelectorEngineImpl {
}
}
- private static native boolean enabled(Node node)
- /*-{
-
+ private static native boolean enabled(Node node) /*-{
return !node.disabled;
}-*/;
@@ -252,28 +238,20 @@ public class SelectorEngineJS extends SelectorEngineImpl {
}
}
- private static native boolean hasChildElms(Node prevParent)
- /*-{
-
+ private static native boolean hasChildElms(Node prevParent) /*-{
return prevParent.childElms || false;
}-*/;
- private static native boolean isSkipped(JsNodeArray prevElem)
- /*-{
-
+ private static native boolean isSkipped(JsNodeArray prevElem) /*-{
return prevElem.skipTag || false;
}-*/;
- private static native void setHasChildElms(Node prevParent, boolean bool)
- /*-{
-
+ private static native void setHasChildElms(Node prevParent, boolean bool) /*-{
prevParent.childElms = bool ? bool : null;
}-*/;
private static native JsNodeArray subtractArray(JsNodeArray previousMatch,
- JsNodeArray elementsByPseudo)
- /*-{
-
+ JsNodeArray elementsByPseudo) /*-{
for (var i=0, src1; (src1=arr1[i]); i++) {
var found = false;
for (var j=0, src2; (src2=arr2[j]); j++) {
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineJSIE.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineJSIE.java
index 3bd5da24..f02eb857 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineJSIE.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineJSIE.java
@@ -23,9 +23,7 @@ import com.google.gwt.dom.client.Element;
*/
public class SelectorEngineJSIE extends SelectorEngineJS {
- public native String getAttr(Element elm, String attr)
- /*-{
-
+ public native String getAttr(Element elm, String attr) /*-{
switch (attr) {
case "id":
return elm.id;
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineSizzleGwt.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineSizzleGwt.java
index 2374cf96..7bbf1031 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineSizzleGwt.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineSizzleGwt.java
@@ -33,9 +33,7 @@ import com.google.gwt.query.client.js.JsUtils;
*/
public class SelectorEngineSizzleGwt extends SelectorEngineImpl {
- public static native boolean contains(Object a, Object b)
- /*-{
-
+ public static native boolean contains(Object a, Object b) /*-{
var ret =
document.compareDocumentPosition ?
(a.compareDocumentPosition(b) & 16):
@@ -43,9 +41,7 @@ public class SelectorEngineSizzleGwt extends SelectorEngineImpl {
return ret ? true : false;
}-*/;
- public static native JavaScriptObject createExpr()
- /*-{
-
+ public static native JavaScriptObject createExpr() /*-{
var done = 0;
$wnd.Expr = {
order: [ "ID", "NAME", "TAG" ],
@@ -435,9 +431,7 @@ public class SelectorEngineSizzleGwt extends SelectorEngineImpl {
return $wnd.Expr;
}-*/;
- public static native void dirCheck(String dir, Object cur, int doneName, Object checkSet)
- /*-{
-
+ public static native void dirCheck(String dir, Object cur, int doneName, Object checkSet) /*-{
for ( var i = 0, l = checkSet.length; i < l; i++ ) {
var elem = checkSet[i];
if ( elem ) {
@@ -468,9 +462,7 @@ public class SelectorEngineSizzleGwt extends SelectorEngineImpl {
}
}-*/;
- public static native void dirNodeCheck(String dir, Object cur, int doneName, Object checkSet)
- /*-{
-
+ public static native void dirNodeCheck(String dir, Object cur, int doneName, Object checkSet) /*-{
for ( var i = 0, l = checkSet.length; i < l; i++ ) {
var elem = checkSet[i];
if ( elem ) {
@@ -500,9 +492,7 @@ public class SelectorEngineSizzleGwt extends SelectorEngineImpl {
throw new IllegalArgumentException("Syntax error, unrecognized expression: " + msg);
}
- public static native JsArray<Node> filter(String expr, JsArray<Node> set, boolean inplace, Object not)
- /*-{
-
+ public static native JsArray<Node> filter(String expr, JsArray<Node> set, boolean inplace, Object not) /*-{
var old = expr, result = [], curLoop = set, match, anyFound;
while ( expr && set.length ) {
for ( var type in $wnd.Expr.filter ) {
@@ -568,9 +558,7 @@ public class SelectorEngineSizzleGwt extends SelectorEngineImpl {
return curLoop;
}-*/;
- public static native JavaScriptObject find(String expr, Node context)
- /*-{
-
+ public static native JavaScriptObject find(String expr, Node context) /*-{
var set, match;
if ( !expr ) {
return [];
@@ -598,9 +586,7 @@ public class SelectorEngineSizzleGwt extends SelectorEngineImpl {
return {set: set, expr: expr};
}-*/;
- public static native String getText(Object elems)
- /*-{
-
+ public static native String getText(Object elems) /*-{
var ret = "", elem;
for ( var i = 0; elems[i]; i++ ) {
elem = elems[i];
@@ -615,9 +601,7 @@ public class SelectorEngineSizzleGwt extends SelectorEngineImpl {
return ret;
}-*/;
- public static native JsArray<Node> makeArray(NodeList<Node> array, JsArray<Node> results)
- /*-{
-
+ public static native JsArray<Node> makeArray(NodeList<Node> array, JsArray<Node> results) /*-{
var ret = results || [];
if ( Object.prototype.toString.call(array) === "[object Array]" ) {
Array.prototype.push.apply( ret, array );
@@ -635,9 +619,7 @@ public class SelectorEngineSizzleGwt extends SelectorEngineImpl {
return ret;
}-*/;
- public static native JsArray<Element> posProcess(String selector, Node context)
- /*-{
-
+ public static native JsArray<Element> posProcess(String selector, Node context) /*-{
var tmpSet = [], later = "", match, root = context.nodeType ? [context] : context;
// Position selectors must be done after the filter
// And so must :not(positional) so we move all PSEUDOs to the end
@@ -652,9 +634,7 @@ public class SelectorEngineSizzleGwt extends SelectorEngineImpl {
return @com.google.gwt.query.client.impl.research.SelectorEngineSizzleGwt::filter(Ljava/lang/String;Lcom/google/gwt/core/client/JsArray;ZLjava/lang/Object;)( later, tmpSet, false );
}-*/;
- private static native JsArray<Element> select(String selector, Node context, JsArray<Element> results, JsArray<Element> seed)
- /*-{
-
+ private static native JsArray<Element> select(String selector, Node context, JsArray<Element> results, JsArray<Element> seed) /*-{
results = results || [];
var origContext = context = context || document;
var parts = [], m, set, checkSet, extra, prune = true, soFar = selector;
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineXPath.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineXPath.java
index c2de9b6d..4f641267 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineXPath.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineXPath.java
@@ -234,9 +234,7 @@ public class SelectorEngineXPath extends SelectorEngineImpl {
return xpath;
}
- private native String replaceAttr(String allAttr)
- /*-{
-
+ private native String replaceAttr(String allAttr) /*-{
if(!allAttr) return "";
return allAttr.replace(/["']+/g,'').replace(/(\w+)(\^|\$|\*|\||~)?=?([\w\u00C0-\uFFFF\s\-_\.]+)?/g,
function(a,b,c,d) {
@@ -244,9 +242,7 @@ public class SelectorEngineXPath extends SelectorEngineImpl {
});
}-*/;
- private native String replaceAttr2(String allAttr)
- /*-{
-
+ private native String replaceAttr2(String allAttr) /*-{
if(!allAttr) return "";
return allAttr.replace(/\[(\w+)(\^|\$|\*|\||~)?=?([\w\u00C0-\uFFFF\s\-_\.]+)?\]/g, @com.google.gwt.query.client.impl.research.SelectorEngineXPath::attrToXPath(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;));
}-*/;
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsCache.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsCache.java
index e63eb076..d85983a4 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsCache.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsCache.java
@@ -32,9 +32,7 @@ public class JsCache extends JavaScriptObject {
return createObject().cast();
}
- public final native void concat(Object ary)
- /*-{
-
+ public final native void concat(Object ary) /*-{
if (ary) this.concat(ary);
}-*/;
@@ -52,9 +50,7 @@ public class JsCache extends JavaScriptObject {
}
}
- public final native void delete(Object name)
- /*-{
-
+ public final native void delete(Object name) /*-{
delete this[name];
}-*/;
@@ -64,9 +60,7 @@ public class JsCache extends JavaScriptObject {
}
}
- public final native boolean exists(Object name)
- /*-{
-
+ public final native boolean exists(Object name) /*-{
return !!this[name];
}-*/;
@@ -90,9 +84,7 @@ public class JsCache extends JavaScriptObject {
return (T)o;
}
- public final native <T> T get(Object id)
- /*-{
-
+ public final native <T> T get(Object id) /*-{
return @com.google.gwt.query.client.js.JsCache::gwtBox(*)([ this && this[id] ]);
}-*/;
@@ -120,15 +112,11 @@ public class JsCache extends JavaScriptObject {
return r == null ? 0 : r;
}
- public final native String getString(Object id)
- /*-{
-
+ public final native String getString(Object id) /*-{
return this[id] == null ? null : String(this[id]);
}-*/;
- public final native JsArrayMixed getArray(Object id)
- /*-{
-
+ public final native JsArrayMixed getArray(Object id) /*-{
var r = this[id];
if (Object.prototype.toString.call(r) == '[object Array]') {
return r;
@@ -141,43 +129,31 @@ public class JsCache extends JavaScriptObject {
return (o != null && o instanceof JavaScriptObject) ? ((JavaScriptObject)o).<T>cast() : null;
}
- public final native boolean isEmpty()
- /*-{
-
+ public final native boolean isEmpty() /*-{
for (k in this) return false;
return true;
}-*/;
- public final native boolean contains(Object o)
- /*-{
-
+ public final native boolean contains(Object o) /*-{
return this.indexOf(o) >= 0;
}-*/;
- public final native void remove(Object o)
- /*-{
-
+ public final native void remove(Object o) /*-{
var i = this.indexOf(o);
if (i >= 0) this.splice(i, 1);
}-*/;
- public final native int indexOf(Object o)
- /*-{
-
+ public final native int indexOf(Object o) /*-{
// HtmlUnit fails when this returns 0
return this.indexOf(o);
}-*/;
- public final native JsCache putBoolean(Object id, boolean b)
- /*-{
-
+ public final native JsCache putBoolean(Object id, boolean b) /*-{
this[id] = b;
return this;
}-*/;
- public final native JsCache putNumber(Object id, double n)
- /*-{
-
+ public final native JsCache putNumber(Object id, double n) /*-{
this[id] = n;
return this;
}-*/;
@@ -193,16 +169,12 @@ public class JsCache extends JavaScriptObject {
return this;
}
- public final native JsCache putObject(Object id, Object obj)
- /*-{
-
+ public final native JsCache putObject(Object id, Object obj) /*-{
this[id] = obj;
return this;
}-*/;
- public final native int length()
- /*-{
-
+ public final native int length() /*-{
if (typeof(this.length) == 'number')
return this.length;
@@ -259,9 +231,7 @@ public class JsCache extends JavaScriptObject {
checkNull(this);
}
- private final native JsArrayString keysImpl()
- /*-{
-
+ private final native JsArrayString keysImpl() /*-{
var key, keys=[];
// Chrome in DevMode sets '__gwt_ObjectId' to JS objects
// GWT sets '$H' when calling getHashCode (see com/google/gwt/core/client/impl/Impl.java)
@@ -270,7 +240,7 @@ public class JsCache extends JavaScriptObject {
}-*/;
/**
- * Throw a NPE when a js is null
+ * Throw a NPE when a js is null.
*/
public static final <T extends JavaScriptObject> T checkNull(T js) {
if (!GWT.isProdMode() && js == null) {
@@ -281,7 +251,7 @@ public class JsCache extends JavaScriptObject {
/**
* Gets an object wrapped in a js array and boxes it with the appropriate
- * Object in the GWT world.
+ * object in the GWT world.
*
* It is thought to be called from other jsni code without dealing with casting issues.
*
@@ -290,18 +260,14 @@ public class JsCache extends JavaScriptObject {
*
* Example
* <pre>
- * native Object myMethod()
- /*-{
-
+ * native Object myMethod() /*-{
* var myJsVar = ... ;
* return @com.google.gwt.query.client.js.JsCache::gwtBox(*)([ myJsVar ]);
* }-* /
* </pre>
*
*/
- public static native Object gwtBox(JavaScriptObject oneElementArray)
- /*-{
-
+ public static native Object gwtBox(JavaScriptObject oneElementArray) /*-{
var r = oneElementArray;
if (typeof r == 'object' && r.length == 1) {
var r = r[0], t = typeof r;
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsClosure.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsClosure.java
index ceb5fe51..2481325d 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsClosure.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsClosure.java
@@ -28,9 +28,7 @@ public class JsClosure extends JavaScriptObject {
/**
* Invoke the closure with no arguments and expecting no return value.
*/
- public final native void invoke()
- /*-{
-
+ public final native void invoke() /*-{
return this();
}-*/;
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsMap.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsMap.java
index 4806d4cd..f0bf6008 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsMap.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsMap.java
@@ -19,8 +19,11 @@ import com.google.gwt.core.client.JavaScriptObject;
/**
* Lightweight JSO backed implemented of a Map, using Object.hashCode() as key.
+ *
+ * @param <S>
+ * @param <T>
*/
-final public class JsMap<S, T> extends JavaScriptObject {
+public final class JsMap<S, T> extends JavaScriptObject {
protected JsMap() {
}
@@ -54,7 +57,7 @@ final public class JsMap<S, T> extends JavaScriptObject {
return old;
}
- public final String[] keys() {
+ public String[] keys() {
return c().keys();
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsNamedArray.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsNamedArray.java
index a3b49332..48279ba5 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsNamedArray.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsNamedArray.java
@@ -18,9 +18,11 @@ package com.google.gwt.query.client.js;
import com.google.gwt.core.client.JavaScriptObject;
/**
- * Lightweight JSO backed implemented of a named array
+ * Lightweight JSO backed implemented of a named array.
+ *
+ * @param <T>
*/
-final public class JsNamedArray<T> extends JavaScriptObject {
+public final class JsNamedArray<T> extends JavaScriptObject {
protected JsNamedArray() {
}
@@ -38,7 +40,7 @@ final public class JsNamedArray<T> extends JavaScriptObject {
c().put(key, val);
}
- public final String[] keys() {
+ public String[] keys() {
return c().keys();
}
@@ -46,19 +48,19 @@ final public class JsNamedArray<T> extends JavaScriptObject {
return c().length();
}
- public final Object[] values() {
+ public Object[] values() {
return c().elements();
}
- public final boolean exists(String key){
+ public boolean exists(String key){
return c().exists(key);
}
- public final void delete(String key){
+ public void delete(String key){
c().delete(key);
}
- public final static <T> JsNamedArray<T> create() {
+ public static <T> JsNamedArray<T> create() {
return createObject().cast();
}
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsNodeArray.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsNodeArray.java
index 7101f840..8b989a50 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsNodeArray.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsNodeArray.java
@@ -29,9 +29,7 @@ public class JsNodeArray extends NodeList<Element> {
return create((Node)null);
}
- public static native JsNodeArray create(Node node)
- /*-{
-
+ public static native JsNodeArray create(Node node) /*-{
return node ? [node] : [];
}-*/;
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsObjectArray.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsObjectArray.java
index 022d42a1..fe64f2ef 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsObjectArray.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsObjectArray.java
@@ -19,6 +19,8 @@ import com.google.gwt.core.client.JavaScriptObject;
/**
* Lightweight JSO based array class that can store objects.
+ *
+ * @param <T>
*/
public final class JsObjectArray<T> extends JavaScriptObject {
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsRegexp.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsRegexp.java
index d5c977ba..49d32e42 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsRegexp.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsRegexp.java
@@ -24,15 +24,11 @@ import com.google.gwt.core.client.JavaScriptObject;
@Deprecated
public class JsRegexp {
- public static native JavaScriptObject compile(String pat)
- /*-{
-
+ public static native JavaScriptObject compile(String pat) /*-{
return new RegExp(pat);
}-*/;
- public static native JavaScriptObject compileFlags(String pat, String flags)
- /*-{
-
+ public static native JavaScriptObject compileFlags(String pat, String flags) /*-{
return new RegExp(pat, flags);
}-*/;
@@ -40,9 +36,7 @@ public class JsRegexp {
return new JsRegexp(regexp, flags).match(string);
}
- private static native JsObjectArray<String> exec0(JavaScriptObject regexp, String str)
- /*-{
-
+ private static native JsObjectArray<String> exec0(JavaScriptObject regexp, String str) /*-{
return regexp.exec(str);
}-*/;
@@ -76,15 +70,11 @@ public class JsRegexp {
return test0(regexp, rule);
}
- private native JsObjectArray<String> match0(JavaScriptObject regexp, String currentRule)
- /*-{
-
+ private native JsObjectArray<String> match0(JavaScriptObject regexp, String currentRule) /*-{
return currentRule.match(regexp);
}-*/;
- private native boolean test0(JavaScriptObject regexp, String rule)
- /*-{
-
+ private native boolean test0(JavaScriptObject regexp, String rule) /*-{
return regexp.test(rule);
}-*/;
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsUtils.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsUtils.java
index 73438417..9266e0fd 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsUtils.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsUtils.java
@@ -49,9 +49,11 @@ public class JsUtils {
return jso.equals(obj);
}
- private native Object exec(JavaScriptObject f, Object data)
- /*-{
+ public int hashCode() {
+ return jso.hashCode();
+ }
+ private native Object exec(JavaScriptObject f, Object data) /*-{
return @com.google.gwt.query.client.js.JsCache::gwtBox(*)([ f(data) ]);
}-*/;
@@ -70,9 +72,7 @@ public class JsUtils {
* Wraps a GQuery function into a native javascript one so as we can
* export Java methods without using JSNI.
*/
- public static native JavaScriptObject wrapFunction (Function f)
- /*-{
-
+ public static native JavaScriptObject wrapFunction(Function f) /*-{
return function(r) {
var o = @java.util.ArrayList::new()();
for (i in arguments) {
@@ -85,22 +85,19 @@ public class JsUtils {
}
}-*/;
+ /**
+ * Default JsUtils implementation.
+ */
public static class JsUtilsImpl {
- public native Properties parseJSON(String json)
- /*-{
-
+ public native Properties parseJSON(String json) /*-{
return $wnd.JSON.parse(json);
}-*/;
- public native String JSON2String(JavaScriptObject o)
- /*-{
-
+ public native String JSON2String(JavaScriptObject o) /*-{
return $wnd.JSON.stringify(o);
}-*/;
- public native Element parseXML(String xml)
- /*-{
-
+ public native Element parseXML(String xml) /*-{
return new DOMParser().parseFromString(xml, "text/xml").documentElement;
}-*/;
@@ -122,17 +119,16 @@ public class JsUtils {
return ret;
}
- public native String XML2String(JavaScriptObject o)
- /*-{
-
+ public native String XML2String(JavaScriptObject o) /*-{
return (new XMLSerializer()).serializeToString(o);
}-*/;
}
+ /**
+ * IE JsUtils implemetation.
+ */
public static class JsUtilsImplIE6 extends JsUtilsImpl {
- public static final native Properties evalImpl(String properties)
- /*-{
-
+ public static final native Properties evalImpl(String properties) /*-{
return eval(properties);
}-*/;
@@ -179,9 +175,7 @@ public class JsUtils {
}
@Override
- public native Element parseXML(String xml)
- /*-{
-
+ public native Element parseXML(String xml) /*-{
var d = new ActiveXObject("Microsoft.XmlDom");
d.loadXML(xml);
return d.documentElement;
@@ -202,15 +196,11 @@ public class JsUtils {
}
@Override
- public native String XML2String(JavaScriptObject o)
- /*-{
-
+ public native String XML2String(JavaScriptObject o) /*-{
return o.xml;
}-*/;
- private native String xmlText(Element e)
- /*-{
-
+ private native String xmlText(Element e) /*-{
return e.text;
}-*/;
}
@@ -232,7 +222,7 @@ public class JsUtils {
}
/**
- * Set a property to a javascript object
+ * Set a property to a javascript object.
*/
public static void prop(JavaScriptObject o, Object id, Object val) {
if (o != null) {
@@ -241,11 +231,10 @@ public class JsUtils {
}
/**
- * Camelize style property names. for instance: font-name -> fontName
+ * Camelize style property names.
+ * for instance: font-name -> fontName
*/
- public static native String camelize(String s)
- /*-{
-
+ public static native String camelize(String s) /*-{
return s.replace(/\-(\w)/g, function(all, letter) {
return letter.toUpperCase();
});
@@ -278,7 +267,8 @@ public class JsUtils {
}
/**
- * Use the method in the gquery class $(elem).cur(prop, force);
+ * Use the method in the gquery class.
+ * $(elem).cur(prop, force);
*/
@Deprecated
public static double cur(Element elem, String prop, boolean force) {
@@ -288,18 +278,14 @@ public class JsUtils {
/**
* Compare two numbers using javascript equality.
*/
- public static native boolean eq(double s1, double s2)
- /*-{
-
+ public static native boolean eq(double s1, double s2) /*-{
return s1 == s2;
}-*/;
/**
* Compare two objects using javascript equality.
*/
- public static native boolean eq(Object s1, Object s2)
- /*-{
-
+ public static native boolean eq(Object s1, Object s2) /*-{
return s1 == s2;
}-*/;
@@ -315,63 +301,53 @@ public class JsUtils {
* Check if an object has already a property with name <code>name</code>
* defined.
*/
- public static native boolean hasProperty(JavaScriptObject o, String name)
- /*-{
-
+ public static native boolean hasProperty(JavaScriptObject o, String name) /*-{
return o && name in o;
}-*/;
/**
* Check whether an element has an attribute, this is here since GWT Element.getAttribute
* implementation returns an empty string instead of null when the attribute is not
- * present
+ * present.
*/
- public static native boolean hasAttribute(Element o, String name)
- /*-{
-
+ public static native boolean hasAttribute(Element o, String name) /*-{
return !!(o && o.getAttribute(name));
}-*/;
/**
- * Hyphenize style property names. for instance: fontName -> font-name
+ * Hyphenize style property names.
+ * for instance: fontName -> font-name
*/
- public static native String hyphenize(String name)
- /*-{
-
+ public static native String hyphenize(String name) /*-{
return name.replace(/([A-Z])/g, "-$1").toLowerCase();
}-*/;
/**
- * Check is a javascript object can be used as an array
+ * Check is a javascript object can be used as an array.
*/
- public static native boolean isArray(JavaScriptObject o)
- /*-{
-
+ public static native boolean isArray(JavaScriptObject o) /*-{
return Object.prototype.toString.call(o) == '[object Array]'
|| typeof o.length == 'number';
}-*/;
/**
- * Check is a javascript object is a FormData
+ * Check is a javascript object is a FormData.
*/
- public static native boolean isFormData(JavaScriptObject o)
- /*-{
-
+ public static native boolean isFormData(JavaScriptObject o) /*-{
return Object.prototype.toString.call(o) == '[object FormData]';
}-*/;
/**
- * Return whether the event was prevented
+ * Return whether the event was prevented.
*/
- public static native boolean isDefaultPrevented(JavaScriptObject e)
- /*-{
-
+ public static native boolean isDefaultPrevented(JavaScriptObject e) /*-{
return e.defaultPrevented || e.returnValue === false || e.getPreventDefault
&& e.getPreventDefault() ? true : false;
}-*/;
/**
- * Return whether a node is detached to the dom
+ * Return whether a node is detached to the DOM.
+ *
* Be careful : This method works only on node that should be inserted within the body node.
*/
public static boolean isDetached(Node n) {
@@ -385,50 +361,44 @@ public class JsUtils {
}
/**
- * Check is a javascript object can be cast to an Element
+ * Check is a javascript object can be cast to an Element.
*/
- public static native boolean isElement(Object o)
- /*-{
-
+ public static native boolean isElement(Object o) /*-{
return o && o.nodeType && o.nodeName ? true : false;
}-*/;
/**
- * Check is a javascript object can be cast to an Event
+ * Check is a javascript object can be cast to an Event.
*/
public static boolean isEvent(JavaScriptObject o) {
return hasProperty(o, "currentTarget");
}
/**
- * Check is a javascript object is a function
+ * Check is a javascript object is a function.
*/
- public static native boolean isFunction(JavaScriptObject o)
- /*-{
-
+ public static native boolean isFunction(JavaScriptObject o) /*-{
return Object.prototype.toString.call(o) == '[object Function]';
}-*/;
/**
- * Check is a javascript can be cast to a node list
+ * Check is a javascript can be cast to a node list.
*/
- public static native boolean isNodeList(JavaScriptObject o)
- /*-{
-
+ public static native boolean isNodeList(JavaScriptObject o) /*-{
var r = Object.prototype.toString.call(o);
return r == '[object HTMLCollection]' || r == '[object NodeList]'
|| (typeof o == 'object' && o.length && o[0].tagName) ? true : false;
}-*/;
/**
- * Check is a javascript object is a Window
+ * Check is a javascript object is a Window.
*/
public static boolean isWindow(JavaScriptObject o) {
return hasProperty(o, "alert");
}
/**
- * Check if an element is a DOM or a XML node
+ * Check if an element is a DOM or a XML node.
*/
public static boolean isXML(Node o) {
return o == null ? false
@@ -455,18 +425,14 @@ public class JsUtils {
/**
* Return the element which is truth in the double scope.
*/
- public static native double or(double s1, double s2)
- /*-{
-
+ public static native double or(double s1, double s2) /*-{
return s1 || s2;
}-*/;
/**
* Return the element which is truth in the javascript scope.
*/
- public static native <T> T or(T s1, T s2)
- /*-{
-
+ public static native <T> T or(T s1, T s2) /*-{
return s1 || s2;
}-*/;
@@ -502,18 +468,14 @@ public class JsUtils {
* Utility method to cast objects in production.
* Useful for casting native implementations to interfaces like JsInterop
*/
- public static native <T> T cast(Object o)
- /*-{
-
+ public static native <T> T cast(Object o) /*-{
return o;
}-*/;
/**
* Utility method to cast objects to array of string in production.
*/
- public static native String[] castArrayString(Object a)
- /*-{
-
+ public static native String[] castArrayString(Object a) /*-{
return a
}-*/;
@@ -540,9 +502,7 @@ public class JsUtils {
return runJavascriptFunctionImpl(o, meth, JsObjectArray.create().add(args).<JsArrayMixed>cast());
}
- private static native <T> T runJavascriptFunctionImpl(JavaScriptObject o, String meth, JsArrayMixed args)
- /*-{
-
+ private static native <T> T runJavascriptFunctionImpl(JavaScriptObject o, String meth, JsArrayMixed args) /*-{
return (f = o && o[meth])
&& @com.google.gwt.query.client.js.JsUtils::isFunction(*)(f)
&& @com.google.gwt.query.client.js.JsCache::gwtBox(*)([f.apply(o, args)]);
@@ -551,23 +511,19 @@ public class JsUtils {
/**
* Check if a number is true in the javascript scope.
*/
- public static native boolean truth(double a)
- /*-{
-
+ public static native boolean truth(double a) /*-{
return a ? true : false;
}-*/;
/**
* Check if an object is true in the javascript scope.
*/
- public static native boolean truth(Object a)
- /*-{
-
+ public static native boolean truth(Object a) /*-{
return a ? true : false;
}-*/;
/**
- * Remove duplicates from an elements array
+ * Remove duplicates from an elements array.
*/
public static JsArray<Element> unique(JsArray<Element> a) {
return utilsImpl.unique(a);
@@ -583,6 +539,7 @@ public class JsUtils {
/**
* Returns a QueryString representation of a JavascriptObject.
+ *
* TODO: jquery implementation accepts a second parameter (traditional)
*/
public static String param(JavaScriptObject js) {
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Effects.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Effects.java
index fc2c726d..072b2a5b 100755
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Effects.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Effects.java
@@ -35,7 +35,7 @@ public class Effects extends QueuePlugin<Effects> {
/**
* Class to access protected methods in Animation.
*/
- public static abstract class GQAnimation extends Animation {
+ public abstract static class GQAnimation extends Animation {
private static final String ACTUAL_ANIMATION = "EffectsRunnning";
@@ -125,8 +125,8 @@ public class Effects extends QueuePlugin<Effects> {
* Example:
*
* <pre class="code">
- * //move the element from its original position to the position top:500px and left:500px for 400ms.
- * //use a swing easing function for the transition
+ * // move the element from its original position to the position top:500px and left:500px for 400ms.
+ * // use a swing easing function for the transition
* $("#foo").animate(Properties.create("{top:'500px',left:'500px'}"), 400, EasingCurve.swing);
* // Change the width and border attributes of a table
* $("table").animate(Properties.create("{$width: '500', $border: '10'}"), 400, EasingCurve.linear);
@@ -142,8 +142,8 @@ public class Effects extends QueuePlugin<Effects> {
* Example:
*
* <pre class="code">
- * //move the element from its original position to 500px to the left and 5OOpx down for 400ms.
- * //use a swing easing function for the transition
+ * // move the element from its original position to 500px to the left and 5OOpx down for 400ms.
+ * // use a swing easing function for the transition
* $("#foo").animate(Properties.create("{top:'+=500px',left:'+=500px'}"), 400, Easing.SWING);
* </pre>
*
@@ -157,7 +157,7 @@ public class Effects extends QueuePlugin<Effects> {
* $("#foo").animate($$("{backgroundColor:'red', color:'#ffffff', borderColor:'rgb(129, 0, 70)'}"), 400, EasingCurve.swing);
* </pre>
*
- * @param p a {@link Properties} object containing css properties to animate.
+ * @param stringOrProperties object containing css properties to animate.
* @param funcs an array of {@link Function} called once the animation is
* complete
* @param duration the duration in milliseconds of the animation
@@ -200,7 +200,7 @@ public class Effects extends QueuePlugin<Effects> {
* Example:
*
* <pre class="code">
- * //move the element from its original position to left:500px for 500ms
+ * // move the element from its original position to left:500px for 500ms
* $("#foo").animate("left:'500'");
* // Change the width attribute of a table
* $("table").animate("$width:'500'"), 400, EasingCurve.swing);
@@ -216,7 +216,7 @@ public class Effects extends QueuePlugin<Effects> {
* Example:
*
* <pre class="code">
- * //move the element from its original position to 500px to the left for 500ms and
+ * // move the element from its original position to 500px to the left for 500ms and
* // change the background color of the element at the end of the animation
* $("#foo").animate("left:'+=500'", new Function(){
*
@@ -238,7 +238,7 @@ public class Effects extends QueuePlugin<Effects> {
* $("#foo").animate("backgroundColor:'red', color:'#ffffff', borderColor:'rgb(129, 0, 70)'");
* </pre>
*
- * @param prop the property to animate : "cssName:'value'"
+ * @param stringOrProperties the property to animate : "cssName:'value'"
* @param funcs an array of {@link Function} called once the animation is
* complete
*/
@@ -260,7 +260,7 @@ public class Effects extends QueuePlugin<Effects> {
* Example:
*
* <pre class="code">
- * //move the element from its original position to left:500px for 2s
+ * // move the element from its original position to left:500px for 2s
* $("#foo").animate("left:'500px'", 2000);
* // Change the width attribute of a table
* $("table").animate("$width:'500'"), 400);
@@ -276,7 +276,7 @@ public class Effects extends QueuePlugin<Effects> {
* Example:
*
* <pre class="code">
- * //move the element from its original position to 500px to the left for 1000ms and
+ * // move the element from its original position to 500px to the left for 1000ms and
* // change the background color of the element at the end of the animation
* $("#foo").animate("left:'+=500'", 1000, new Function(){
* public void f(Element e){
@@ -294,7 +294,7 @@ public class Effects extends QueuePlugin<Effects> {
* $("#foo").animate("backgroundColor:'red', color:'#ffffff', borderColor:'rgb(129, 0, 70)', 1000");
* </pre>
*
- * @param prop the property to animate : "cssName:'value'"
+ * @param stringOrProperties the property to animate : "cssName:'value'"
* @param funcs an array of {@link Function} called once the animation is
* complete
* @param duration the duration in milliseconds of the animation
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Events.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Events.java
index c614a08c..44b78a21 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Events.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Events.java
@@ -419,7 +419,7 @@ public class Events extends GQuery {
}
/**
- * Only valid for IE6-8
+ * Only valid for IE6-8.
* @param event
* @return
*/
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyEffects.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyEffects.java
index 6827487c..bdb508cc 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyEffects.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyEffects.java
@@ -16,9 +16,12 @@
package com.google.gwt.query.client.plugins;
import com.google.gwt.query.client.Function;
import com.google.gwt.query.client.LazyBase;
-import com.google.gwt.query.client.Properties;
import com.google.gwt.query.client.plugins.effects.PropertiesAnimation.Easing;
+/**
+ * LazyEffects.
+ * @param <T>
+ */
public interface LazyEffects<T> extends LazyBase<T>{
/**
@@ -35,8 +38,8 @@ public interface LazyEffects<T> extends LazyBase<T>{
* Example:
*
* <pre class="code">
- * //move the element from its original position to the position top:500px and left:500px for 400ms.
- * //use a swing easing function for the transition
+ * // move the element from its original position to the position top:500px and left:500px for 400ms.
+ * // use a swing easing function for the transition
* $("#foo").animate(Properties.create("{top:'500px',left:'500px'}"), 400, EasingCurve.swing);
* // Change the width and border attributes of a table
* $("table").animate(Properties.create("{$width: '500', $border: '10'}"), 400, EasingCurve.linear);
@@ -52,8 +55,8 @@ public interface LazyEffects<T> extends LazyBase<T>{
* Example:
*
* <pre class="code">
- * //move the element from its original position to 500px to the left and 5OOpx down for 400ms.
- * //use a swing easing function for the transition
+ * // move the element from its original position to 500px to the left and 5OOpx down for 400ms.
+ * // use a swing easing function for the transition
* $("#foo").animate(Properties.create("{top:'+=500px',left:'+=500px'}"), 400, Easing.SWING);
* </pre>
*
@@ -67,7 +70,7 @@ public interface LazyEffects<T> extends LazyBase<T>{
* $("#foo").animate($$("{backgroundColor:'red', color:'#ffffff', borderColor:'rgb(129, 0, 70)'}"), 400, EasingCurve.swing);
* </pre>
*
- * @param p a {@link Properties} object containing css properties to animate.
+ * @param stringOrProperties {@link Properties} object containing css properties to animate.
* @param funcs an array of {@link Function} called once the animation is
* complete
* @param duration the duration in milliseconds of the animation
@@ -90,7 +93,7 @@ public interface LazyEffects<T> extends LazyBase<T>{
* Example:
*
* <pre class="code">
- * //move the element from its original position to left:500px for 500ms
+ * // move the element from its original position to left:500px for 500ms
* $("#foo").animate("left:'500'");
* // Change the width attribute of a table
* $("table").animate("$width:'500'"), 400, EasingCurve.swing);
@@ -106,7 +109,7 @@ public interface LazyEffects<T> extends LazyBase<T>{
* Example:
*
* <pre class="code">
- * //move the element from its original position to 500px to the left for 500ms and
+ * // move the element from its original position to 500px to the left for 500ms and
* // change the background color of the element at the end of the animation
* $("#foo").animate("left:'+=500'", new Function(){
*
@@ -128,7 +131,7 @@ public interface LazyEffects<T> extends LazyBase<T>{
* $("#foo").animate("backgroundColor:'red', color:'#ffffff', borderColor:'rgb(129, 0, 70)'");
* </pre>
*
- * @param prop the property to animate : "cssName:'value'"
+ * @param stringOrProperties the property to animate : "cssName:'value'"
* @param funcs an array of {@link Function} called once the animation is
* complete
*/
@@ -148,7 +151,7 @@ public interface LazyEffects<T> extends LazyBase<T>{
* Example:
*
* <pre class="code">
- * //move the element from its original position to left:500px for 2s
+ * // move the element from its original position to left:500px for 2s
* $("#foo").animate("left:'500px'", 2000);
* // Change the width attribute of a table
* $("table").animate("$width:'500'"), 400);
@@ -164,7 +167,7 @@ public interface LazyEffects<T> extends LazyBase<T>{
* Example:
*
* <pre class="code">
- * //move the element from its original position to 500px to the left for 1000ms and
+ * // move the element from its original position to 500px to the left for 1000ms and
* // change the background color of the element at the end of the animation
* $("#foo").animate("left:'+=500'", 1000, new Function(){
* public void f(Element e){
@@ -182,7 +185,7 @@ public interface LazyEffects<T> extends LazyBase<T>{
* $("#foo").animate("backgroundColor:'red', color:'#ffffff', borderColor:'rgb(129, 0, 70)', 1000");
* </pre>
*
- * @param prop the property to animate : "cssName:'value'"
+ * @param stringOrProperties the property to animate : "cssName:'value'"
* @param funcs an array of {@link Function} called once the animation is
* complete
* @param duration the duration in milliseconds of the animation
@@ -386,4 +389,5 @@ public interface LazyEffects<T> extends LazyBase<T>{
* layout of the page.
*/
LazyEffects<T> toggle(int millisecs, Function... f);
+
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyEvents.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyEvents.java
index 830f91df..4c3e8d83 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyEvents.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyEvents.java
@@ -17,6 +17,10 @@ import com.google.gwt.query.client.Function;
import com.google.gwt.query.client.GQuery;
import com.google.gwt.query.client.LazyBase;
+/**
+ * LazyEvents.
+ * @param <T>
+ */
public interface LazyEvents<T> extends LazyBase<T>{
/**
@@ -180,4 +184,5 @@ public interface LazyEvents<T> extends LazyBase<T>{
LazyEvents<T> unbind(String name, Function f);
LazyEvents<T> undelegate();
+
}
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
index fbc994f3..cd2c20f3 100644
--- 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
@@ -24,6 +24,10 @@ import com.google.gwt.user.client.ui.TextArea;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.Widget;
+/**
+ * LazyWidgets.
+ * @param <T>
+ */
public interface LazyWidgets<T> extends LazyBase<T>{
/**
@@ -107,4 +111,5 @@ public interface LazyWidgets<T> extends LazyBase<T>{
*
*/
LazyWidgets<T> textArea(WidgetInitializer<TextArea> initializers);
+
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/MouseOptions.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/MouseOptions.java
index b0aed03f..885911ff 100755
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/MouseOptions.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/MouseOptions.java
@@ -58,7 +58,7 @@ public class MouseOptions {
}
/**
- * Prevents starting of the plugin on specified elements
+ * Prevents starting of the plugin on specified elements.
*
* @param cancel
* array of css selectors
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/MousePlugin.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/MousePlugin.java
index 78cd3614..09c06028 100755
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/MousePlugin.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/MousePlugin.java
@@ -52,7 +52,7 @@ public abstract class MousePlugin extends UiPlugin {
protected abstract String getPluginName();
/**
- * This method initialize all needed handlers
+ * This method initialize all needed handlers.
*
*/
protected void initMouseHandler(MouseOptions options) {
@@ -98,15 +98,13 @@ public abstract class MousePlugin extends UiPlugin {
/**
* Test if the mouse down event must be handled by the plugin or not.
- *
*/
protected boolean mouseCapture(Element draggable, GqEvent event) {
return true;
}
/**
- * Method called when mouse click
- *
+ * Method called when mouse click.
*/
protected boolean mouseClick(Element element, GqEvent event) {
return true;
@@ -116,8 +114,7 @@ public abstract class MousePlugin extends UiPlugin {
* Method called when mouse down occur on the element.
*
* You should not override this method. Instead, override {@link #mouseStart(Element, GqEvent)}
- * method
- *
+ * method.
*/
protected boolean mouseDown(Element element, GqEvent event) {
@@ -147,7 +144,7 @@ public abstract class MousePlugin extends UiPlugin {
bindOtherEvents(element);
- if (!touchSupported){ //click event are not triggered if we call preventDefault on touchstart event.
+ if (!touchSupported){ // click event are not triggered if we call preventDefault on touchstart event.
event.getOriginalEvent().preventDefault();
}
@@ -157,8 +154,7 @@ public abstract class MousePlugin extends UiPlugin {
}
/**
- * Method called when the mouse is dragging
- *
+ * Method called when the mouse is dragging.
*/
protected abstract boolean mouseDrag(Element element, GqEvent event);
@@ -195,8 +191,7 @@ public abstract class MousePlugin extends UiPlugin {
protected abstract boolean mouseStart(Element element, GqEvent event);
/**
- * Method called when the mouse button is released
- *
+ * Method called when the mouse button is released.
*/
protected abstract boolean mouseStop(Element element, GqEvent event);
@@ -204,8 +199,7 @@ public abstract class MousePlugin extends UiPlugin {
* Method called when mouse is released..
*
* You should not override this method. Instead, override {@link #mouseStop(Element, GqEvent)}
- * method
- *
+ * method.
*/
protected boolean mouseUp(Element element, GqEvent event) {
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/QueuePlugin.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/QueuePlugin.java
index fe384dd3..886440d5 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/QueuePlugin.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/QueuePlugin.java
@@ -27,6 +27,8 @@ import java.util.Queue;
/**
* Class used in plugins which need a queue system.
+ *
+ * @param <T>
*/
public class QueuePlugin<T extends QueuePlugin<?>> extends GQuery {
@@ -80,14 +82,14 @@ public class QueuePlugin<T extends QueuePlugin<?>> extends GQuery {
}
/**
- * remove all queued functions from the effects queue
+ * remove all queued functions from the effects queue.
*/
public T clearQueue() {
return clearQueue(DEFAULT_NAME);
}
/**
- * remove all queued function from the named queue
+ * remove all queued function from the named queue.
*/
@SuppressWarnings("unchecked")
public T clearQueue(String name) {
@@ -98,14 +100,14 @@ public class QueuePlugin<T extends QueuePlugin<?>> extends GQuery {
}
/**
- * Add a delay in the effects queue
+ * Add a delay in the effects queue.
*/
public T delay(int milliseconds, Function... f) {
return delay(milliseconds, DEFAULT_NAME, f);
}
/**
- * Add a delay in the named queue
+ * Add a delay in the named queue.
*/
@SuppressWarnings("unchecked")
public T delay(int milliseconds, String name, Function... funcs) {
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/UiPlugin.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/UiPlugin.java
index b595c524..7968218f 100755
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/UiPlugin.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/UiPlugin.java
@@ -31,7 +31,7 @@ import com.google.gwt.query.client.Predicate;
public class UiPlugin extends GQuery {
/**
- * A POJO used to store dimension of an element
+ * A POJO used to store dimension of an element.
*
*/
public static class Dimension {
@@ -56,7 +56,7 @@ public class UiPlugin extends GQuery {
}
/**
- * return the width value
+ * return the width value.
*/
public int getWidth() {
return width;
@@ -76,11 +76,11 @@ public class UiPlugin extends GQuery {
scrollParent = gQueryUi.parents().filter(new Predicate() {
public boolean f(Element e, int index) {
- GQuery $e = GQuery.$(e);
- String position = $e.css("position", true);
+ GQuery g = GQuery.$(e);
+ String position = g.css("position", true);
return ("relative".equals(position) || "absolute".equals(position) || "fixed"
.equals(position))
- && isOverflowEnabled($e);
+ && isOverflowEnabled(g);
}
});
} else {
@@ -99,7 +99,7 @@ public class UiPlugin extends GQuery {
return "absolute".equals(gQueryUi.css("position"));
}
- private final Element getViewportElement() {
+ private Element getViewportElement() {
return GQuery.document.isCSS1Compat() ? GQuery.document
.getDocumentElement() : GQuery.document.getBody();
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Widgets.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Widgets.java
index 352e0e04..0c26c0bc 100755
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Widgets.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Widgets.java
@@ -84,7 +84,7 @@ public class Widgets extends QueuePlugin<Widgets> {
}
/**
- * Create and return a widget using the given factory and the given options
+ * Create and return a widget using the given factory and the given options.
*/
protected <W extends Widget> W widget(Element e, WidgetFactory<W> factory,
WidgetInitializer<W> initializer) {
@@ -101,7 +101,7 @@ public class Widgets extends QueuePlugin<Widgets> {
}
/**
- * Create and return a widget using the given factory and the given options
+ * Create and return a widget using the given factory and the given options.
*/
protected <W extends Widget> W widget(WidgetFactory<W> factory,
WidgetInitializer<W> initializers) {
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/ajax/Ajax.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/ajax/Ajax.java
index 394ec58f..b3b28f92 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/ajax/Ajax.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/ajax/Ajax.java
@@ -51,7 +51,10 @@ public class Ajax extends GQuery {
public static final String JSON_CONTENT_TYPE_UTF8 = JSON_CONTENT_TYPE + "; charset=utf-8";
- public static interface AjaxTransport {
+ /**
+ * Ajax Transport object.
+ */
+ public interface AjaxTransport {
Promise getJsonP(Settings settings);
Promise getLoadScript(Settings settings);
@@ -60,7 +63,7 @@ public class Ajax extends GQuery {
}
/**
- * Ajax Settings object
+ * Ajax Settings object.
*/
public interface Settings extends JsonBuilder {
String getContentType();
@@ -126,10 +129,6 @@ public class Ajax extends GQuery {
}, properties);
* </pre>
*
- * @param url The url to connect
- * @param onSuccess a function to execute in the case of success
- * @param onError the function to execute on error
- * @param settings a Properties object with the configuration of the Ajax request.
*/
public static Promise ajax(Settings settings) {
resolveSettings(settings);
@@ -353,7 +352,7 @@ public class Ajax extends GQuery {
}
/**
- * Load a JavaScript file from any url using the script tag mechanism
+ * Load a JavaScript file from any url using the script tag mechanism.
*/
public static Promise loadScript(String url) {
return loadScript(url, null);
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/Callbacks.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/Callbacks.java
index ce0112e1..de4a7094 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/Callbacks.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/Callbacks.java
@@ -26,12 +26,11 @@ public class Callbacks {
/**
* Iterface used for callbacks which could cancel the execution
- * when returning false;
- *
+ * when returning false.
*/
- public static interface Callback {
+ public interface Callback {
/**
- * Return false to avoid executing the rest of functions
+ * Return false to avoid executing the rest of functions.
*/
boolean f(Object ...objects);
}
@@ -97,7 +96,7 @@ public class Callbacks {
}
/**
- * lock
+ * lock.
*/
public Callbacks lock() {
if (!isMemory) {
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/FunctionDeferred.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/FunctionDeferred.java
index 38a03632..25f35fb7 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/FunctionDeferred.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/FunctionDeferred.java
@@ -45,6 +45,9 @@ import com.google.gwt.query.client.Promise.Deferred;
*/
public abstract class FunctionDeferred extends Function {
+ /**
+ * Cache types.
+ */
public static enum CacheType {NONE, ALL, RESOLVED, REJECTED};
protected Deferred dfd;
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/PromiseRPC.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/PromiseRPC.java
index 1c2f3338..b108f56e 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/PromiseRPC.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/PromiseRPC.java
@@ -34,6 +34,8 @@ import com.google.gwt.user.client.rpc.AsyncCallback;
* }
* });
* </pre>
+ *
+ * @param <T>
*/
public class PromiseRPC<T> extends DeferredPromiseImpl implements AsyncCallback<T> {
public void onFailure(Throwable caught) {
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/PromiseReqBuilder.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/PromiseReqBuilder.java
index 971160d6..3ef4de18 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/PromiseReqBuilder.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/PromiseReqBuilder.java
@@ -76,7 +76,7 @@ public class PromiseReqBuilder extends DeferredPromiseImpl implements RequestCal
/**
* Using this constructor we access to some things in the xmlHttpRequest
* which are not available in GWT, like adding progress handles or sending
- * javascript data (like forms in modern html5 file api)
+ * javascript data (like forms in modern html5 file api).
*/
public PromiseReqBuilder(Settings settings) {
String httpMethod = settings.getType();
@@ -170,20 +170,16 @@ public class PromiseReqBuilder extends DeferredPromiseImpl implements RequestCal
}
/**
- * Using violator pattern to execute private method
+ * Using violator pattern to execute private method.
*/
- private native void fireOnResponseReceivedVltr(Request rq, RequestCallback cb)
- /*-{
-
+ private native void fireOnResponseReceivedVltr(Request rq, RequestCallback cb) /*-{
rq.@com.google.gwt.http.client.Request::fireOnResponseReceived(Lcom/google/gwt/http/client/RequestCallback;)(cb);
}-*/;
/**
- * Using violator pattern to use protected constructor
+ * Using violator pattern to use protected constructor.
*/
- private native Request createRequestVltr(XMLHttpRequest rq, int ms, RequestCallback cb)
- /*-{
-
+ private native Request createRequestVltr(XMLHttpRequest rq, int ms, RequestCallback cb) /*-{
return @com.google.gwt.http.client.Request::new(Lcom/google/gwt/xhr/client/XMLHttpRequest;ILcom/google/gwt/http/client/RequestCallback;)(rq,ms,cb);
}-*/;
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/PromiseReqBuilderJSONP.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/PromiseReqBuilderJSONP.java
index 2f51218c..064e61c0 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/PromiseReqBuilderJSONP.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/PromiseReqBuilderJSONP.java
@@ -75,9 +75,7 @@ public class PromiseReqBuilderJSONP extends DeferredPromiseImpl {
}
// Using jsni because method send in JsonpRequestBuilder is private
- private final native void send(JsonpRequestBuilder bld, String url, AsyncCallback<?> cb)
- /*-{
-
+ private native void send(JsonpRequestBuilder bld, String url, AsyncCallback<?> cb) /*-{
bld.@com.google.gwt.jsonp.client.JsonpRequestBuilder::send(Ljava/lang/String;Lcom/google/gwt/user/client/rpc/AsyncCallback;Z)(url,cb,false);
}-*/;
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Fx.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Fx.java
index d1bdc922..04d5a695 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Fx.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Fx.java
@@ -29,7 +29,7 @@ import com.google.gwt.regexp.shared.RegExp;
public class Fx {
/**
- * Public variable to enable/disable effects
+ * Public variable to enable/disable effects.
*/
public static boolean off = false;
@@ -64,7 +64,7 @@ public class Fx {
public static class ColorFx extends Fx {
/**
- * Specific class handle specific borderColor shortcut properties
+ * Specific class handle specific borderColor shortcut properties.
*/
public static class BorderColorFx extends ColorFx {
@@ -81,10 +81,10 @@ public class Fx {
endColor = parseColor(endColorString);
startColors = JsNamedArray.create();
- GQuery $e = GQuery.$(e);
+ GQuery g = GQuery.$(e);
for (String border : borderColorProperties) {
- int[] startColor = parseColor($e.css(border, true));
+ int[] startColor = parseColor(g.css(border, true));
startColors.put(border, startColor);
}
}
@@ -269,15 +269,15 @@ public class Fx {
public void applyValue(GQuery g, double progress) {
double ret = (start + ((end - start) * progress));
- String value = ("px".equals(unit) ? ((int) ret) : ret) + unit;
+ String val = ("px".equals(unit) ? ((int) ret) : ret) + unit;
if ("scrollTop".equals(cssprop)) {
g.scrollTop((int)ret);
} else if ("scrollLeft".equals(cssprop)) {
g.scrollLeft((int)ret);
} else if (attribute != null) {
- g.attr(attribute, value);
+ g.attr(attribute, val);
} else {
- g.css(cssprop, value);
+ g.css(cssprop, val);
}
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/PropertiesAnimation.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/PropertiesAnimation.java
index 2c4c6f76..56d64d24 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/PropertiesAnimation.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/PropertiesAnimation.java
@@ -37,17 +37,17 @@ public class PropertiesAnimation extends GQAnimation {
/**
* Easing method to use.
*/
- public static interface Easing {
- public double interpolate(double progress);
+ public interface Easing {
+ double interpolate(double progress);
/**
* @deprecated use EasingCurve.linear instead
*/
- public Easing LINEAR = EasingCurve.linear;
+ Easing LINEAR = EasingCurve.linear;
/**
* @deprecated use EasingCurve.swing instead
*/
- public Easing SWING = EasingCurve.swing;
+ Easing SWING = EasingCurve.swing;
}
/**
@@ -212,10 +212,10 @@ public class PropertiesAnimation extends GQAnimation {
String attr = g.attr(rkey);
MatchResult parts = REGEX_NUMBER_UNIT.exec(attr);
if (parts != null) {
- String $1 = parts.getGroup(1);
- String $2 = parts.getGroup(2);
- cur = Double.parseDouble($1);
- unit = $2 == null ? "" : $2;
+ String p1 = parts.getGroup(1);
+ String p2 = parts.getGroup(2);
+ cur = Double.parseDouble(p1);
+ unit = p2 == null ? "" : p2;
} else {
cur = g.cur(key, true);
key = rkey;
@@ -241,26 +241,26 @@ public class PropertiesAnimation extends GQAnimation {
MatchResult parts = REGEX_SYMBOL_NUMBER_UNIT.exec(val);
if (parts != null) {
- String $1 = parts.getGroup(1);
- String $2 = parts.getGroup(2);
- String $3 = parts.getGroup(3);
- end = Double.parseDouble($2);
+ String p1 = parts.getGroup(1);
+ String p2 = parts.getGroup(2);
+ String p3 = parts.getGroup(3);
+ end = Double.parseDouble(p2);
if (rkey == null) {
unit = REGEX_NON_PIXEL_ATTRS.test(key) ? "" : //
- $3 == null || $3.isEmpty() ? "px" : $3;
+ p3 == null || p3.isEmpty() ? "px" : p3;
if (!"px".equals(unit)) {
double to = end == 0 ? 1 : end;
g.css(key, to + unit);
start = to * start / g.cur(key, true);
g.css(key, start + unit);
}
- } else if ($3 != null && !$3.isEmpty()) {
- unit = $3;
+ } else if (p3 != null && !p3.isEmpty()) {
+ unit = p3;
}
- if ($1 != null && !$1.isEmpty()) {
- end = (("-=".equals($1) ? -1 : 1) * end) + start;
+ if (p1 != null && !p1.isEmpty()) {
+ end = (("-=".equals(p1) ? -1 : 1) * end) + start;
}
}
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/TransitionsAnimation.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/TransitionsAnimation.java
index 9cc24342..6155540a 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/TransitionsAnimation.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/TransitionsAnimation.java
@@ -30,10 +30,13 @@ import com.google.gwt.regexp.shared.MatchResult;
/**
* Animation effects on any numeric CSS3 property or transformation
- * using CSS3 transitions
+ * using CSS3 transitions.
*/
public class TransitionsAnimation extends PropertiesAnimation {
+ /**
+ * TransitionAnimation with Clip capabilities.
+ */
public static class TransitionsClipAnimation extends TransitionsAnimation {
private Action action;
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/EventsListener.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/EventsListener.java
index 7c6ec716..bfb24d2c 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/EventsListener.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/EventsListener.java
@@ -409,30 +409,22 @@ public class EventsListener implements EventListener {
}
}
- private static native void cleanGQListeners(Element elem)
- /*-{
-
+ private static native void cleanGQListeners(Element elem) /*-{
if (elem.__gwtlistener) {
@com.google.gwt.user.client.DOM::setEventListener(*)(elem, elem.__gwtlistener);
}
elem.__gwtlistener = elem.__gqueryevent = elem.__gquery = null;
}-*/;
- private static native EventsListener getGQueryEventListener(Element elem)
- /*-{
-
+ private static native EventsListener getGQueryEventListener(Element elem) /*-{
return elem.__gqueryevent;
}-*/;
- private static native EventListener getGwtEventListener(Element elem)
- /*-{
-
+ private static native EventListener getGwtEventListener(Element elem) /*-{
return elem.__gwtlistener;
}-*/;
- private static native void init(Element elem, EventsListener gqevent)
- /*-{
-
+ private static native void init(Element elem, EventsListener gqevent) /*-{
elem.__gwtlistener = @com.google.gwt.user.client.DOM::getEventListener(*)(elem);
elem.__gqueryevent = gqevent;
// Someone has reported that in IE the init can be called multiple times
@@ -441,9 +433,7 @@ public class EventsListener implements EventListener {
if (elem.__gwtlistener == gqevent) elem.__gwtlistener = null;
}-*/;
- private static native void sinkBitlessEvent(Element elem, String name)
- /*-{
-
+ private static native void sinkBitlessEvent(Element elem, String name) /*-{
if (!elem.__gquery)
elem.__gquery = [];
if (elem.__gquery[name])
@@ -501,8 +491,8 @@ public class EventsListener implements EventListener {
String nameSpace = null;
String eventName = event;
- //seperate possible namespace
- //jDramaix: I removed old regex ^([^.]*)\.?(.*$) because it didn't work on IE8...
+ // seperate possible namespace
+ // jDramaix: I removed old regex ^([^.]*)\.?(.*$) because it didn't work on IE8...
String[] subparts = event.split("\\.", 2);
if (subparts.length == 2){
@@ -510,7 +500,7 @@ public class EventsListener implements EventListener {
eventName = subparts[0];
}
- //handle special event like mouseenter or mouseleave
+ // handle special event like mouseenter or mouseleave
SpecialEvent hook = special.get(eventName);
eventName = hook != null ? hook.getDelegateType() : eventName;
String originalEventName = hook != null ? hook.getOriginalType() : null;
@@ -543,8 +533,8 @@ public class EventsListener implements EventListener {
String nameSpace = null;
String eventName = event;
- //seperate possible namespace
- //jDramaix: I removed old regex ^([^.]*)\.?(.*$) because it didn't work on IE8...
+ // seperate possible namespace
+ // jDramaix: I removed old regex ^([^.]*)\.?(.*$) because it didn't work on IE8...
String[] subparts = event.split("\\.", 2);
if (subparts.length == 2) {
@@ -552,7 +542,7 @@ public class EventsListener implements EventListener {
eventName = subparts[0];
}
- //handle special event like mouseenter or mouseleave
+ // handle special event like mouseenter or mouseleave
SpecialEvent hook = special.get(eventName);
eventName = hook != null ? hook.getDelegateType() : eventName;
String originalEventName = hook != null ? hook.getOriginalType() : null;
@@ -651,7 +641,7 @@ public class EventsListener implements EventListener {
eventName = subparts[0];
}
- //handle special event like mouseenter or mouseleave
+ // handle special event like mouseenter or mouseleave
SpecialEvent hook = special.get(eventName);
eventName = hook != null ? hook.getDelegateType() : eventName;
String originalEventName = hook != null ? hook.getOriginalType() : null;
@@ -776,8 +766,8 @@ public class EventsListener implements EventListener {
String nameSpace = null;
String eventName = event;
- //seperate possible namespace
- //jDramaix: I removed old regex ^([^.]*)\.?(.*$) because it didn't work on IE8...
+ // seperate possible namespace
+ // jDramaix: I removed old regex ^([^.]*)\.?(.*$) because it didn't work on IE8...
String[] subparts = event.split("\\.", 2);
if (subparts.length == 2){
@@ -785,7 +775,7 @@ public class EventsListener implements EventListener {
eventName = subparts[0];
}
- //handle special event
+ // handle special event
SpecialEvent hook = special.get(eventName);
eventName = hook != null ? hook.getDelegateType() : eventName;
String originalEventName = hook != null ? hook.getOriginalType() : null;
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/GqEvent.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/GqEvent.java
index ec35dbdc..a93e5491 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/GqEvent.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/GqEvent.java
@@ -35,15 +35,11 @@ import com.google.gwt.user.client.Event;
*/
public class GqEvent extends Event {
- public static native void setOriginalEventType(NativeEvent evt, String originalEventName)
- /*-{
-
+ public static native void setOriginalEventType(NativeEvent evt, String originalEventName) /*-{
evt["__gwtquery_originalEventName"] = originalEventName;
}-*/;
- public static native String getOriginalEventType(Event evt)
- /*-{
-
+ public static native String getOriginalEventType(Event evt) /*-{
return evt["__gwtquery_originalEventName"] || null;
}-*/;
@@ -62,9 +58,7 @@ public class GqEvent extends Event {
}
private static native void copy(
- Event originalEvent, GqEvent gQueryEvent)
- /*-{
-
+ Event originalEvent, GqEvent gQueryEvent) /*-{
for ( var field in originalEvent) {
gQueryEvent[field] = originalEvent[field];
}
@@ -75,27 +69,23 @@ public class GqEvent extends Event {
}
/**
- * Return the original event (the one created by the browser)
+ * Return the original event (the one created by the browser).
*/
- public final native Event getOriginalEvent()
- /*-{
-
+ public final native Event getOriginalEvent() /*-{
return this.originalEvent;
}-*/;
- public final native void setCurrentElementTarget(Element e)
- /*-{
-
+ public final native void setCurrentElementTarget(Element e) /*-{
this.currentTarget = e;
- //ie don't have a currentEventTarget field on event
+ // ie don't have a currentEventTarget field on event
try{
@com.google.gwt.dom.client.DOMImplTrident::currentEventTarget = e;
}catch(e){}
}-*/;
/**
- * Tell whether ctrl or cmd key is pressed
+ * Tell whether ctrl or cmd key is pressed.
*
*/
public final boolean isMetaKeyPressed() {
@@ -103,7 +93,7 @@ public class GqEvent extends Event {
}
/**
- * The mouse position relative to the left edge of the document
+ * The mouse position relative to the left edge of the document.
*
*/
public final int pageX() {
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/HtmlPanelWidgetFactory.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/HtmlPanelWidgetFactory.java
index 527b2de3..c9c54dd6 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/HtmlPanelWidgetFactory.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/HtmlPanelWidgetFactory.java
@@ -18,6 +18,9 @@ package com.google.gwt.query.client.plugins.widgets;
import com.google.gwt.dom.client.Element;
import com.google.gwt.user.client.ui.HTMLPanel;
+/**
+ * HtmlPanelWidgetFactory.
+ */
public class HtmlPanelWidgetFactory implements WidgetFactory<HTMLPanel> {
public HTMLPanel create(Element e) {
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/LabelWidgetFactory.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/LabelWidgetFactory.java
index b7c4bad9..a6e01fff 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/LabelWidgetFactory.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/LabelWidgetFactory.java
@@ -18,6 +18,9 @@ package com.google.gwt.query.client.plugins.widgets;
import com.google.gwt.dom.client.Element;
import com.google.gwt.user.client.ui.Label;
+/**
+ * LabelWidgetFactory.
+ */
public class LabelWidgetFactory implements WidgetFactory<Label> {
public Label create(Element e) {
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/TextBoxBaseWidgetFactory.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/TextBoxBaseWidgetFactory.java
index 55135962..4ca5179b 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/TextBoxBaseWidgetFactory.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/TextBoxBaseWidgetFactory.java
@@ -20,7 +20,9 @@ import com.google.gwt.dom.client.InputElement;
import com.google.gwt.user.client.ui.TextBoxBase;
/**
+ * TextBoxBaseWidgetFactory.
*
+ * @param <T>
*/
public abstract class TextBoxBaseWidgetFactory<T extends TextBoxBase>
implements WidgetFactory<T> {
@@ -39,7 +41,7 @@ public abstract class TextBoxBaseWidgetFactory<T extends TextBoxBase>
return (T) textBox;
}
- protected String getEquivalentTagName(){
+ protected String getEquivalentTagName() {
return "input";
}
@@ -50,7 +52,8 @@ public abstract class TextBoxBaseWidgetFactory<T extends TextBoxBase>
destination.setAccessKey(source.getAccessKey());
destination.setDefaultValue(source.getDefaultValue());
destination.setDisabled(source.isDisabled());
- if (source.getMaxLength() > 0) destination.setMaxLength(source.getMaxLength());
+ if (source.getMaxLength() > 0)
+ destination.setMaxLength(source.getMaxLength());
destination.setReadOnly(source.isReadOnly());
destination.setSize(source.getSize());
destination.setName(source.getName());
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetFactory.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetFactory.java
index 353befce..82ab0c54 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetFactory.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetFactory.java
@@ -19,11 +19,10 @@ import com.google.gwt.dom.client.Element;
import com.google.gwt.user.client.ui.Widget;
/**
- * Factory interface
- *
- * @param <W>
- * @param <O>
- */
- public interface WidgetFactory<W extends Widget> {
- public W create(Element e);
- }
+ * Factory interface.
+ *
+ * @param <W>
+ */
+public interface WidgetFactory<W extends Widget> {
+ W create(Element e);
+}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetInitializer.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetInitializer.java
index 47369c82..806edfcb 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetInitializer.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetInitializer.java
@@ -18,11 +18,16 @@ package com.google.gwt.query.client.plugins.widgets;
import com.google.gwt.dom.client.Element;
import com.google.gwt.user.client.ui.Widget;
+/**
+ * WidgetInitializer.
+ *
+ * @param <W>
+ */
public interface WidgetInitializer<W extends Widget> {
- /**
- * Initialize the newly created widget <code>w</code>. The element <code>e</code>
- * is the element used to construct the widget.
- *
- */
- void initialize(W w, Element e);
- }
+ /**
+ * Initialize the newly created widget <code>w</code>. The element <code>e</code>
+ * is the element used to construct the widget.
+ *
+ */
+ void initialize(W w, Element e);
+}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetsHtmlPanel.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetsHtmlPanel.java
index e03c7b7f..d216df1e 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetsHtmlPanel.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetsHtmlPanel.java
@@ -60,11 +60,9 @@ public class WidgetsHtmlPanel extends HTMLPanel {
}
/**
- * use jsni to access private attribute
+ * use jsni to access private attribute.
*/
- private native void setElementImpl(Element e)
- /*-{
-
+ private native void setElementImpl(Element e) /*-{
this.@com.google.gwt.user.client.ui.UIObject::element = e;
}-*/;
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetsUtils.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetsUtils.java
index 6d1045fc..c60e802f 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetsUtils.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetsUtils.java
@@ -35,6 +35,9 @@ import com.google.gwt.user.client.ui.WidgetCollection;
import java.util.Iterator;
+/**
+ * WidgetsUtils.
+ */
public class WidgetsUtils {
static final String[] appendingTags = {
@@ -56,7 +59,7 @@ public class WidgetsUtils {
}
/**
- * Test if the tag name of the element is one of tag names given in parameter
+ * Test if the tag name of the element is one of tag names given in parameter.
*
* @param tagNames
* @return
@@ -117,7 +120,7 @@ public class WidgetsUtils {
}
}
- /**
+ /**
* If the <code>oldElement</code> is a td, th, li tags, the new element will replaced its content.
* In other cases, the <code>oldElement</code> will be replaced by the <code>newElement</code>
* and the old element classes will be copied to the new element.
@@ -130,14 +133,14 @@ public class WidgetsUtils {
}else{
GQuery.$(oldElement).replaceWith(newElement);
- //copy class
+ // copy class
String c = oldElement.getClassName();
if (!c.isEmpty()) {
newElement.addClassName(c);
}
- //copy id
+ // copy id
newElement.setId(oldElement.getId());
- //ensure no duplicate id
+ // ensure no duplicate id
oldElement.setId("");
}
}
@@ -213,7 +216,7 @@ public class WidgetsUtils {
}
/**
- * Remove a widget from the detach list
+ * Remove a widget from the detach list.
*/
public static void detachWidget(final Widget widget) {
if (widget != null) {
@@ -223,9 +226,7 @@ public class WidgetsUtils {
/**
* This method detach a widget of its parent without doing a physical
- * detach (DOM manipulation)
- *
- * @param w
+ * detach (DOM manipulation).
*/
public static void doLogicalDetachFromHtmlPanel(Widget w) {
Widget parent = w.getParent();
@@ -240,7 +241,7 @@ public class WidgetsUtils {
}
/**
- * Return children of the first widget's panel
+ * Return children of the first widget's panel.
*/
public static Iterator<Widget> getChildren(Widget w){
if(w instanceof Panel){
@@ -260,27 +261,19 @@ public class WidgetsUtils {
return $(element).parents().widget();
}
- private static native void widgetOnAttach(Widget w)
- /*-{
-
+ private static native void widgetOnAttach(Widget w) /*-{
w.@com.google.gwt.user.client.ui.Widget::onAttach()();
}-*/;
- private static native void widgetSetParent(Widget w, Widget p)
- /*-{
-
+ private static native void widgetSetParent(Widget w, Widget p) /*-{
w.@com.google.gwt.user.client.ui.Widget::setParent(Lcom/google/gwt/user/client/ui/Widget;)(p);
}-*/;
- private static native Widget compositeGetWidget(Composite w)
- /*-{
-
+ private static native Widget compositeGetWidget(Composite w) /*-{
return w.@com.google.gwt.user.client.ui.Composite::getWidget()();
}-*/;
- private static native WidgetCollection complexPanelGetChildren(ComplexPanel w)
- /*-{
-
+ private static native WidgetCollection complexPanelGetChildren(ComplexPanel w) /*-{
return w.@com.google.gwt.user.client.ui.ComplexPanel::getChildren()();
}-*/;
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/rebind/BrowserGenerator.java b/gwtquery-core/src/main/java/com/google/gwt/query/rebind/BrowserGenerator.java
index 403fd60a..a0dbd668 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/rebind/BrowserGenerator.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/rebind/BrowserGenerator.java
@@ -29,7 +29,7 @@ import com.google.gwt.user.rebind.SourceWriter;
import java.io.PrintWriter;
/**
- * Creates an implementation for {@link Browser}
+ * Creates an implementation for {@link Browser}.
*/
public class BrowserGenerator extends Generator {
@Override
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/rebind/JsniBundleGenerator.java b/gwtquery-core/src/main/java/com/google/gwt/query/rebind/JsniBundleGenerator.java
index 6c650c82..9b1fa68b 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/rebind/JsniBundleGenerator.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/rebind/JsniBundleGenerator.java
@@ -22,7 +22,6 @@ import com.google.gwt.core.ext.UnableToCompleteException;
import com.google.gwt.core.ext.typeinfo.JClassType;
import com.google.gwt.core.ext.typeinfo.JMethod;
import com.google.gwt.core.ext.typeinfo.TypeOracle;
-import com.google.gwt.query.client.builders.JsniBundle;
import com.google.gwt.query.client.builders.JsniBundle.LibrarySource;
import com.google.gwt.query.client.builders.JsniBundle.MethodSource;
import com.google.gwt.user.rebind.ClassSourceFileComposerFactory;
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/rebind/JsonBuilderGenerator.java b/gwtquery-core/src/main/java/com/google/gwt/query/rebind/JsonBuilderGenerator.java
index 421bac35..23f5e727 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/rebind/JsonBuilderGenerator.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/rebind/JsonBuilderGenerator.java
@@ -103,7 +103,7 @@ public class JsonBuilderGenerator extends Generator {
Set<String> attrs = new HashSet<String>();
for (JMethod method : clazz.getInheritableMethods()) {
String methName = method.getName();
- //skip method from JsonBuilder
+ // skip method from JsonBuilder
if(jsonBuilderType.findMethod(method.getName(), method.getParameterTypes()) != null ||
settingsType.findMethod(method.getName(), method.getParameterTypes()) != null ) {
continue;
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/rebind/SelectorGeneratorCssToXPath.java b/gwtquery-core/src/main/java/com/google/gwt/query/rebind/SelectorGeneratorCssToXPath.java
index 740bf26a..0f26d4ab 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/rebind/SelectorGeneratorCssToXPath.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/rebind/SelectorGeneratorCssToXPath.java
@@ -91,7 +91,7 @@ public class SelectorGeneratorCssToXPath extends SelectorGeneratorBase {
System.err.println("Invalid XPath generated selector, please revise it: " + xselector);
if (!selector.equals(xselector)) {
System.err.println("If your css2 selector syntax is correct, open an issue in the gwtquery project. cssselector:"
- + selector + " xpath:" + xselector);
+ + selector + " xpath: " + xselector);
}
throw new UnableToCompleteException();
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/rebind/SelectorGeneratorJSOptimal.java b/gwtquery-core/src/main/java/com/google/gwt/query/rebind/SelectorGeneratorJSOptimal.java
index 7cbdcf13..e98d8fc8 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/rebind/SelectorGeneratorJSOptimal.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/rebind/SelectorGeneratorJSOptimal.java
@@ -176,7 +176,7 @@ public class SelectorGeneratorJSOptimal extends SelectorGeneratorBase {
//
// if (notNull(mm.group(1))) {
// mode = mm.group(1).replaceAll(trimReStr, "");
-// debug("replacing q=" + q + " this part:" + mm.group(1));
+// debug("replacing q=" + q + " this part: " + mm.group(1));
// q = q.replaceFirst("\\Q" + mm.group(1) + "\\E", "");
// }
// }
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/rebind/XmlBuilderGenerator.java b/gwtquery-core/src/main/java/com/google/gwt/query/rebind/XmlBuilderGenerator.java
index b35b1ab6..a967a533 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/rebind/XmlBuilderGenerator.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/rebind/XmlBuilderGenerator.java
@@ -54,7 +54,7 @@ public class XmlBuilderGenerator extends Generator {
t[1], requestedClass);
if (sw != null) {
for (JMethod method : clazz.getInheritableMethods()) {
- //skip method from JsonBuilder
+ // skip method from JsonBuilder
if(xmlBuilderType.findMethod(method.getName(), method.getParameterTypes()) != null){
continue;
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/vm/AjaxTransportJre.java b/gwtquery-core/src/main/java/com/google/gwt/query/vm/AjaxTransportJre.java
index 6ef405aa..b27309ef 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/vm/AjaxTransportJre.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/vm/AjaxTransportJre.java
@@ -66,7 +66,7 @@ public class AjaxTransportJre implements AjaxTransport {
followRedirections = b;
}
- private final String USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:26.0) Gecko/20100101 Firefox/26.0";
+ private static final String USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:26.0) Gecko/20100101 Firefox/26.0";
private final String jsonpCbRexp = "(?ms)^.*jre_callback\\((.*)\\).*$";
public Promise getJsonP(final Settings settings) {
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/vm/CookieManager.java b/gwtquery-core/src/main/java/com/google/gwt/query/vm/CookieManager.java
index baf6fabd..a2d3fdd7 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/vm/CookieManager.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/vm/CookieManager.java
@@ -27,8 +27,7 @@ import java.util.Map;
import java.util.StringTokenizer;
/**
- * @author Ian Brown spam@hccp.org
- * http://www.hccp.org/java-net-cookie-how-to.html
+ * http://www.hccp.org/java-net-cookie-how-to.html.
*/
public class CookieManager {
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/vm/JsonFactoryJre.java b/gwtquery-core/src/main/java/com/google/gwt/query/vm/JsonFactoryJre.java
index 0d9763c2..10547b98 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/vm/JsonFactoryJre.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/vm/JsonFactoryJre.java
@@ -60,7 +60,7 @@ public class JsonFactoryJre implements JsonFactory {
* Functions in JVM.
*/
static class JreJsonFunction extends JreJsonNull {
- final private Function function;
+ private final Function function;
public JreJsonFunction(Function f) {
function = f;
}
@@ -73,6 +73,9 @@ public class JsonFactoryJre implements JsonFactory {
}
}
+ /**
+ *
+ */
public static class JsonBuilderHandler implements InvocationHandler {
private JsonObject jsonObject;
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/vm/ResponseJre.java b/gwtquery-core/src/main/java/com/google/gwt/query/vm/ResponseJre.java
index 2d4556b1..a50a57cb 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/vm/ResponseJre.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/vm/ResponseJre.java
@@ -22,7 +22,7 @@ import java.util.List;
import java.util.Map;
/**
- * Implementation of `Response` in the JVM
+ * Implementation of `Response` in the JVM.
*/
public class ResponseJre extends Response {
private int status;
diff --git a/gwtquery-core/src/main/java/com/google/web/bindery/requestfactory/shared/gquery/PromiseRF.java b/gwtquery-core/src/main/java/com/google/web/bindery/requestfactory/shared/gquery/PromiseRF.java
index 83812146..00c9a07b 100644
--- a/gwtquery-core/src/main/java/com/google/web/bindery/requestfactory/shared/gquery/PromiseRF.java
+++ b/gwtquery-core/src/main/java/com/google/web/bindery/requestfactory/shared/gquery/PromiseRF.java
@@ -69,7 +69,7 @@ public class PromiseRF extends DeferredPromiseImpl {
*/
public PromiseRF(Request<?>[] requests) {
for (Request<?> request : requests) {
- total ++;
+ total++;
request.to(new Receiver<Object>() {
public void onConstraintViolation(Set<ConstraintViolation<?>> violations) {
dfd.reject(new ServerFailure("ConstraintViolation"), violations);