";
}
@@ -163,9 +163,9 @@ public class FetchReleaseNotesTickets {
}
private static void usage() {
- System.err.println("Usage: "
- + FetchReleaseNotesTickets.class.getSimpleName()
- + " -Dvaadin.version=");
+ System.err.println(
+ "Usage: " + FetchReleaseNotesTickets.class.getSimpleName()
+ + " -Dvaadin.version=");
System.exit(1);
}
}
diff --git a/buildhelpers/src/main/java/com/vaadin/buildhelpers/CompileTheme.java b/buildhelpers/src/main/java/com/vaadin/buildhelpers/CompileTheme.java
index d97025bdb6..edd4fd9b88 100644
--- a/buildhelpers/src/main/java/com/vaadin/buildhelpers/CompileTheme.java
+++ b/buildhelpers/src/main/java/com/vaadin/buildhelpers/CompileTheme.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -64,11 +64,11 @@ public class CompileTheme {
// Regular theme
try {
processSassTheme(themeFolder, themeName, "styles", version);
- System.out.println("Compiling theme " + themeName
- + " styles successful");
+ System.out.println(
+ "Compiling theme " + themeName + " styles successful");
} catch (Exception e) {
- System.err.println("Compiling theme " + themeName
- + " styles failed");
+ System.err
+ .println("Compiling theme " + themeName + " styles failed");
e.printStackTrace();
}
// Legacy theme w/o .themename{} wrapping
@@ -82,8 +82,8 @@ public class CompileTheme {
+ " legacy-styles successful");
}
} catch (Exception e) {
- System.err.println("Compiling theme " + themeName
- + " legacy-styles failed");
+ System.err.println(
+ "Compiling theme " + themeName + " legacy-styles failed");
e.printStackTrace();
}
}
@@ -103,8 +103,8 @@ public class CompileTheme {
ScssStylesheet scss = ScssStylesheet.get(sassFile);
if (scss == null) {
- throw new IllegalArgumentException("SASS file: " + sassFile
- + " not found");
+ throw new IllegalArgumentException(
+ "SASS file: " + sassFile + " not found");
}
scss.compile();
String filteredScss = scss.printState().replace("@version@", version);
@@ -128,8 +128,8 @@ public class CompileTheme {
boolean ok = newCss.renameTo(oldCss);
if (!ok) {
- throw new RuntimeException("Rename " + newCss + " -> " + oldCss
- + " failed");
+ throw new RuntimeException(
+ "Rename " + newCss + " -> " + oldCss + " failed");
}
}
@@ -142,8 +142,8 @@ public class CompileTheme {
// hiding other classpath issues
Class> smartSpritesClass = org.carrot2.labs.smartsprites.SmartSprites.class;
} catch (NoClassDefFoundError e) {
- System.err
- .println("Could not find smartsprites. No sprites were generated. The theme should still work.");
+ System.err.println(
+ "Could not find smartsprites. No sprites were generated. The theme should still work.");
return;
}
diff --git a/buildhelpers/src/main/java/com/vaadin/buildhelpers/GeneratePackageExports.java b/buildhelpers/src/main/java/com/vaadin/buildhelpers/GeneratePackageExports.java
index d4ad3f838c..a27bed1dba 100644
--- a/buildhelpers/src/main/java/com/vaadin/buildhelpers/GeneratePackageExports.java
+++ b/buildhelpers/src/main/java/com/vaadin/buildhelpers/GeneratePackageExports.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -35,7 +35,7 @@ import java.util.regex.Pattern;
* Export-Package attribute, and appends it to the jar's MANIFEST.MF.
*
* See #3521 for details.
- *
+ *
* @author magi
*/
public class GeneratePackageExports {
@@ -44,11 +44,10 @@ public class GeneratePackageExports {
public static void main(String[] args) {
if (args.length < 2) {
- System.err
- .println("Invalid number of parameters\n"
- + "Usage: java -cp .. GenerateManifest \n"
- + "Use -Dvaadin.version to specify the version to be used for the packages\n"
- + "Use -DincludeNumberPackages=1 to include package names which start with a number (not 100% OSGi compatible)");
+ System.err.println("Invalid number of parameters\n"
+ + "Usage: java -cp .. GenerateManifest \n"
+ + "Use -Dvaadin.version to specify the version to be used for the packages\n"
+ + "Use -DincludeNumberPackages=1 to include package names which start with a number (not 100% OSGi compatible)");
System.exit(1);
}
@@ -149,7 +148,7 @@ public class GeneratePackageExports {
* version.. Searches for the packge and then its parents
* recursively. Falls back to the "vaadin.version" system property if no
* other properties are found.
- *
+ *
* @param javaPackage
* The package to determine a version for
* @return A version or null if no version has been defined
@@ -178,7 +177,8 @@ public class GeneratePackageExports {
}
private static HashSet getPackages(JarFile jar,
- List acceptedPackagePrefixes, boolean includeNumberPackages) {
+ List acceptedPackagePrefixes,
+ boolean includeNumberPackages) {
HashSet packages = new HashSet();
Pattern startsWithNumber = Pattern.compile("\\.\\d");
@@ -198,10 +198,11 @@ public class GeneratePackageExports {
}
int lastSlash = entry.getName().lastIndexOf('/');
- String pkg = entry.getName().substring(0, lastSlash)
- .replace('/', '.');
+ String pkg = entry.getName().substring(0, lastSlash).replace('/',
+ '.');
- if (!includeNumberPackages && startsWithNumber.matcher(pkg).find()) {
+ if (!includeNumberPackages
+ && startsWithNumber.matcher(pkg).find()) {
continue;
}
diff --git a/buildhelpers/src/main/java/com/vaadin/buildhelpers/ManifestWriter.java b/buildhelpers/src/main/java/com/vaadin/buildhelpers/ManifestWriter.java
index 9e9b29c4a1..bb8cb27e38 100644
--- a/buildhelpers/src/main/java/com/vaadin/buildhelpers/ManifestWriter.java
+++ b/buildhelpers/src/main/java/com/vaadin/buildhelpers/ManifestWriter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -33,7 +33,7 @@ public class ManifestWriter {
/**
* Writes a manifest attribute to a temporary buffer.
- *
+ *
* @param name
* Attribute name
* @param value
@@ -56,10 +56,10 @@ public class ManifestWriter {
/**
* Writes the manifest to given JAR file.
- *
+ *
* The manifest must be created with {@code #writeAttribute(String, String)}
* before calling this write.
- *
+ *
* @param jarFilename
* File name of the JAR in which the manifest is written
* @return 0 on success, nonzero value on error
@@ -85,9 +85,9 @@ public class ManifestWriter {
fos.write(getBytes());
fos.close();
} catch (IOException e) {
- System.err.println("Writing to file '"
- + newMfFile.getAbsolutePath() + "' failed because: "
- + e.getMessage());
+ System.err.println(
+ "Writing to file '" + newMfFile.getAbsolutePath()
+ + "' failed because: " + e.getMessage());
status = 1;
}
}
@@ -100,9 +100,9 @@ public class ManifestWriter {
is = new FileInputStream(newMfFile);
checkMf.read(is);
} catch (IOException e) {
- System.err.println("Reading from file '"
- + newMfFile.getAbsolutePath() + "' failed because: "
- + e.getMessage());
+ System.err.println(
+ "Reading from file '" + newMfFile.getAbsolutePath()
+ + "' failed because: " + e.getMessage());
status = 1;
}
}
@@ -112,8 +112,8 @@ public class ManifestWriter {
System.out.println("Updating manifest in JAR " + jarFilename);
try {
// The "mf" order must correspond with manifest-jarfile order
- Process process = Runtime.getRuntime().exec(
- new String[] { "jar", "umf",
+ Process process = Runtime.getRuntime()
+ .exec(new String[] { "jar", "umf",
newMfFile.getAbsolutePath(), jarFilename });
int exitValue = process.waitFor();
if (exitValue != 0) {
@@ -123,14 +123,14 @@ public class ManifestWriter {
while (reader.ready()) {
System.err.println("jar: " + reader.readLine());
}
- System.err
- .println("The 'jar' command returned with exit value "
+ System.err.println(
+ "The 'jar' command returned with exit value "
+ exitValue);
status = 1;
}
} catch (IOException e) {
- System.err.println("Failed to execute 'jar' command. "
- + e.getMessage());
+ System.err.println(
+ "Failed to execute 'jar' command. " + e.getMessage());
status = 1;
} catch (InterruptedException e) {
System.err
diff --git a/client-compiler/src/main/java/com/vaadin/sass/linker/SassLinker.java b/client-compiler/src/main/java/com/vaadin/sass/linker/SassLinker.java
index dda6733384..aaea3b60c1 100644
--- a/client-compiler/src/main/java/com/vaadin/sass/linker/SassLinker.java
+++ b/client-compiler/src/main/java/com/vaadin/sass/linker/SassLinker.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -42,7 +42,7 @@ import com.vaadin.sass.internal.ScssStylesheet;
* Pre-linker that checks for the existence of SASS files in public folders,
* compiles them to CSS files with the SassCompiler from Vaadin and adds the CSS
* back into the artifact.
- *
+ *
*/
@LinkerOrder(Order.PRE)
@Shardable
@@ -109,30 +109,31 @@ public class SassLinker extends AbstractLinker {
// Store the file info for the compilation
scssFiles.add(new FileInfo(tempfile, partialPath));
} else {
- logger.log(TreeLogger.WARN, "Duplicate file "
- + tempfile.getPath());
+ logger.log(TreeLogger.WARN,
+ "Duplicate file " + tempfile.getPath());
}
} catch (IOException e) {
logger.log(TreeLogger.ERROR,
- "Could not write temporary file " + fileName, e);
+ "Could not write temporary file " + fileName,
+ e);
}
}
}
// Compile the files and store them in the artifact
- logger.log(TreeLogger.INFO, "Processing " + scssFiles.size()
- + " Sass file(s)");
+ logger.log(TreeLogger.INFO,
+ "Processing " + scssFiles.size() + " Sass file(s)");
for (FileInfo fileInfo : scssFiles) {
logger.log(TreeLogger.INFO, " " + fileInfo.originalScssPath
+ " -> " + fileInfo.getOriginalCssPath());
try {
- ScssStylesheet scss = ScssStylesheet.get(fileInfo
- .getAbsolutePath());
+ ScssStylesheet scss = ScssStylesheet
+ .get(fileInfo.getAbsolutePath());
if (!fileInfo.isMixin()) {
scss.compile();
- InputStream is = new ByteArrayInputStream(scss
- .printState().getBytes());
+ InputStream is = new ByteArrayInputStream(
+ scss.printState().getBytes());
toReturn.add(this.emitInputStream(logger, is,
fileInfo.getOriginalCssPath()));
@@ -143,10 +144,8 @@ public class SassLinker extends AbstractLinker {
logger.log(TreeLogger.ERROR, "SCSS compilation failed for "
+ fileInfo.getOriginalCssPath(), e);
} catch (IOException e) {
- logger.log(
- TreeLogger.ERROR,
- "Could not write CSS file for "
- + fileInfo.getOriginalCssPath(), e);
+ logger.log(TreeLogger.ERROR, "Could not write CSS file for "
+ + fileInfo.getOriginalCssPath(), e);
} catch (Exception e) {
logger.log(TreeLogger.ERROR, "SCSS compilation failed for "
+ fileInfo.getOriginalCssPath(), e);
@@ -161,7 +160,7 @@ public class SassLinker extends AbstractLinker {
/**
* Writes the contents of an InputStream out to a file.
- *
+ *
* @param contents
* @param tempfile
* @throws IOException
@@ -185,7 +184,7 @@ public class SassLinker extends AbstractLinker {
/**
* Create folder in temporary space on disk.
- *
+ *
* @param partialPath
* @return
*/
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/AcceptCriteriaFactoryGenerator.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/AcceptCriteriaFactoryGenerator.java
index 2d08329e9a..813f182b75 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/AcceptCriteriaFactoryGenerator.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/AcceptCriteriaFactoryGenerator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -37,7 +37,7 @@ import com.vaadin.shared.ui.dd.AcceptCriterion;
* GWT generator to build {@link VAcceptCriterionFactory} implementation
* dynamically based on {@link AcceptCriterion} annotations available in
* classpath.
- *
+ *
*/
public class AcceptCriteriaFactoryGenerator extends Generator {
@@ -67,7 +67,7 @@ public class AcceptCriteriaFactoryGenerator extends Generator {
/**
* Generate source code for WidgetMapImpl
- *
+ *
* @param logger
* Logger object
* @param context
@@ -89,7 +89,8 @@ public class AcceptCriteriaFactoryGenerator extends Generator {
ClassSourceFileComposerFactory composer = null;
composer = new ClassSourceFileComposerFactory(packageName, className);
composer.addImport("com.google.gwt.core.client.GWT");
- composer.setSuperclass("com.vaadin.client.ui.dd.VAcceptCriterionFactory");
+ composer.setSuperclass(
+ "com.vaadin.client.ui.dd.VAcceptCriterionFactory");
SourceWriter sourceWriter = composer.createSourceWriter(context,
printWriter);
@@ -100,9 +101,8 @@ public class AcceptCriteriaFactoryGenerator extends Generator {
sourceWriter.println("}");
// commit generated class
context.commit(logger, printWriter);
- logger.log(Type.INFO,
- "Done. (" + (new Date().getTime() - date.getTime()) / 1000
- + "seconds)");
+ logger.log(Type.INFO, "Done. ("
+ + (new Date().getTime() - date.getTime()) / 1000 + "seconds)");
}
@@ -114,8 +114,8 @@ public class AcceptCriteriaFactoryGenerator extends Generator {
sourceWriter.println("name = name.intern();");
- JClassType criteriaType = context.getTypeOracle().findType(
- VAcceptCriterion.class.getName());
+ JClassType criteriaType = context.getTypeOracle()
+ .findType(VAcceptCriterion.class.getName());
JClassType[] subtypes = criteriaType.getSubtypes();
Arrays.sort(subtypes, ConnectorBundle.jClassComparator);
for (JClassType clientClass : subtypes) {
@@ -123,10 +123,11 @@ public class AcceptCriteriaFactoryGenerator extends Generator {
.getAnnotation(AcceptCriterion.class);
if (annotation != null) {
String clientClassName = clientClass.getQualifiedSourceName();
- Class> serverClass = clientClass.getAnnotation(
- AcceptCriterion.class).value();
+ Class> serverClass = clientClass
+ .getAnnotation(AcceptCriterion.class).value();
String serverClassName = serverClass.getCanonicalName();
- logger.log(Type.INFO, "creating mapping for " + serverClassName);
+ logger.log(Type.INFO,
+ "creating mapping for " + serverClassName);
sourceWriter.print("if (\"");
sourceWriter.print(serverClassName);
sourceWriter.print("\" == name) return GWT.create(");
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/ConnectorBundleLoaderFactory.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/ConnectorBundleLoaderFactory.java
index 2b8ccc87d0..510401e739 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/ConnectorBundleLoaderFactory.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/ConnectorBundleLoaderFactory.java
@@ -440,9 +440,10 @@ public class ConnectorBundleLoaderFactory extends Generator {
throw new UnableToCompleteException();
}
if (!property.hasAccessorMethods()) {
- logger.log(Type.ERROR, beanType.getQualifiedSourceName()
- + " has the property '" + name
- + "' without getter defined.");
+ logger.log(Type.ERROR,
+ beanType.getQualifiedSourceName()
+ + " has the property '" + name
+ + "' without getter defined.");
throw new UnableToCompleteException();
}
}
@@ -480,8 +481,9 @@ public class ConnectorBundleLoaderFactory extends Generator {
writer.print(
"store.@%s::setPropertyData(Ljava/lang/Class;Ljava/lang/String;Lcom/google/gwt/core/client/JavaScriptObject;)",
TypeDataStore.class.getName());
- writer.println("(@%s::class, '%s', data);", property.getBeanType()
- .getQualifiedSourceName(), property.getName());
+ writer.println("(@%s::class, '%s', data);",
+ property.getBeanType().getQualifiedSourceName(),
+ property.getName());
writer.println();
writer.splitIfNeeded(true,
String.format("%s store", TypeDataStore.class.getName()));
@@ -525,8 +527,7 @@ public class ConnectorBundleLoaderFactory extends Generator {
.entrySet()) {
JClassType connector = entry.getKey();
- TreeLogger typeLogger = logger.branch(
- Type.DEBUG,
+ TreeLogger typeLogger = logger.branch(Type.DEBUG,
"Generating @OnStateChange support for "
+ connector.getName());
@@ -544,9 +545,8 @@ public class ConnectorBundleLoaderFactory extends Generator {
"Processing method " + method.getName());
if (method.isPublic() || method.isProtected()) {
- methodLogger
- .log(Type.ERROR,
- "@OnStateChange is only supported for methods with private or default visibility.");
+ methodLogger.log(Type.ERROR,
+ "@OnStateChange is only supported for methods with private or default visibility.");
throw new UnableToCompleteException();
}
@@ -654,9 +654,8 @@ public class ConnectorBundleLoaderFactory extends Generator {
.entrySet()) {
JClassType beanType = entry.getKey();
for (Property property : entry.getValue()) {
- w.println(
- "store.setDelegateToWidget(%s, \"%s\", \"%s\");",
- getClassLiteralString(beanType),// property.getBeanType()),
+ w.println("store.setDelegateToWidget(%s, \"%s\", \"%s\");",
+ getClassLiteralString(beanType), // property.getBeanType()),
property.getName(),
property.getAnnotation(DelegateToWidget.class).value());
}
@@ -820,10 +819,12 @@ public class ConnectorBundleLoaderFactory extends Generator {
}
}
- private void writeParamTypes(SplittingSourceWriter w, ConnectorBundle bundle) {
+ private void writeParamTypes(SplittingSourceWriter w,
+ ConnectorBundle bundle) {
Map> needsParamTypes = bundle
.getNeedsParamTypes();
- for (Entry> entry : needsParamTypes.entrySet()) {
+ for (Entry> entry : needsParamTypes
+ .entrySet()) {
JClassType type = entry.getKey();
Set methods = entry.getValue();
@@ -864,8 +865,8 @@ public class ConnectorBundleLoaderFactory extends Generator {
w.print("\",");
if (method.isPublic()) {
- typeLogger.log(Type.DEBUG, "Invoking " + method.getName()
- + " using java");
+ typeLogger.log(Type.DEBUG,
+ "Invoking " + method.getName() + " using java");
writeJavaInvoker(w, type, method);
} else {
@@ -893,8 +894,8 @@ public class ConnectorBundleLoaderFactory extends Generator {
w.indent();
JType returnType = method.getReturnType();
- boolean hasReturnType = !"void".equals(returnType
- .getQualifiedSourceName());
+ boolean hasReturnType = !"void"
+ .equals(returnType.getQualifiedSourceName());
// Note that void is also a primitive type
boolean hasPrimitiveReturnType = hasReturnType
@@ -905,9 +906,9 @@ public class ConnectorBundleLoaderFactory extends Generator {
if (hasPrimitiveReturnType) {
// Integer.valueOf(expression);
- w.print("@%s::valueOf(%s)(", returnType.isPrimitive()
- .getQualifiedBoxedSourceName(), returnType
- .getJNISignature());
+ w.print("@%s::valueOf(%s)(",
+ returnType.isPrimitive().getQualifiedBoxedSourceName(),
+ returnType.getJNISignature());
// Implementation tested briefly, but I don't dare leave it
// enabled since we are not using it in the framework and we
@@ -923,8 +924,8 @@ public class ConnectorBundleLoaderFactory extends Generator {
JType[] parameterTypes = method.getParameterTypes();
- w.print("target.@%s::" + method.getName() + "(*)(", method
- .getEnclosingType().getQualifiedSourceName());
+ w.print("target.@%s::" + method.getName() + "(*)(",
+ method.getEnclosingType().getQualifiedSourceName());
for (int i = 0; i < parameterTypes.length; i++) {
if (i != 0) {
w.print(", ");
@@ -968,8 +969,8 @@ public class ConnectorBundleLoaderFactory extends Generator {
w.indent();
JType returnType = method.getReturnType();
- boolean hasReturnType = !"void".equals(returnType
- .getQualifiedSourceName());
+ boolean hasReturnType = !"void"
+ .equals(returnType.getQualifiedSourceName());
if (hasReturnType) {
w.print("return ");
}
@@ -989,8 +990,8 @@ public class ConnectorBundleLoaderFactory extends Generator {
// Need to pass through native method to allow casting Object to
// JSO if the value is a string
w.print("%s.<%s>obj2jso(params[%d])",
- JsonDecoder.class.getCanonicalName(),
- parameterTypeName, i);
+ JsonDecoder.class.getCanonicalName(), parameterTypeName,
+ i);
} else {
w.print("(" + parameterTypeName + ") params[" + i + "]");
}
@@ -1088,8 +1089,8 @@ public class ConnectorBundleLoaderFactory extends Generator {
}
private List buildBundles(TreeLogger logger,
- TypeOracle typeOracle) throws NotFoundException,
- UnableToCompleteException {
+ TypeOracle typeOracle)
+ throws NotFoundException, UnableToCompleteException {
Map> connectorsByLoadStyle = new HashMap>();
for (LoadStyle loadStyle : LoadStyle.values()) {
@@ -1097,8 +1098,8 @@ public class ConnectorBundleLoaderFactory extends Generator {
}
// Find all types with a valid mapping
- Collection selectedTypes = getConnectorsForWidgetset(
- logger, typeOracle);
+ Collection selectedTypes = getConnectorsForWidgetset(logger,
+ typeOracle);
// Group by load style
for (JClassType connectorSubtype : selectedTypes) {
@@ -1142,8 +1143,8 @@ public class ConnectorBundleLoaderFactory extends Generator {
for (JClassType type : lazy) {
ConnectorBundle bundle = new ConnectorBundle(type.getName(),
eagerBundle);
- TreeLogger subLogger = logger.branch(Type.TRACE, "Populating "
- + type.getName() + " bundle");
+ TreeLogger subLogger = logger.branch(Type.TRACE,
+ "Populating " + type.getName() + " bundle");
bundle.processType(subLogger, type);
bundles.add(bundle);
@@ -1176,8 +1177,8 @@ public class ConnectorBundleLoaderFactory extends Generator {
throws UnableToCompleteException {
JClassType serverConnectorType;
try {
- serverConnectorType = typeOracle.getType(ServerConnector.class
- .getName());
+ serverConnectorType = typeOracle
+ .getType(ServerConnector.class.getName());
} catch (NotFoundException e) {
logger.log(Type.ERROR,
"Can't find " + ServerConnector.class.getName());
@@ -1213,13 +1214,10 @@ public class ConnectorBundleLoaderFactory extends Generator {
superclass = type;
} else {
// Neither inherits from the other - this is a conflict
- logger.log(
- Type.ERROR,
+ logger.log(Type.ERROR,
"Conflicting @Connect mappings detected for "
- + identifier
- + ": "
- + type.getQualifiedSourceName()
- + " and "
+ + identifier + ": "
+ + type.getQualifiedSourceName() + " and "
+ previousMapping.getQualifiedSourceName()
+ ". There can only be multiple @Connect mappings for the same server-side type if one is the subclass of the other.");
throw new UnableToCompleteException();
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ArraySerializer.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ArraySerializer.java
index 0049ae9b50..b2a30a02c4 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ArraySerializer.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ArraySerializer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ClientRpcVisitor.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ClientRpcVisitor.java
index 992a012005..688d1fb0cc 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ClientRpcVisitor.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ClientRpcVisitor.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -68,16 +68,11 @@ public class ClientRpcVisitor extends TypeVisitor {
public static void checkReturnType(TreeLogger logger, JMethod method)
throws UnableToCompleteException {
if (!method.getReturnType().getQualifiedSourceName().equals("void")) {
- logger.log(
- Type.ERROR,
- "The method "
- + method.getEnclosingType()
- .getQualifiedSourceName()
- + "."
- + method.getName()
- + " returns "
- + method.getReturnType().getQualifiedSourceName()
- + " but only void is supported for methods in RPC interfaces.");
+ logger.log(Type.ERROR, "The method "
+ + method.getEnclosingType().getQualifiedSourceName() + "."
+ + method.getName() + " returns "
+ + method.getReturnType().getQualifiedSourceName()
+ + " but only void is supported for methods in RPC interfaces.");
throw new UnableToCompleteException();
}
}
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ConnectorBundle.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ConnectorBundle.java
index b4531eb08e..d390ee0338 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ConnectorBundle.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ConnectorBundle.java
@@ -60,16 +60,16 @@ public class ConnectorBundle {
public static final Comparator jClassComparator = new Comparator() {
@Override
public int compare(JClassType o1, JClassType o2) {
- return o1.getQualifiedSourceName().compareTo(
- o2.getQualifiedSourceName());
+ return o1.getQualifiedSourceName()
+ .compareTo(o2.getQualifiedSourceName());
}
};
public static final Comparator jMethodComparator = new Comparator() {
@Override
public int compare(JMethod o1, JMethod o2) {
- return o1.getReadableDeclaration().compareTo(
- o2.getReadableDeclaration());
+ return o1.getReadableDeclaration()
+ .compareTo(o2.getReadableDeclaration());
}
};
@@ -140,10 +140,11 @@ public class ConnectorBundle {
TypeOracle oracle) throws NotFoundException {
Map serializers = new HashMap();
- JClassType serializerInterface = oracle.findType(JSONSerializer.class
- .getName());
+ JClassType serializerInterface = oracle
+ .findType(JSONSerializer.class.getName());
JType[] deserializeParamTypes = new JType[] {
- oracle.findType(com.vaadin.client.metadata.Type.class.getName()),
+ oracle.findType(
+ com.vaadin.client.metadata.Type.class.getName()),
oracle.findType(JsonValue.class.getName()),
oracle.findType(ApplicationConnection.class.getName()) };
String deserializeMethodName = "deserialize";
@@ -152,8 +153,8 @@ public class ConnectorBundle {
deserializeParamTypes);
for (JClassType serializer : serializerInterface.getSubtypes()) {
- JMethod deserializeMethod = serializer.findMethod(
- deserializeMethodName, deserializeParamTypes);
+ JMethod deserializeMethod = serializer
+ .findMethod(deserializeMethodName, deserializeParamTypes);
if (deserializeMethod == null) {
continue;
}
@@ -309,21 +310,18 @@ public class ConnectorBundle {
private void checkSerializable(TreeLogger logger, JClassType type)
throws UnableToCompleteException {
- JClassType javaSerializable = type.getOracle().findType(
- Serializable.class.getName());
+ JClassType javaSerializable = type.getOracle()
+ .findType(Serializable.class.getName());
boolean serializable = type.isAssignableTo(javaSerializable);
if (!serializable) {
- boolean abortCompile = "true".equals(System
- .getProperty(FAIL_IF_NOT_SERIALIZABLE));
- logger.log(
- abortCompile ? Type.ERROR : Type.WARN,
- type
- + " is used in RPC or shared state but does not implement "
- + Serializable.class.getName()
- + ". Communication will work but the Application on server side cannot be serialized if it refers to objects of this type. "
- + "If the system property "
- + FAIL_IF_NOT_SERIALIZABLE
- + " is set to \"true\", this causes the compilation to fail instead of just emitting a warning.");
+ boolean abortCompile = "true"
+ .equals(System.getProperty(FAIL_IF_NOT_SERIALIZABLE));
+ logger.log(abortCompile ? Type.ERROR : Type.WARN, type
+ + " is used in RPC or shared state but does not implement "
+ + Serializable.class.getName()
+ + ". Communication will work but the Application on server side cannot be serialized if it refers to objects of this type. "
+ + "If the system property " + FAIL_IF_NOT_SERIALIZABLE
+ + " is set to \"true\", this causes the compilation to fail instead of just emitting a warning.");
if (abortCompile) {
throw new UnableToCompleteException();
}
@@ -509,7 +507,8 @@ public class ConnectorBundle {
set.add(value);
}
- private void addMapping(Map> map, K key, JMethod value) {
+ private void addMapping(Map> map, K key,
+ JMethod value) {
Set set = map.get(key);
if (set == null) {
set = new TreeSet(jMethodComparator);
@@ -609,9 +608,8 @@ public class ConnectorBundle {
if (typeData != null && hasMapping(typeData, method, methodAttribute)) {
return true;
} else {
- return previousBundle != null
- && previousBundle.hasMethodAttribute(type, method,
- methodAttribute);
+ return previousBundle != null && previousBundle
+ .hasMethodAttribute(type, method, methodAttribute);
}
}
@@ -699,7 +697,8 @@ public class ConnectorBundle {
}
}
- private boolean isNeedsOnStateChangeHandler(JClassType type, JMethod method) {
+ private boolean isNeedsOnStateChangeHandler(JClassType type,
+ JMethod method) {
if (hasMapping(needsOnStateChange, type, method)) {
return true;
} else {
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ConnectorInitVisitor.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ConnectorInitVisitor.java
index ea3b097fa2..33766cfd72 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ConnectorInitVisitor.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ConnectorInitVisitor.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/CustomSerializer.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/CustomSerializer.java
index bb3dd4f61d..a93e5bd4a1 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/CustomSerializer.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/CustomSerializer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/EnumSerializer.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/EnumSerializer.java
index 9876baf946..f6581f20bc 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/EnumSerializer.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/EnumSerializer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/FieldProperty.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/FieldProperty.java
index a31dafe05c..0d5d831495 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/FieldProperty.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/FieldProperty.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -45,15 +45,16 @@ public class FieldProperty extends Property {
@Override
public void writeSetterBody(TreeLogger logger, SourceWriter w,
String beanVariable, String valueVariable) {
- w.println("%s.@%s::%s = %s;", beanVariable, getBeanType()
- .getQualifiedSourceName(), getName(), unboxValue(valueVariable));
+ w.println("%s.@%s::%s = %s;", beanVariable,
+ getBeanType().getQualifiedSourceName(), getName(),
+ unboxValue(valueVariable));
}
@Override
public void writeGetterBody(TreeLogger logger, SourceWriter w,
String beanVariable) {
- String value = String.format("%s.@%s::%s", beanVariable, getBeanType()
- .getQualifiedSourceName(), getName());
+ String value = String.format("%s.@%s::%s", beanVariable,
+ getBeanType().getQualifiedSourceName(), getName());
w.print("return ");
w.print(boxValue(value));
w.println(";");
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/GeneratedSerializer.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/GeneratedSerializer.java
index 6afb172ea2..623b320793 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/GeneratedSerializer.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/GeneratedSerializer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/JsonSerializer.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/JsonSerializer.java
index a7a6c568da..bdd5074ce1 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/JsonSerializer.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/JsonSerializer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -56,8 +56,8 @@ public abstract class JsonSerializer implements GeneratedSerializer {
+ ApplicationConnection.class.getName() + " connection) {");
w.indent();
// MouseEventDetails castedValue = (MouseEventDetails) value;
- w.println(qualifiedSourceName + " castedValue = ("
- + qualifiedSourceName + ") value;");
+ w.println(qualifiedSourceName + " castedValue = (" + qualifiedSourceName
+ + ") value;");
printSerializerBody(logger, w, "castedValue", "connection");
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/MethodProperty.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/MethodProperty.java
index 32aad92774..4773fd908e 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/MethodProperty.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/MethodProperty.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -36,8 +36,8 @@ public class MethodProperty extends Property {
private final String getter;
private MethodProperty(JClassType beanType, JMethod setter, String getter) {
- super(getTransportFieldName(setter), beanType, setter
- .getParameterTypes()[0]);
+ super(getTransportFieldName(setter), beanType,
+ setter.getParameterTypes()[0]);
this.setter = setter;
this.getter = getter;
}
@@ -54,8 +54,8 @@ public class MethodProperty extends Property {
List setters = getSetters(type, getters);
for (JMethod setter : setters) {
String getter = findGetter(type, setter);
- properties.add(new MethodProperty(setter.getEnclosingType(),
- setter, getters.contains(getter) ? getter : null));
+ properties.add(new MethodProperty(setter.getEnclosingType(), setter,
+ getters.contains(getter) ? getter : null));
}
return properties;
@@ -63,7 +63,7 @@ public class MethodProperty extends Property {
/**
* Returns a list of all setters found in the beanType or its parent class
- *
+ *
* @param beanType
* The type to check
* @param getters
@@ -74,9 +74,8 @@ public class MethodProperty extends Property {
Set getters) {
List setterMethods = new ArrayList();
- while (beanType != null
- && !beanType.getQualifiedSourceName().equals(
- Object.class.getName())) {
+ while (beanType != null && !beanType.getQualifiedSourceName()
+ .equals(Object.class.getName())) {
for (JMethod method : beanType.getMethods()) {
// Process all setters that have corresponding fields
if (!method.isPublic() || method.isStatic()) {
@@ -112,18 +111,19 @@ public class MethodProperty extends Property {
@Override
public void writeSetterBody(TreeLogger logger, SourceWriter w,
String beanVariable, String valueVariable) {
- w.println("%s.@%s::%s(%s)(%s);", beanVariable, getBeanType()
- .getQualifiedSourceName(), setter.getName(), setter
- .getParameterTypes()[0].getJNISignature(),
+ w.println("%s.@%s::%s(%s)(%s);", beanVariable,
+ getBeanType().getQualifiedSourceName(), setter.getName(),
+ setter.getParameterTypes()[0].getJNISignature(),
unboxValue(valueVariable));
}
- private static String findGetter(JClassType beanType, JMethod setterMethod) {
+ private static String findGetter(JClassType beanType,
+ JMethod setterMethod) {
JType setterParameterType = setterMethod.getParameterTypes()[0];
String fieldName = setterMethod.getName().substring(3);
- if (setterParameterType.getQualifiedSourceName().equals(
- boolean.class.getName())) {
+ if (setterParameterType.getQualifiedSourceName()
+ .equals(boolean.class.getName())) {
return "is" + fieldName;
} else {
return "get" + fieldName;
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/OnStateChangeVisitor.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/OnStateChangeVisitor.java
index 1c0da9d9e8..e86dbe4858 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/OnStateChangeVisitor.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/OnStateChangeVisitor.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -25,7 +25,7 @@ import com.vaadin.shared.ui.Connect;
/**
* Visits Connector classes and check for methods with @OnStateChange
* annotations.
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/Property.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/Property.java
index 0c849bead5..552543a880 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/Property.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/Property.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -103,20 +103,20 @@ public abstract class Property implements Comparable {
@Override
public int hashCode() {
- return getClass().hashCode() * 31 ^ 2 + getBeanType().hashCode() * 31
- + getName().hashCode();
+ return getClass().hashCode() * 31
+ ^ 2 + getBeanType().hashCode() * 31 + getName().hashCode();
}
@Override
public int compareTo(Property o) {
int comp = getName().compareTo(o.getName());
if (comp == 0) {
- comp = getBeanType().getQualifiedSourceName().compareTo(
- o.getBeanType().getQualifiedSourceName());
+ comp = getBeanType().getQualifiedSourceName()
+ .compareTo(o.getBeanType().getQualifiedSourceName());
}
if (comp == 0) {
- comp = getClass().getCanonicalName().compareTo(
- o.getClass().getCanonicalName());
+ comp = getClass().getCanonicalName()
+ .compareTo(o.getClass().getCanonicalName());
}
return comp;
}
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/RendererVisitor.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/RendererVisitor.java
index 8b645aa492..6131674ee3 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/RendererVisitor.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/RendererVisitor.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -37,9 +37,9 @@ import elemental.json.JsonValue;
* {@link AbstractRendererConnector#decode(elemental.json.JsonValue) decode}
* method to work without having to implement a "getPresentationType" method.
*
- *
+ *
* @see WidgetInitVisitor
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -57,17 +57,17 @@ public class RendererVisitor extends TypeVisitor {
private static void doRendererType(TreeLogger logger, JClassType type,
ConnectorBundle bundle) throws UnableToCompleteException {
// The class in which createRenderer is implemented
- JClassType createRendererClass = ConnectorBundle.findInheritedMethod(
- type, "createRenderer").getEnclosingType();
+ JClassType createRendererClass = ConnectorBundle
+ .findInheritedMethod(type, "createRenderer").getEnclosingType();
// Needs GWT constructor if createRenderer is not overridden
- if (createRendererClass.getQualifiedSourceName().equals(
- AbstractRendererConnector.class.getCanonicalName())) {
+ if (createRendererClass.getQualifiedSourceName()
+ .equals(AbstractRendererConnector.class.getCanonicalName())) {
JMethod getRenderer = ConnectorBundle.findInheritedMethod(type,
"getRenderer");
- if (getRenderer.getEnclosingType().getQualifiedSourceName()
- .equals(AbstractRendererConnector.class.getCanonicalName())) {
+ if (getRenderer.getEnclosingType().getQualifiedSourceName().equals(
+ AbstractRendererConnector.class.getCanonicalName())) {
logger.log(Type.ERROR, type.getQualifiedSourceName()
+ " must override either createRenderer or getRenderer");
throw new UnableToCompleteException();
@@ -79,8 +79,8 @@ public class RendererVisitor extends TypeVisitor {
// Also needs renderer type to find the right GWT constructor
bundle.setNeedsReturnType(type, getRenderer);
- logger.log(Type.DEBUG, "Renderer type of " + type + " is "
- + rendererType);
+ logger.log(Type.DEBUG,
+ "Renderer type of " + type + " is " + rendererType);
}
}
@@ -93,8 +93,8 @@ public class RendererVisitor extends TypeVisitor {
bundle.setNeedsSerialize(presentationType);
}
- logger.log(Type.DEBUG, "Presentation type of " + type + " is "
- + presentationType);
+ logger.log(Type.DEBUG,
+ "Presentation type of " + type + " is " + presentationType);
}
private static boolean hasCustomDecodeMethod(JClassType type,
@@ -110,8 +110,8 @@ public class RendererVisitor extends TypeVisitor {
return !decodeMethod.getEnclosingType().getQualifiedSourceName()
.equals(AbstractRendererConnector.class.getName());
} catch (NotFoundException e) {
- logger.log(Type.ERROR, "Can't find decode method for renderer "
- + type, e);
+ logger.log(Type.ERROR,
+ "Can't find decode method for renderer " + type, e);
throw new UnableToCompleteException();
}
}
@@ -120,16 +120,13 @@ public class RendererVisitor extends TypeVisitor {
throws UnableToCompleteException {
JClassType originalType = type;
while (type != null) {
- if (type.getQualifiedBinaryName().equals(
- AbstractRendererConnector.class.getName())) {
+ if (type.getQualifiedBinaryName()
+ .equals(AbstractRendererConnector.class.getName())) {
JParameterizedType parameterized = type.isParameterized();
if (parameterized == null) {
- logger.log(
- Type.ERROR,
- type.getQualifiedSourceName()
- + " must define the generic parameter of the inherited "
- + AbstractRendererConnector.class
- .getSimpleName());
+ logger.log(Type.ERROR, type.getQualifiedSourceName()
+ + " must define the generic parameter of the inherited "
+ + AbstractRendererConnector.class.getSimpleName());
throw new UnableToCompleteException();
}
return parameterized.getTypeArgs()[0];
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ServerRpcVisitor.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ServerRpcVisitor.java
index 86ece28041..58bb8dd902 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ServerRpcVisitor.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ServerRpcVisitor.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -52,7 +52,8 @@ public class ServerRpcVisitor extends TypeVisitor {
}
}
- if (method.getAnnotation(NoLoadingIndicator.class) != null) {
+ if (method
+ .getAnnotation(NoLoadingIndicator.class) != null) {
bundle.setMethodAttribute(type, method,
MethodAttribute.NO_LOADING_INDICATOR);
}
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/StateInitVisitor.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/StateInitVisitor.java
index 046c5c4611..f726dcdf55 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/StateInitVisitor.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/StateInitVisitor.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -24,8 +24,8 @@ public class StateInitVisitor extends TypeVisitor {
@Override
public void visitConnector(TreeLogger logger, JClassType type,
ConnectorBundle bundle) {
- JMethod getState = ConnectorBundle
- .findInheritedMethod(type, "getState");
+ JMethod getState = ConnectorBundle.findInheritedMethod(type,
+ "getState");
bundle.setNeedsReturnType(type, getState);
bundle.setNeedsSerialize(getState.getReturnType());
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/TypeVisitor.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/TypeVisitor.java
index 028e4cc44d..441da12e38 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/TypeVisitor.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/TypeVisitor.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/WidgetInitVisitor.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/WidgetInitVisitor.java
index 9a9cac18ba..378ecca361 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/WidgetInitVisitor.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/WidgetInitVisitor.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -32,8 +32,9 @@ public class WidgetInitVisitor extends TypeVisitor {
ConnectorBundle bundle) throws UnableToCompleteException {
if (ConnectorBundle.isConnectedComponentConnector(type)) {
// The class in which createWidget is implemented
- JClassType createWidgetClass = ConnectorBundle.findInheritedMethod(
- type, "createWidget").getEnclosingType();
+ JClassType createWidgetClass = ConnectorBundle
+ .findInheritedMethod(type, "createWidget")
+ .getEnclosingType();
JMethod getWidget = ConnectorBundle.findInheritedMethod(type,
"getWidget");
@@ -42,9 +43,7 @@ public class WidgetInitVisitor extends TypeVisitor {
// Needs GWT constructor if createWidget is not overridden
if (createWidgetClass.getQualifiedSourceName().equals(
AbstractComponentConnector.class.getCanonicalName())) {
- if (getWidget
- .getEnclosingType()
- .getQualifiedSourceName()
+ if (getWidget.getEnclosingType().getQualifiedSourceName()
.equals(AbstractComponentConnector.class
.getCanonicalName())) {
logger.log(Type.ERROR, type.getQualifiedSourceName()
@@ -79,12 +78,8 @@ public class WidgetInitVisitor extends TypeVisitor {
.findInheritedMethod(widgetType, methodName,
property.getPropertyType());
if (delegatedSetter == null) {
- logger.log(
- Type.ERROR,
- widgetType.getName()
- + "."
- + methodName
- + "("
+ logger.log(Type.ERROR,
+ widgetType.getName() + "." + methodName + "("
+ property.getPropertyType()
.getSimpleSourceName()
+ ") required by @DelegateToWidget for "
diff --git a/client-compiler/src/main/java/com/vaadin/tools/CvalAddonsChecker.java b/client-compiler/src/main/java/com/vaadin/tools/CvalAddonsChecker.java
index aab7231258..6dab674870 100644
--- a/client-compiler/src/main/java/com/vaadin/tools/CvalAddonsChecker.java
+++ b/client-compiler/src/main/java/com/vaadin/tools/CvalAddonsChecker.java
@@ -79,7 +79,7 @@ public final class CvalAddonsChecker {
/**
* Visit all MANIFEST.MF files in the classpath validating licenses.
- *
+ *
* Return a list of Cval licensed products in order to have enough info to
* generate nag messages in the UI.
*/
@@ -108,14 +108,14 @@ public final class CvalAddonsChecker {
Attributes attribs = manifest.getMainAttributes();
String license = attribs.getValue(VAADIN_ADDON_LICENSE);
String name = attribs.getValue(VAADIN_ADDON_NAME);
- String vers = attribs.getValue(VAADIN_ADDON_VERSION) == null ? ""
- : attribs.getValue(VAADIN_ADDON_VERSION);
- String title = attribs.getValue(VAADIN_ADDON_TITLE) == null ? name
- : attribs.getValue(VAADIN_ADDON_TITLE);
+ String vers = attribs.getValue(VAADIN_ADDON_VERSION) == null
+ ? "" : attribs.getValue(VAADIN_ADDON_VERSION);
+ String title = attribs.getValue(VAADIN_ADDON_TITLE) == null
+ ? name : attribs.getValue(VAADIN_ADDON_TITLE);
String widgetsets = attribs
.getValue(VAADIN_ADDON_WIDGETSET) == null ? name
- : attribs.getValue(VAADIN_ADDON_WIDGETSET);
+ : attribs.getValue(VAADIN_ADDON_WIDGETSET);
if (name == null || license == null) {
continue;
@@ -131,14 +131,14 @@ public final class CvalAddonsChecker {
title);
printValidLicense(info, title, vers);
} catch (UnreachableCvalServerException e) {
- info = CvalChecker.parseJson("{'product':{'name':'"
- + name + "'}}");
+ info = CvalChecker.parseJson(
+ "{'product':{'name':'" + name + "'}}");
printServerUnreachable(title, vers);
}
for (String w : widgetsets.split("[, ]+")) {
- ret.add(new CValUiInfo(title, String
- .valueOf(computeMajorVersion(vers)), w,
- info.getType()));
+ ret.add(new CValUiInfo(title,
+ String.valueOf(computeMajorVersion(vers)),
+ w, info.getType()));
}
}
} catch (IOException ignored) {
@@ -151,7 +151,7 @@ public final class CvalAddonsChecker {
/**
* Set the filter regexp of .jar names which we have to consider.
- *
+ *
* default is '.*touchkit.*'
*/
public CvalAddonsChecker setFilter(String regexp) {
@@ -174,13 +174,12 @@ public final class CvalAddonsChecker {
}
private void printServerUnreachable(String name, String version) {
- System.out.println(LINE
- + "\n"
- + getErrorMessage("unreachable", name,
- computeMajorVersion(version)) + "\n" + LINE);
+ System.out.println(LINE + "\n" + getErrorMessage("unreachable", name,
+ computeMajorVersion(version)) + "\n" + LINE);
}
- private void printValidLicense(CvalInfo info, String title, String version) {
+ private void printValidLicense(CvalInfo info, String title,
+ String version) {
String msg = info.getMessage();
if (msg == null) {
String key = "evaluation".equals(info.getType()) ? "evaluation"
diff --git a/client-compiler/src/main/java/com/vaadin/tools/CvalChecker.java b/client-compiler/src/main/java/com/vaadin/tools/CvalChecker.java
index 9217781695..d8c04d9d23 100644
--- a/client-compiler/src/main/java/com/vaadin/tools/CvalChecker.java
+++ b/client-compiler/src/main/java/com/vaadin/tools/CvalChecker.java
@@ -52,10 +52,10 @@ public final class CvalChecker {
/*
* Class used for binding the JSON gotten from server.
- *
+ *
* It is not in a separate f le, so as it is easier to copy into any product
* which does not depend on vaadin core.
- *
+ *
* We are using elemental.json in order not to use additional dependency
* like auto-beans, gson, etc.
*/
@@ -153,8 +153,8 @@ public final class CvalChecker {
public boolean isLicenseExpired() {
return (getExpired() != null && getExpired())
- || (getExpiredEpoch() != null && getExpiredEpoch().before(
- new Date()));
+ || (getExpiredEpoch() != null
+ && getExpiredEpoch().before(new Date()));
}
public boolean isValidVersion(int majorVersion) {
@@ -248,8 +248,8 @@ public final class CvalChecker {
} else if (info != null && info.getMessage() != null) {
msg = info.getMessage().replace("\\n", "\n");
} else if (info != null && info.isLicenseExpired()) {
- String type = "evaluation".equals(info.getType()) ? "Evaluation license"
- : "License";
+ String type = "evaluation".equals(info.getType())
+ ? "Evaluation license" : "License";
msg = getErrorMessage("expired", title, majorVers, type);
} else if (key == null) {
msg = getErrorMessage("none", title, majorVers);
@@ -359,8 +359,8 @@ public final class CvalChecker {
* when we have license key but server is unreachable
*/
public CvalInfo validateProduct(String productName, String productVersion,
- String productTitle) throws InvalidCvalException,
- UnreachableCvalServerException {
+ String productTitle)
+ throws InvalidCvalException, UnreachableCvalServerException {
String key = getDeveloperLicenseKey(productName, productVersion,
productTitle);
@@ -416,8 +416,8 @@ public final class CvalChecker {
int timeout = validCache ? 2000 : 10000;
try {
- CvalInfo srvinfo = parseJson(provider.askServer(productName + "-"
- + productVersion, productKey, timeout));
+ CvalInfo srvinfo = parseJson(provider.askServer(
+ productName + "-" + productVersion, productKey, timeout));
if (srvinfo != null && srvinfo.isValidInfo(productName, productKey)
&& srvinfo.isValidVersion(majorVersion)) {
// We always cache the info if it is valid although it is
@@ -502,8 +502,8 @@ public final class CvalChecker {
static String getErrorMessage(String key, Object... pars) {
Locale loc = Locale.getDefault();
- ResourceBundle res = ResourceBundle.getBundle(
- CvalChecker.class.getName(), loc);
+ ResourceBundle res = ResourceBundle
+ .getBundle(CvalChecker.class.getName(), loc);
String msg = res.getString(key);
return new MessageFormat(msg, loc).format(pars);
}
diff --git a/client-compiler/src/main/java/com/vaadin/tools/WidgetsetCompiler.java b/client-compiler/src/main/java/com/vaadin/tools/WidgetsetCompiler.java
index 7c06e9d7af..f66e00d383 100755
--- a/client-compiler/src/main/java/com/vaadin/tools/WidgetsetCompiler.java
+++ b/client-compiler/src/main/java/com/vaadin/tools/WidgetsetCompiler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -23,24 +23,24 @@ import com.vaadin.server.widgetsetutils.WidgetSetBuilder;
/**
* A wrapper for the GWT compiler that runs the compiler in a new thread after
* updating the widgetset file.
- *
+ *
* This class originally existed to allow circumventing a J2SE 5.0 bug (6316197)
* that prevents setting the stack size for the main thread.
- *
+ *
* This class takes the same command line arguments as the
* com.google.gwt.dev.Compiler class.
- *
+ *
* A typical invocation would use e.g. the following arguments
- *
+ *
* "-war WebContent/VAADIN/widgetsets com.vaadin.DefaultWidgetSet"
- *
+ *
* In addition, larger memory usage settings for the VM should be used, e.g.
- *
+ *
* "-Xms256M -Xmx512M -Xss8M"
- *
+ *
* The source directory containing widgetset and related classes must be
* included in the classpath, as well as other relevant JARs.
- *
+ *
* @deprecated with Java 6, can use com.google.gwt.dev.Compiler directly (also
* in Eclipse plug-in etc.)
*/
@@ -71,8 +71,8 @@ public class WidgetsetCompiler {
// TODO expecting this is launched via eclipse WTP
// project
- System.out
- .println("Updating GWT module description file...");
+ System.out.println(
+ "Updating GWT module description file...");
WidgetSetBuilder.updateWidgetSet(wsname);
System.out.println("Done.");
diff --git a/client-compiler/src/test/java/com/vaadin/tools/CvalAddonsCheckerTest.java b/client-compiler/src/test/java/com/vaadin/tools/CvalAddonsCheckerTest.java
index c6200bc7e0..c706f0b9e0 100644
--- a/client-compiler/src/test/java/com/vaadin/tools/CvalAddonsCheckerTest.java
+++ b/client-compiler/src/test/java/com/vaadin/tools/CvalAddonsCheckerTest.java
@@ -54,8 +54,8 @@ public class CvalAddonsCheckerTest {
@Before
public void setup() {
- addonChecker = new CvalAddonsChecker().setLicenseProvider(
- validLicenseProvider).setFilter(".*test.*");
+ addonChecker = new CvalAddonsChecker()
+ .setLicenseProvider(validLicenseProvider).setFilter(".*test.*");
licenseName = computeLicenseName(productNameCval);
deleteCache(productNameCval);
diff --git a/client-compiler/src/test/java/com/vaadin/tools/CvalAddonstCheckerUseCasesTest.java b/client-compiler/src/test/java/com/vaadin/tools/CvalAddonstCheckerUseCasesTest.java
index 01cfe2087e..82962663f2 100644
--- a/client-compiler/src/test/java/com/vaadin/tools/CvalAddonstCheckerUseCasesTest.java
+++ b/client-compiler/src/test/java/com/vaadin/tools/CvalAddonstCheckerUseCasesTest.java
@@ -76,7 +76,7 @@ public class CvalAddonstCheckerUseCasesTest {
enum Message {
AGPL("AGPL"), VALID(">.* valid"), INVALID("not valid"), NO_LICENSE(
"not found"), NO_VALIDATED("has not been validated"), EXPIRED(
- "has expired"), EVALUATION("evaluation");
+ "has expired"), EVALUATION("evaluation");
String msg;
@@ -93,7 +93,7 @@ public class CvalAddonstCheckerUseCasesTest {
}
/* TODO: Use more descriptive test names */
-
+
@Test
public void testUseCase1() throws Exception {
useCase(1, License.NONE, Version.AGPL, Validated.NO, Network.OFF,
@@ -219,8 +219,8 @@ public class CvalAddonstCheckerUseCasesTest {
if (val == Validated.NO) {
deleteCache(productNameCval);
} else {
- String type = lic == License.EVAL || lic == License.EVAL_EXPIRED ? "evaluation"
- : null;
+ String type = lic == License.EVAL || lic == License.EVAL_EXPIRED
+ ? "evaluation" : null;
Boolean expired = lic == License.EVAL_EXPIRED
|| lic == License.REAL_EXPIRED ? true : null;
String key = val == Validated.OLD_KEY ? "oldkey" : null;
@@ -253,17 +253,16 @@ public class CvalAddonstCheckerUseCasesTest {
restoreSystemOut();
message = e.getMessage();
if (res == Compile.YES) {
- Assert.fail(testNumber + "Unexpected Exception: "
- + e.getMessage());
+ Assert.fail(
+ testNumber + "Unexpected Exception: " + e.getMessage());
}
}
// System.err.println("\n> " + testNumber + " " + lic + " " + ver + " "
// + val + " " + net + " " + res + " " + cached + "\n" + message);
- Assert.assertTrue(testNumber + "Fail:\n" + message
- + "\nDoes not match:" + msg.msg,
- message.matches("(?s).*" + msg.msg + ".*"));
+ Assert.assertTrue(testNumber + "Fail:\n" + message + "\nDoes not match:"
+ + msg.msg, message.matches("(?s).*" + msg.msg + ".*"));
String c = cachedPreferences(productNameCval);
Assert.assertTrue(testNumber + "Fail: cacheExists != "
diff --git a/client-compiler/src/test/java/com/vaadin/tools/CvalCheckerTest.java b/client-compiler/src/test/java/com/vaadin/tools/CvalCheckerTest.java
index 6e1a8e57ed..8333449a78 100644
--- a/client-compiler/src/test/java/com/vaadin/tools/CvalCheckerTest.java
+++ b/client-compiler/src/test/java/com/vaadin/tools/CvalCheckerTest.java
@@ -96,9 +96,8 @@ public class CvalCheckerTest {
static final CvalServer expiredLicenseProviderWithMessage = new CvalServer() {
@Override
String askServer(String productName, String productKey, int timeout) {
- return responseJson
- .replace("'expired",
- "'message':'Custom\\\\nServer\\\\nMessage','expired':true,'expired");
+ return responseJson.replace("'expired",
+ "'message':'Custom\\\\nServer\\\\nMessage','expired':true,'expired");
}
};
// A provider returning an expired license with a server message
@@ -205,15 +204,15 @@ public class CvalCheckerTest {
// Success if license key and version are valid
System.setProperty(licenseName, VALID_KEY);
- licenseChecker
- .validateProduct(productNameCval, "2.1", productTitleCval);
+ licenseChecker.validateProduct(productNameCval, "2.1",
+ productTitleCval);
Assert.assertTrue(cacheExists(productNameCval));
// Success if license and cache file are valid, although the license
// server is offline
licenseChecker.setLicenseProvider(unreachableLicenseProvider);
- licenseChecker
- .validateProduct(productNameCval, "2.1", productTitleCval);
+ licenseChecker.validateProduct(productNameCval, "2.1",
+ productTitleCval);
Assert.assertTrue(cacheExists(productNameCval));
// Fail if license key changes although cache file were validated
@@ -262,8 +261,8 @@ public class CvalCheckerTest {
// Check an unlimited license
deleteCache(productNameCval);
licenseChecker.setLicenseProvider(unlimitedLicenseProvider);
- licenseChecker
- .validateProduct(productNameCval, "2.1", productTitleCval);
+ licenseChecker.validateProduct(productNameCval, "2.1",
+ productTitleCval);
Assert.assertTrue(cacheExists(productNameCval));
// Fail if expired flag does not come, but expired epoch is in the past
@@ -281,8 +280,8 @@ public class CvalCheckerTest {
deleteCache(productNameCval);
licenseChecker.setLicenseProvider(nullVersionLicenseProvider);
- licenseChecker
- .validateProduct(productNameCval, "2.1", productTitleCval);
+ licenseChecker.validateProduct(productNameCval, "2.1",
+ productTitleCval);
Assert.assertTrue(cacheExists(productNameCval));
}
@@ -290,8 +289,8 @@ public class CvalCheckerTest {
* Creates a new .jar file with a MANIFEST.MF with all vaadin license info
* attributes set, and add the .jar to the classpath
*/
- static void addLicensedJarToClasspath(String productName, String licenseType)
- throws Exception {
+ static void addLicensedJarToClasspath(String productName,
+ String licenseType) throws Exception {
// Create a manifest with Vaadin CVAL license
Manifest testManifest = new Manifest();
testManifest.getMainAttributes().putValue("Manifest-Version", "1.0");
@@ -306,8 +305,8 @@ public class CvalCheckerTest {
// Create a temporary Jar
File testJarFile = File.createTempFile("vaadin." + productName, ".jar");
testJarFile.deleteOnExit();
- JarOutputStream target = new JarOutputStream(new FileOutputStream(
- testJarFile), testManifest);
+ JarOutputStream target = new JarOutputStream(
+ new FileOutputStream(testJarFile), testManifest);
target.close();
// Add the new jar to our classpath (use reflection)
@@ -362,7 +361,8 @@ public class CvalCheckerTest {
}
static void restoreSystemOut() {
- System.setOut(new PrintStream(new FileOutputStream(FileDescriptor.out)));
+ System.setOut(
+ new PrintStream(new FileOutputStream(FileDescriptor.out)));
}
@Test(expected = FileNotFoundException.class)
@@ -374,8 +374,8 @@ public class CvalCheckerTest {
public void testReadKeyFromFile_LicenseFileEmpty() throws Exception {
File tmpLicenseFile = File.createTempFile("license", "lic");
- assertNull(licenseChecker.readKeyFromFile(tmpLicenseFile.toURI()
- .toURL(), 4));
+ assertNull(licenseChecker
+ .readKeyFromFile(tmpLicenseFile.toURI().toURL(), 4));
tmpLicenseFile.delete();
}
@@ -388,8 +388,8 @@ public class CvalCheckerTest {
out.println("this-is-a-license");
out.close();
- assertEquals("this-is-a-license", licenseChecker.readKeyFromFile(
- tmpLicenseFile.toURI().toURL(), 4));
+ assertEquals("this-is-a-license", licenseChecker
+ .readKeyFromFile(tmpLicenseFile.toURI().toURL(), 4));
tmpLicenseFile.delete();
}
@@ -402,8 +402,8 @@ public class CvalCheckerTest {
out.println("4=this-is-a-license");
out.close();
- assertEquals("this-is-a-license", licenseChecker.readKeyFromFile(
- tmpLicenseFile.toURI().toURL(), 4));
+ assertEquals("this-is-a-license", licenseChecker
+ .readKeyFromFile(tmpLicenseFile.toURI().toURL(), 4));
tmpLicenseFile.delete();
}
@@ -417,10 +417,10 @@ public class CvalCheckerTest {
out.println("5=this-is-another-license");
out.close();
- assertEquals("this-is-a-license", licenseChecker.readKeyFromFile(
- tmpLicenseFile.toURI().toURL(), 4));
- assertEquals("this-is-another-license", licenseChecker.readKeyFromFile(
- tmpLicenseFile.toURI().toURL(), 5));
+ assertEquals("this-is-a-license", licenseChecker
+ .readKeyFromFile(tmpLicenseFile.toURI().toURL(), 4));
+ assertEquals("this-is-another-license", licenseChecker
+ .readKeyFromFile(tmpLicenseFile.toURI().toURL(), 5));
tmpLicenseFile.delete();
}
@@ -434,10 +434,10 @@ public class CvalCheckerTest {
out.println("5 = this-is-another-license");
out.close();
- assertEquals("this-is-a-license", licenseChecker.readKeyFromFile(
- tmpLicenseFile.toURI().toURL(), 4));
- assertEquals("this-is-another-license", licenseChecker.readKeyFromFile(
- tmpLicenseFile.toURI().toURL(), 5));
+ assertEquals("this-is-a-license", licenseChecker
+ .readKeyFromFile(tmpLicenseFile.toURI().toURL(), 4));
+ assertEquals("this-is-another-license", licenseChecker
+ .readKeyFromFile(tmpLicenseFile.toURI().toURL(), 5));
tmpLicenseFile.delete();
}
@@ -450,8 +450,8 @@ public class CvalCheckerTest {
out.println("5 = this-is-another-license");
out.close();
- assertNull(licenseChecker.readKeyFromFile(tmpLicenseFile.toURI()
- .toURL(), 3));
+ assertNull(licenseChecker
+ .readKeyFromFile(tmpLicenseFile.toURI().toURL(), 3));
tmpLicenseFile.delete();
}
@@ -464,12 +464,12 @@ public class CvalCheckerTest {
out.println("5 = this-is-another-license");
out.close();
- assertEquals("this-is-a-license", licenseChecker.readKeyFromFile(
- tmpLicenseFile.toURI().toURL(), 3));
- assertEquals("this-is-a-license", licenseChecker.readKeyFromFile(
- tmpLicenseFile.toURI().toURL(), 4));
- assertEquals("this-is-another-license", licenseChecker.readKeyFromFile(
- tmpLicenseFile.toURI().toURL(), 5));
+ assertEquals("this-is-a-license", licenseChecker
+ .readKeyFromFile(tmpLicenseFile.toURI().toURL(), 3));
+ assertEquals("this-is-a-license", licenseChecker
+ .readKeyFromFile(tmpLicenseFile.toURI().toURL(), 4));
+ assertEquals("this-is-another-license", licenseChecker
+ .readKeyFromFile(tmpLicenseFile.toURI().toURL(), 5));
tmpLicenseFile.delete();
}
@@ -483,12 +483,12 @@ public class CvalCheckerTest {
out.println("this-is-a-license");
out.close();
- assertEquals("this-is-a-license", licenseChecker.readKeyFromFile(
- tmpLicenseFile.toURI().toURL(), 3));
- assertEquals("this-is-a-license", licenseChecker.readKeyFromFile(
- tmpLicenseFile.toURI().toURL(), 4));
- assertEquals("this-is-another-license", licenseChecker.readKeyFromFile(
- tmpLicenseFile.toURI().toURL(), 5));
+ assertEquals("this-is-a-license", licenseChecker
+ .readKeyFromFile(tmpLicenseFile.toURI().toURL(), 3));
+ assertEquals("this-is-a-license", licenseChecker
+ .readKeyFromFile(tmpLicenseFile.toURI().toURL(), 4));
+ assertEquals("this-is-another-license", licenseChecker
+ .readKeyFromFile(tmpLicenseFile.toURI().toURL(), 5));
tmpLicenseFile.delete();
}
diff --git a/client/src/main/java/com/vaadin/client/AnimationUtil.java b/client/src/main/java/com/vaadin/client/AnimationUtil.java
index 780d2039e1..ee39b42ee3 100644
--- a/client/src/main/java/com/vaadin/client/AnimationUtil.java
+++ b/client/src/main/java/com/vaadin/client/AnimationUtil.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -23,7 +23,7 @@ import com.vaadin.client.AnimationUtil.AnimationEndListener;
/**
* Utility methods for working with CSS transitions and animations.
- *
+ *
* @author Vaadin Ltd
* @since 7.3
*/
@@ -31,9 +31,9 @@ public class AnimationUtil {
/**
* For internal use only. May be removed or replaced in the future.
- *
+ *
* Set the animation-duration CSS property.
- *
+ *
* @param elem
* the element whose animation-duration to set
* @param duration
@@ -46,9 +46,9 @@ public class AnimationUtil {
/**
* For internal use only. May be removed or replaced in the future.
- *
+ *
* Set the animation-delay CSS property.
- *
+ *
* @param elem
* the element whose animation-delay to set
* @param delay
@@ -69,13 +69,13 @@ public class AnimationUtil {
callbackFunc.listener = listener;
elem.addEventListener(@com.vaadin.client.AnimationUtil::ANIMATION_END_EVENT_NAME, callbackFunc, false);
-
+
// Store function reference for later removal
if(!elem._vaadin_animationend_callbacks) {
elem._vaadin_animationend_callbacks = [];
}
elem._vaadin_animationend_callbacks.push(callbackFunc);
-
+
return callbackFunc;
}-*/;
diff --git a/client/src/main/java/com/vaadin/client/ApplicationConfiguration.java b/client/src/main/java/com/vaadin/client/ApplicationConfiguration.java
index a9fd9803c3..6adb5968e7 100644
--- a/client/src/main/java/com/vaadin/client/ApplicationConfiguration.java
+++ b/client/src/main/java/com/vaadin/client/ApplicationConfiguration.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -62,7 +62,7 @@ public class ApplicationConfiguration implements EntryPoint {
/**
* Helper class for reading configuration options from the bootstap
* javascript
- *
+ *
* @since 7.0
*/
private static class JsoConfiguration extends JavaScriptObject {
@@ -74,7 +74,7 @@ public class ApplicationConfiguration implements EntryPoint {
* Reads a configuration parameter as a string. Please note that the
* javascript value of the parameter should also be a string, or else an
* undefined exception may be thrown.
- *
+ *
* @param name
* name of the configuration parameter
* @return value of the configuration parameter, or null if
@@ -94,7 +94,7 @@ public class ApplicationConfiguration implements EntryPoint {
* Reads a configuration parameter as a boolean object. Please note that
* the javascript value of the parameter should also be a boolean, or
* else an undefined exception may be thrown.
- *
+ *
* @param name
* name of the configuration parameter
* @return boolean value of the configuration paramter, or
@@ -115,7 +115,7 @@ public class ApplicationConfiguration implements EntryPoint {
* Reads a configuration parameter as an integer object. Please note
* that the javascript value of the parameter should also be an integer,
* or else an undefined exception may be thrown.
- *
+ *
* @param name
* name of the configuration parameter
* @return integer value of the configuration paramter, or
@@ -138,7 +138,7 @@ public class ApplicationConfiguration implements EntryPoint {
* an object with appropriate fields, or else an undefined exception may
* be thrown when calling this method or when calling methods on the
* returned object.
- *
+ *
* @param name
* name of the configuration parameter
* @return error message with the given name, or null if no
@@ -152,7 +152,7 @@ public class ApplicationConfiguration implements EntryPoint {
/**
* Returns a native javascript object containing version information
* from the server.
- *
+ *
* @return a javascript object with the version information
*/
private native JavaScriptObject getVersionInfoJSObject()
@@ -162,9 +162,9 @@ public class ApplicationConfiguration implements EntryPoint {
/**
* Gets the version of the Vaadin framework used on the server.
- *
+ *
* @return a string with the version
- *
+ *
* @see com.vaadin.server.VaadinServlet#VERSION
*/
private native String getVaadinVersion()
@@ -174,9 +174,9 @@ public class ApplicationConfiguration implements EntryPoint {
/**
* Gets the version of the Atmosphere framework.
- *
+ *
* @return a string with the version
- *
+ *
* @see org.atmosphere.util#getRawVersion()
*/
private native String getAtmosphereVersion()
@@ -186,7 +186,7 @@ public class ApplicationConfiguration implements EntryPoint {
/**
* Gets the JS version used in the Atmosphere framework.
- *
+ *
* @return a string with the version
*/
private native String getAtmosphereJSVersion()
@@ -206,7 +206,7 @@ public class ApplicationConfiguration implements EntryPoint {
/**
* Wraps a native javascript object containing fields for an error message
- *
+ *
* @since 7.0
*/
public static final class ErrorMessage extends JavaScriptObject {
@@ -268,9 +268,9 @@ public class ApplicationConfiguration implements EntryPoint {
* Checks whether path info in requests to the server-side service should be
* in a request parameter (named v-resourcePath) or appended to
* the end of the service URL.
- *
+ *
* @see #getServiceUrl()
- *
+ *
* @return true if path info should be a request parameter;
* false if the path info goes after the service URL
*/
@@ -282,7 +282,7 @@ public class ApplicationConfiguration implements EntryPoint {
* Return the name of the parameter used to to send data to the service url.
* This method should only be called if {@link #useServiceUrlPathParam()} is
* true.
- *
+ *
* @since 7.1.6
* @return The parameter name, by default v-resourcePath
*/
@@ -300,9 +300,9 @@ public class ApplicationConfiguration implements EntryPoint {
* {@link #useServiceUrlPathParam()} return true, the requested
* path info should be in the v-resourcePath query parameter;
* else the path info should be appended to the end of the URL.
- *
+ *
* @see #useServiceUrlPathParam()
- *
+ *
* @return the URL to the server-side service as a string
*/
public String getServiceUrl() {
@@ -321,7 +321,7 @@ public class ApplicationConfiguration implements EntryPoint {
/**
* Gets the URL of the VAADIN directory on the server.
- *
+ *
* @return the URL of the VAADIN directory
*/
public String getVaadinDirUrl() {
@@ -335,7 +335,7 @@ public class ApplicationConfiguration implements EntryPoint {
/**
* Gets the initial UIDL from the DOM, if it was provided during the init
* process.
- *
+ *
* @return
*/
public String getUIDL() {
@@ -355,7 +355,7 @@ public class ApplicationConfiguration implements EntryPoint {
* instance. The UI id should be included in every request originating from
* this instance in order to associate the request with the right UI
* instance on the server.
- *
+ *
* @return the UI id
*/
public int getUIId() {
@@ -418,7 +418,8 @@ public class ApplicationConfiguration implements EntryPoint {
.intValue();
// null -> false
- standalone = jsoConfiguration.getConfigBoolean("standalone") == Boolean.TRUE;
+ standalone = jsoConfiguration
+ .getConfigBoolean("standalone") == Boolean.TRUE;
heartbeatInterval = jsoConfiguration
.getConfigInteger("heartbeatInterval");
@@ -431,7 +432,7 @@ public class ApplicationConfiguration implements EntryPoint {
/**
* Starts the application with a given id by reading the configuration
* options stored by the bootstrap javascript.
- *
+ *
* @param applicationId
* id of the application to load, this is also the id of the html
* element into which the application should be rendered.
@@ -442,7 +443,8 @@ public class ApplicationConfiguration implements EntryPoint {
@Override
public void execute() {
Profiler.enter("ApplicationConfiguration.startApplication");
- ApplicationConfiguration appConf = getConfigFromDOM(applicationId);
+ ApplicationConfiguration appConf = getConfigFromDOM(
+ applicationId);
ApplicationConnection a = GWT
.create(ApplicationConnection.class);
a.init(widgetSet, appConf);
@@ -461,7 +463,7 @@ public class ApplicationConfiguration implements EntryPoint {
/**
* Gets the configuration object for a specific application from the
* bootstrap javascript.
- *
+ *
* @param appId
* the id of the application to get configuration data for
* @return a native javascript object containing the configuration data
@@ -484,9 +486,9 @@ public class ApplicationConfiguration implements EntryPoint {
/**
* Return Atmosphere version.
- *
+ *
* @since 7.4
- *
+ *
* @return Atmosphere version.
*/
public String getAtmosphereVersion() {
@@ -495,9 +497,9 @@ public class ApplicationConfiguration implements EntryPoint {
/**
* Return Atmosphere JS version.
- *
+ *
* @since 7.4
- *
+ *
* @return Atmosphere JS version.
*/
public String getAtmosphereJSVersion() {
@@ -511,7 +513,8 @@ public class ApplicationConfiguration implements EntryPoint {
// Initialize if not already loaded
Integer currentTag = Integer.valueOf(tag);
while (type == null && currentTag != null) {
- String serverSideClassNameForTag = getServerSideClassNameForTag(currentTag);
+ String serverSideClassNameForTag = getServerSideClassNameForTag(
+ currentTag);
if (TypeData.hasIdentifier(serverSideClassNameForTag)) {
try {
type = (Class extends ServerConnector>) TypeData
@@ -562,7 +565,7 @@ public class ApplicationConfiguration implements EntryPoint {
* Returns all tags for given class. Tags are used in
* {@link ApplicationConfiguration} to keep track of different classes and
* their hierarchy
- *
+ *
* @since 7.2
* @param classname
* name of class which tags we want
@@ -624,9 +627,8 @@ public class ApplicationConfiguration implements EntryPoint {
cmd.execute();
}
callbacks.clear();
- } else if (dependenciesLoading == 0
- && !ConnectorBundleLoader.get().isBundleLoaded(
- ConnectorBundleLoader.DEFERRED_BUNDLE_NAME)) {
+ } else if (dependenciesLoading == 0 && !ConnectorBundleLoader.get()
+ .isBundleLoaded(ConnectorBundleLoader.DEFERRED_BUNDLE_NAME)) {
ConnectorBundleLoader.get().loadBundle(
ConnectorBundleLoader.DEFERRED_BUNDLE_NAME,
new BundleLoadCallback() {
@@ -655,9 +657,8 @@ public class ApplicationConfiguration implements EntryPoint {
// Don't run twice if the module has been inherited several times,
// and don't continue if vaadinBootstrap was not executed.
if (moduleLoaded || !vaadinBootstrapLoaded()) {
- getLogger()
- .log(Level.WARNING,
- "vaadinBootstrap.js was not loaded, skipping vaadin application configuration.");
+ getLogger().log(Level.WARNING,
+ "vaadinBootstrap.js was not loaded, skipping vaadin application configuration.");
return;
}
moduleLoaded = true;
@@ -714,7 +715,8 @@ public class ApplicationConfiguration implements EntryPoint {
@Override
public void onFailure(Throwable reason) {
- Window.alert("Failed to load Vaadin debug window styles");
+ Window.alert(
+ "Failed to load Vaadin debug window styles");
}
});
@@ -794,7 +796,7 @@ public class ApplicationConfiguration implements EntryPoint {
* Registers that callback that the bootstrap javascript uses to start
* applications once the widgetset is loaded and all required information is
* available
- *
+ *
* @param widgetsetName
* the name of this widgetset
*/
@@ -809,9 +811,9 @@ public class ApplicationConfiguration implements EntryPoint {
* adding ?debug parameter to URI. Please note that debug mode is always
* disabled if production mode is enabled, but disabling production mode
* does not automatically enable debug mode.
- *
+ *
* @see #isProductionMode()
- *
+ *
* @return true if client side is currently been debugged
*/
public static boolean isDebugMode() {
@@ -823,7 +825,7 @@ public class ApplicationConfiguration implements EntryPoint {
* Checks if production mode is enabled. When production mode is enabled,
* client-side logging is disabled. There may also be other performance
* optimizations.
- *
+ *
* @since 7.1.2
* @return true if production mode is enabled; otherwise
* false.
@@ -843,7 +845,7 @@ public class ApplicationConfiguration implements EntryPoint {
/**
* Checks whether debug logging should be quiet
- *
+ *
* @return true if debug logging should be quiet
*/
public static boolean isQuietDebugMode() {
@@ -855,7 +857,7 @@ public class ApplicationConfiguration implements EntryPoint {
/**
* Checks whether the widget set version has been sent to the server. It is
* sent in the first UIDL request.
- *
+ *
* @return true if browser information has already been sent
*/
public boolean isWidgetsetVersionSent() {
diff --git a/client/src/main/java/com/vaadin/client/ApplicationConnection.java b/client/src/main/java/com/vaadin/client/ApplicationConnection.java
index 97ddd14764..bdf34d229c 100644
--- a/client/src/main/java/com/vaadin/client/ApplicationConnection.java
+++ b/client/src/main/java/com/vaadin/client/ApplicationConnection.java
@@ -69,14 +69,14 @@ import com.vaadin.shared.util.SharedUtil;
* This is the client side communication "engine", managing client-server
* communication with its server side counterpart
* com.vaadin.server.VaadinService.
- *
+ *
* Client-side connectors receive updates from the corresponding server-side
* connector (typically component) as state updates or RPC calls. The connector
* has the possibility to communicate back with its server side counter part
* through RPC calls.
- *
+ *
* TODO document better
- *
+ *
* Entry point classes (widgetsets) define onModuleLoad().
*/
public class ApplicationConnection implements HasHandlers {
@@ -100,18 +100,17 @@ public class ApplicationConnection implements HasHandlers {
* A string that, if found in a non-JSON response to a UIDL request, will
* cause the browser to refresh the page. If followed by a colon, optional
* whitespace, and a URI, causes the browser to synchronously load the URI.
- *
+ *
*
* This allows, for instance, a servlet filter to redirect the application
* to a custom login page when the session expires. For example:
*
*/
@@ -156,7 +155,8 @@ public class ApplicationConnection implements HasHandlers {
void onResponseHandlingEnded(ResponseHandlingEndedEvent e);
}
- public static class RequestStartingEvent extends ApplicationConnectionEvent {
+ public static class RequestStartingEvent
+ extends ApplicationConnectionEvent {
public static Type TYPE = new Type();
@@ -175,8 +175,8 @@ public class ApplicationConnection implements HasHandlers {
}
}
- public static class ResponseHandlingEndedEvent extends
- ApplicationConnectionEvent {
+ public static class ResponseHandlingEndedEvent
+ extends ApplicationConnectionEvent {
public static Type TYPE = new Type();
@@ -195,8 +195,8 @@ public class ApplicationConnection implements HasHandlers {
}
}
- public static abstract class ApplicationConnectionEvent extends
- GwtEvent {
+ public static abstract class ApplicationConnectionEvent
+ extends GwtEvent {
private ApplicationConnection connection;
@@ -210,8 +210,8 @@ public class ApplicationConnection implements HasHandlers {
}
- public static class ResponseHandlingStartedEvent extends
- ApplicationConnectionEvent {
+ public static class ResponseHandlingStartedEvent
+ extends ApplicationConnectionEvent {
public ResponseHandlingStartedEvent(ApplicationConnection connection) {
super(connection);
@@ -233,17 +233,17 @@ public class ApplicationConnection implements HasHandlers {
/**
* Event triggered when a application is stopped by calling
* {@link ApplicationConnection#setApplicationRunning(false)}.
- *
+ *
* To listen for the event add a {@link ApplicationStoppedHandler} by
* invoking
* {@link ApplicationConnection#addHandler(ApplicationConnection.ApplicationStoppedEvent.Type, ApplicationStoppedHandler)}
* to the {@link ApplicationConnection}
- *
+ *
* @since 7.1.8
* @author Vaadin Ltd
*/
- public static class ApplicationStoppedEvent extends
- GwtEvent {
+ public static class ApplicationStoppedEvent
+ extends GwtEvent {
public static Type TYPE = new Type();
@@ -265,7 +265,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Called when a communication error has occurred. Returning
* true from this method suppresses error handling.
- *
+ *
* @param details
* A string describing the error.
* @param statusCode
@@ -280,7 +280,7 @@ public class ApplicationConnection implements HasHandlers {
* A listener for listening to application stopped events. The listener can
* be added to a {@link ApplicationConnection} by invoking
* {@link ApplicationConnection#addHandler(ApplicationStoppedEvent.Type, ApplicationStoppedHandler)}
- *
+ *
* @since 7.1.8
* @author Vaadin Ltd
*/
@@ -290,7 +290,7 @@ public class ApplicationConnection implements HasHandlers {
* Triggered when the {@link ApplicationConnection} marks a previously
* running application as stopped by invoking
* {@link ApplicationConnection#setApplicationRunning(false)}
- *
+ *
* @param event
* the event triggered by the {@link ApplicationConnection}
*/
@@ -351,8 +351,8 @@ public class ApplicationConnection implements HasHandlers {
public ApplicationConnection() {
// Assuming UI data is eagerly loaded
- ConnectorBundleLoader.get().loadBundle(
- ConnectorBundleLoader.EAGER_BUNDLE_NAME, null);
+ ConnectorBundleLoader.get()
+ .loadBundle(ConnectorBundleLoader.EAGER_BUNDLE_NAME, null);
uIConnector = GWT.create(UIConnector.class);
rpcManager = GWT.create(RpcManager.class);
layoutManager = GWT.create(LayoutManager.class);
@@ -368,9 +368,8 @@ public class ApplicationConnection implements HasHandlers {
getLogger().info("Starting application " + cnf.getRootPanelId());
getLogger().info("Using theme: " + cnf.getThemeName());
- getLogger().info(
- "Vaadin application servlet version: "
- + cnf.getServletVersion());
+ getLogger().info("Vaadin application servlet version: "
+ + cnf.getServletVersion());
if (!cnf.getServletVersion().equals(Version.getFullVersion())) {
getLogger()
@@ -428,7 +427,7 @@ public class ApplicationConnection implements HasHandlers {
* called once this application has started (first response received) or
* failed to start. This ensures that the applications are started in order,
* to avoid session-id problems.
- *
+ *
*/
public void start() {
String jsonText = configuration.getUIDL();
@@ -440,8 +439,8 @@ public class ApplicationConnection implements HasHandlers {
// Hack to avoid logging an error in endRequest()
getMessageSender().startRequest();
- getMessageHandler().handleMessage(
- MessageHandler.parseJson(jsonText));
+ getMessageHandler()
+ .handleMessage(MessageHandler.parseJson(jsonText));
}
// Tooltip can't be created earlier because the
@@ -460,7 +459,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Checks if there is some work to be done on the client side
- *
+ *
* @return true if the client has some work to be done, false otherwise
*/
private boolean isActive() {
@@ -535,7 +534,7 @@ public class ApplicationConnection implements HasHandlers {
*
vaadin.postRequestHooks is a map of functions which gets
* called after each XHR made by vaadin application. Note, that it is
* attaching js functions responsibility to create the variable like this:
- *
+ *
*
* if(!vaadin.postRequestHooks) {vaadin.postRequestHooks = new Object();}
* postRequestHooks.myHook = function(appId) {
@@ -546,7 +545,7 @@ public class ApplicationConnection implements HasHandlers {
*
First parameter passed to these functions is the identifier
* of Vaadin application that made the request.
*
- *
+ *
* TODO make this multi-app aware
*/
private native void initializeClientHooks()
@@ -577,7 +576,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Requests an analyze of layouts, to find inconsistencies. Exclusively used
* for debugging during development.
- *
+ *
* @deprecated as of 7.1. Replaced by {@link UIConnector#analyzeLayouts()}
*/
@Deprecated
@@ -589,7 +588,7 @@ public class ApplicationConnection implements HasHandlers {
* Sends a request to the server to print details to console that will help
* the developer to locate the corresponding server-side connector in the
* source code.
- *
+ *
* @param serverConnector
* @deprecated as of 7.1. Replaced by
* {@link UIConnector#showServerDebugInfo(ServerConnector)}
@@ -619,10 +618,9 @@ public class ApplicationConnection implements HasHandlers {
// Show this message just once
if (cssWaits++ == 0) {
- getLogger().warning(
- "Assuming CSS loading is not complete, "
- + "postponing render phase. "
- + "(.v-loading-indicator height == 0)");
+ getLogger().warning("Assuming CSS loading is not complete, "
+ + "postponing render phase. "
+ + "(.v-loading-indicator height == 0)");
}
} else {
cssLoaded = true;
@@ -637,7 +635,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Checks whether or not the CSS is loaded. By default checks the size of
* the loading indicator element.
- *
+ *
* @return
*/
protected boolean isCSSLoaded() {
@@ -647,12 +645,12 @@ public class ApplicationConnection implements HasHandlers {
/**
* Shows the communication error notification.
- *
+ *
* @param details
* Optional details.
* @param statusCode
* The status code returned for the request
- *
+ *
*/
public void showCommunicationError(String details, int statusCode) {
getLogger().severe("Communication error: " + details);
@@ -661,7 +659,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Shows the authentication error notification.
- *
+ *
* @param details
* Optional details.
*/
@@ -672,7 +670,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Shows the session expiration notification.
- *
+ *
* @param details
* Optional details.
*/
@@ -683,7 +681,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Shows an error notification.
- *
+ *
* @param details
* Optional details.
* @param message
@@ -731,7 +729,7 @@ public class ApplicationConnection implements HasHandlers {
*
* Used by the native "client.isActive" function.
*
- *
+ *
* @return true if deferred commands are (potentially) being executed, false
* otherwise
*/
@@ -746,7 +744,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Returns the loading indicator used by this ApplicationConnection
- *
+ *
* @return The loading indicator for this ApplicationConnection
*/
public VLoadingIndicator getLoadingIndicator() {
@@ -755,7 +753,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Determines whether or not the loading indicator is showing.
- *
+ *
* @return true if the loading indicator is visible
* @deprecated As of 7.1. Use {@link #getLoadingIndicator()} and
* {@link VLoadingIndicator#isVisible()}.isVisible() instead.
@@ -775,9 +773,8 @@ public class ApplicationConnection implements HasHandlers {
@Override
public void onError(ResourceLoadEvent event) {
- getLogger()
- .severe(event.getResourceUrl()
- + " could not be loaded, or the load detection failed because the stylesheet is empty.");
+ getLogger().severe(event.getResourceUrl()
+ + " could not be loaded, or the load detection failed because the stylesheet is empty.");
// The show must go on
onLoad(event);
}
@@ -865,7 +862,7 @@ public class ApplicationConnection implements HasHandlers {
* is true, the update is sent as soon as possible. If immediate is false,
* the update will be sent along with the next immediate update.
*
- *
+ *
* @param paintableId
* the id of the paintable that owns the variable
* @param variableName
@@ -887,7 +884,7 @@ public class ApplicationConnection implements HasHandlers {
* is true, the update is sent as soon as possible. If immediate is false,
* the update will be sent along with the next immediate update.
*
- *
+ *
* @param paintableId
* the id of the paintable that owns the variable
* @param variableName
@@ -910,7 +907,7 @@ public class ApplicationConnection implements HasHandlers {
* is true, the update is sent as soon as possible. If immediate is false,
* the update will be sent along with the next immediate update.
*
- *
+ *
* @param paintableId
* the id of the paintable that owns the variable
* @param variableName
@@ -933,7 +930,7 @@ public class ApplicationConnection implements HasHandlers {
* is true, the update is sent as soon as possible. If immediate is false,
* the update will be sent along with the next immediate update.
*
- *
+ *
* @param paintableId
* the id of the paintable that owns the variable
* @param variableName
@@ -956,7 +953,7 @@ public class ApplicationConnection implements HasHandlers {
* is true, the update is sent as soon as possible. If immediate is false,
* the update will be sent along with the next immediate update.
*
- *
+ *
* @param paintableId
* the id of the paintable that owns the variable
* @param variableName
@@ -979,7 +976,7 @@ public class ApplicationConnection implements HasHandlers {
* is true, the update is sent as soon as possible. If immediate is false,
* the update will be sent along with the next immediate update.
*
- *
+ *
* @param paintableId
* the id of the paintable that owns the variable
* @param variableName
@@ -1002,7 +999,7 @@ public class ApplicationConnection implements HasHandlers {
* is true, the update is sent as soon as possible. If immediate is false,
* the update will be sent along with the next immediate update.
*
- *
+ *
* @param paintableId
* the id of the paintable that owns the variable
* @param variableName
@@ -1025,7 +1022,7 @@ public class ApplicationConnection implements HasHandlers {
* is true, the update is sent as soon as possible. If immediate is false,
* the update will be sent along with the next immediate update.
*
- *
+ *
* @param paintableId
* the id of the paintable that owns the variable
* @param variableName
@@ -1048,7 +1045,7 @@ public class ApplicationConnection implements HasHandlers {
* the update will be sent along with the next immediate update.
*
* A null array is sent as an empty array.
- *
+ *
* @param paintableId
* the id of the paintable that owns the variable
* @param variableName
@@ -1071,7 +1068,7 @@ public class ApplicationConnection implements HasHandlers {
* the update will be sent along with the next immediate update.
*
* A null array is sent as an empty array.
- *
+ *
* @param paintableId
* the id of the paintable that owns the variable
* @param variableName
@@ -1088,7 +1085,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Does absolutely nothing. Replaced by {@link LayoutManager}.
- *
+ *
* @param container
* @deprecated As of 7.0, serves no purpose
*/
@@ -1110,7 +1107,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Returns false
- *
+ *
* @param paintable
* @return false, always
* @deprecated As of 7.0, serves no purpose
@@ -1122,7 +1119,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Returns false
- *
+ *
* @param paintable
* @return false, always
* @deprecated As of 7.0, serves no purpose
@@ -1143,16 +1140,16 @@ public class ApplicationConnection implements HasHandlers {
/**
* Get either an existing ComponentConnector or create a new
* ComponentConnector with the given type and id.
- *
+ *
* If a ComponentConnector with the given id already exists, returns it.
* Otherwise creates and registers a new ComponentConnector of the given
* type.
- *
+ *
* @param connectorId
* Id of the paintable
* @param connectorType
* Type of the connector, as passed from the server side
- *
+ *
* @return Either an existing ComponentConnector or a new ComponentConnector
* of the given type
*/
@@ -1165,15 +1162,15 @@ public class ApplicationConnection implements HasHandlers {
/**
* Creates a new ServerConnector with the given type and id.
- *
+ *
* Creates and registers a new ServerConnector of the given type. Should
* never be called with the connector id of an existing connector.
- *
+ *
* @param connectorId
* Id of the new connector
* @param connectorType
* Type of the connector, as passed from the server side
- *
+ *
* @return A new ServerConnector of the given type
*/
private ServerConnector createAndRegisterConnector(String connectorId,
@@ -1193,7 +1190,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Gets a resource that has been pre-loaded via UIDL, such as custom
* layouts.
- *
+ *
* @param name
* identifier of the resource to get
* @return the resource
@@ -1205,7 +1202,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Sets a resource that has been pre-loaded via UIDL, such as custom
* layouts.
- *
+ *
* @since 7.6
* @param name
* identifier of the resource to Set
@@ -1218,7 +1215,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Singleton method to get instance of app's context menu.
- *
+ *
* @return VContextMenu object
*/
public VContextMenu getContextMenu() {
@@ -1233,7 +1230,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Gets an {@link Icon} instance corresponding to a URI.
- *
+ *
* @since 7.2
* @param uri
* @return Icon object
@@ -1255,7 +1252,7 @@ public class ApplicationConnection implements HasHandlers {
* Translates custom protocols in UIDL URI's to be recognizable by browser.
* All uri's from UIDL should be routed via this method before giving them
* to browser due URI's in UIDL may contain custom protocols like theme://.
- *
+ *
* @param uidlUri
* Vaadin URI from uidl
* @return translated URI ready for browser
@@ -1267,7 +1264,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Gets the URI for the current theme. Can be used to reference theme
* resources.
- *
+ *
* @return URI to the current theme
*/
public String getThemeUri() {
@@ -1284,7 +1281,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Use to notify that the given component's caption has changed; layouts may
* have to be recalculated.
- *
+ *
* @param component
* the Paintable whose caption has changed
* @deprecated As of 7.0.2, has not had any effect for a long time
@@ -1296,7 +1293,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Gets the main view
- *
+ *
* @return the main view
*/
public UIConnector getUIConnector() {
@@ -1305,7 +1302,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Gets the {@link ApplicationConfiguration} for the current application.
- *
+ *
* @see ApplicationConfiguration
* @return the configuration for this application
*/
@@ -1318,7 +1315,7 @@ public class ApplicationConnection implements HasHandlers {
* list of events which has server side listeners is updated automatically
* before the component is updated so the value is correct if called from
* updatedFromUIDL.
- *
+ *
* @param connector
* The connector to register event listeners for
* @param eventIdentifier
@@ -1337,7 +1334,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Adds the get parameters to the uri and returns the new uri that contains
* the parameters.
- *
+ *
* @param uri
* The uri to which the parameters should be added.
* @param extraParams
@@ -1361,14 +1358,13 @@ public class ApplicationConnection implements HasHandlers {
*/
@Deprecated
public void unregisterPaintable(ServerConnector p) {
- getLogger().info(
- "unregisterPaintable (unnecessarily) called for "
- + Util.getConnectorString(p));
+ getLogger().info("unregisterPaintable (unnecessarily) called for "
+ + Util.getConnectorString(p));
}
/**
* Get VTooltip instance related to application connection
- *
+ *
* @return VTooltip instance
*/
public VTooltip getVTooltip() {
@@ -1380,7 +1376,7 @@ public class ApplicationConnection implements HasHandlers {
* this method is now handled by the state change event handler in
* AbstractComponentConnector. The only function this method has is to
* return true if the UIDL is a "cached" update.
- *
+ *
* @param component
* @param uidl
* @param manageCaption
@@ -1397,10 +1393,8 @@ public class ApplicationConnection implements HasHandlers {
}
if (!manageCaption) {
- getLogger()
- .warning(
- Util.getConnectorString(connector)
- + " called updateComponent with manageCaption=false. The parameter was ignored - override delegateCaption() to return false instead. It is however not recommended to use caption this way at all.");
+ getLogger().warning(Util.getConnectorString(connector)
+ + " called updateComponent with manageCaption=false. The parameter was ignored - override delegateCaption() to return false instead. It is however not recommended to use caption this way at all.");
}
return false;
}
@@ -1433,7 +1427,7 @@ public class ApplicationConnection implements HasHandlers {
* Schedules a heartbeat request to occur after the configured heartbeat
* interval elapses if the interval is a positive number. Otherwise, does
* nothing.
- *
+ *
* @deprecated as of 7.2, use {@link Heartbeat#schedule()} instead
*/
@Deprecated
@@ -1447,7 +1441,7 @@ public class ApplicationConnection implements HasHandlers {
* Heartbeat requests are used to inform the server that the client-side is
* still alive. If the client page is closed or the connection lost, the
* server will eventually close the inactive UI.
- *
+ *
* @deprecated as of 7.2, use {@link Heartbeat#send()} instead
*/
@Deprecated
@@ -1470,41 +1464,39 @@ public class ApplicationConnection implements HasHandlers {
/**
* Sets the delegate that is called whenever a communication error occurrs.
- *
+ *
* @param delegate
* the delegate.
*/
- public void setCommunicationErrorDelegate(CommunicationErrorHandler delegate) {
+ public void setCommunicationErrorDelegate(
+ CommunicationErrorHandler delegate) {
communicationErrorDelegate = delegate;
}
public void setApplicationRunning(boolean applicationRunning) {
if (getApplicationState() == ApplicationState.TERMINATED) {
if (applicationRunning) {
- getLogger()
- .severe("Tried to restart a terminated application. This is not supported");
+ getLogger().severe(
+ "Tried to restart a terminated application. This is not supported");
} else {
- getLogger()
- .warning(
- "Tried to stop a terminated application. This should not be done");
+ getLogger().warning(
+ "Tried to stop a terminated application. This should not be done");
}
return;
} else if (getApplicationState() == ApplicationState.INITIALIZING) {
if (applicationRunning) {
applicationState = ApplicationState.RUNNING;
} else {
- getLogger()
- .warning(
- "Tried to stop the application before it has started. This should not be done");
+ getLogger().warning(
+ "Tried to stop the application before it has started. This should not be done");
}
} else if (getApplicationState() == ApplicationState.RUNNING) {
if (!applicationRunning) {
applicationState = ApplicationState.TERMINATED;
eventBus.fireEvent(new ApplicationStoppedEvent());
} else {
- getLogger()
- .warning(
- "Tried to start an already running application. This should not be done");
+ getLogger().warning(
+ "Tried to start an already running application. This should not be done");
}
}
}
@@ -1512,7 +1504,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Checks if the application is in the {@link ApplicationState#RUNNING}
* state.
- *
+ *
* @since 7.6
* @return true if the application is in the running state, false otherwise
*/
@@ -1544,7 +1536,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Gets the active connector for focused element in browser.
- *
+ *
* @return Connector for focused element or null.
*/
private ComponentConnector getActiveConnector() {
@@ -1572,7 +1564,7 @@ public class ApplicationConnection implements HasHandlers {
* "initializing" to "running" to "stopped". There is no way for an
* application to go back to a previous state, i.e. a stopped application
* can never be re-started
- *
+ *
* @since 7.6
* @return the current state of this application
*/
@@ -1582,7 +1574,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Gets the server RPC queue for this application
- *
+ *
* @since 7.6
* @return the server RPC queue
*/
@@ -1592,7 +1584,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Gets the communication error handler for this application
- *
+ *
* @since 7.6
* @return the server RPC queue
*/
@@ -1602,7 +1594,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Gets the (server to client) message handler for this application
- *
+ *
* @since 7.6
* @return the message handler
*/
@@ -1612,7 +1604,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Gets the server rpc manager for this application
- *
+ *
* @since 7.6
* @return the server rpc manager
*/
@@ -1622,7 +1614,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Gets the (client to server) message sender for this application
- *
+ *
* @since 7.6
* @return the message sender
*/
diff --git a/client/src/main/java/com/vaadin/client/BrowserInfo.java b/client/src/main/java/com/vaadin/client/BrowserInfo.java
index d1592c95f4..f037fba175 100644
--- a/client/src/main/java/com/vaadin/client/BrowserInfo.java
+++ b/client/src/main/java/com/vaadin/client/BrowserInfo.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -21,10 +21,10 @@ import com.vaadin.shared.VBrowserDetails;
/**
* Class used to query information about web browser.
- *
+ *
* Browser details are detected only once and those are stored in this singleton
* class.
- *
+ *
*/
public class BrowserInfo {
@@ -60,7 +60,7 @@ public class BrowserInfo {
/**
* Singleton method to get BrowserInfo object.
- *
+ *
* @return instance of BrowserInfo object
*/
public static BrowserInfo get() {
@@ -122,19 +122,19 @@ public class BrowserInfo {
* Returns a string representing the browser in use, for use in CSS
* classnames. The classnames will be space separated abbreviations,
* optionally with a version appended.
- *
+ *
* Abbreviations: Firefox: ff Internet Explorer: ie Safari: sa Opera: op
- *
+ *
* Browsers that CSS-wise behave like each other will get the same
* abbreviation (this usually depends on the rendering engine).
- *
+ *
* This is quite simple at the moment, more heuristics will be added when
* needed.
- *
+ *
* Examples: Internet Explorer 6: ".v-ie .v-ie6 .v-ie60", Firefox 3.0.4:
* ".v-ff .v-ff3 .v-ff30", Opera 9.60: ".v-op .v-op9 .v-op960", Opera 10.10:
* ".v-op .v-op10 .v-op1010"
- *
+ *
* @return
*/
public String getCSSClass() {
@@ -284,7 +284,7 @@ public class BrowserInfo {
/**
* Returns the Gecko version if the browser is Gecko based. The Gecko
* version for Firefox 2 is 1.8 and 1.9 for Firefox 3.
- *
+ *
* @return The Gecko version or -1 if the browser is not Gecko based
*/
public float getGeckoVersion() {
@@ -298,7 +298,7 @@ public class BrowserInfo {
/**
* Returns the WebKit version if the browser is WebKit based. The WebKit
* version returned is the major version e.g., 523.
- *
+ *
* @return The WebKit version or -1 if the browser is not WebKit based
*/
public float getWebkitVersion() {
@@ -362,7 +362,7 @@ public class BrowserInfo {
/**
* Indicates whether the browser might require juggling to properly update
* sizes inside elements with overflow: auto.
- *
+ *
* @return true if the browser requires the workaround,
* otherwise false
*/
@@ -379,7 +379,7 @@ public class BrowserInfo {
*
* See https://bugs.webkit.org/show_bug.cgi?id=123958 and
* http://code.google.com/p/chromium/issues/detail?id=316549
- *
+ *
* @since 7.1.8
* @return true if the browser requires the workaround,
* otherwise false
@@ -391,7 +391,7 @@ public class BrowserInfo {
/**
* Checks if the browser is run on iOS
- *
+ *
* @return true if the browser is run on iOS, false otherwise
*/
public boolean isIOS() {
@@ -400,7 +400,7 @@ public class BrowserInfo {
/**
* Checks if the browser is run on iOS 6.
- *
+ *
* @since 7.1.1
* @return true if the browser is run on iOS 6, false otherwise
*/
@@ -410,7 +410,7 @@ public class BrowserInfo {
/**
* Checks if the browser is run on Android
- *
+ *
* @return true if the browser is run on Android, false otherwise
*/
public boolean isAndroid() {
@@ -420,7 +420,7 @@ public class BrowserInfo {
/**
* Checks if the browser is capable of handling scrolling natively or if a
* touch scroll helper is needed for scrolling.
- *
+ *
* @return true if browser needs a touch scroll helper, false if the browser
* can handle scrolling natively
*/
@@ -448,13 +448,13 @@ public class BrowserInfo {
/**
* Tests if this is an Android devices with a broken scrollTop
* implementation
- *
+ *
* @return true if scrollTop cannot be trusted on this device, false
* otherwise
*/
public boolean isAndroidWithBrokenScrollTop() {
- return isAndroid()
- && (getOperatingSystemMajorVersion() == 3 || getOperatingSystemMajorVersion() == 4);
+ return isAndroid() && (getOperatingSystemMajorVersion() == 3
+ || getOperatingSystemMajorVersion() == 4);
}
public boolean isAndroid23() {
@@ -477,7 +477,7 @@ public class BrowserInfo {
* Note that Internet Explorer 8 and newer will return the document mode so
* IE8 rendering as IE7 will return 7.
*
- *
+ *
* @return The major version of the browser.
*/
public int getBrowserMajorVersion() {
@@ -486,9 +486,9 @@ public class BrowserInfo {
/**
* Returns the browser minor version e.g., 5 for Firefox 3.5.
- *
+ *
* @see #getBrowserMajorVersion()
- *
+ *
* @return The minor version of the browser, or -1 if not known/parsed.
*/
public int getBrowserMinorVersion() {
@@ -498,7 +498,7 @@ public class BrowserInfo {
/**
* Checks if the browser version is newer or equal to the given major+minor
* version.
- *
+ *
* @param majorVersion
* The major version to check for
* @param minorVersion
diff --git a/client/src/main/java/com/vaadin/client/CSSRule.java b/client/src/main/java/com/vaadin/client/CSSRule.java
index a1ddce6d0a..2e75b6a58e 100644
--- a/client/src/main/java/com/vaadin/client/CSSRule.java
+++ b/client/src/main/java/com/vaadin/client/CSSRule.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -26,7 +26,7 @@ public class CSSRule {
private JavaScriptObject rules = null;
/**
- *
+ *
* @param selector
* the CSS selector to search for in the stylesheets
* @param deep
@@ -108,7 +108,7 @@ public class CSSRule {
/**
* Returns a specific property value from this CSS rule.
- *
+ *
* @param propertyName
* camelCase CSS property name
* @return the value of the property as a String
diff --git a/client/src/main/java/com/vaadin/client/ComponentConnector.java b/client/src/main/java/com/vaadin/client/ComponentConnector.java
index d0c943d553..f70f3cfc62 100644
--- a/client/src/main/java/com/vaadin/client/ComponentConnector.java
+++ b/client/src/main/java/com/vaadin/client/ComponentConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -24,7 +24,7 @@ import com.vaadin.shared.AbstractComponentState;
* An interface used by client-side widgets or paintable parts to receive
* updates from the corresponding server-side components in the form of
* {@link UIDL}.
- *
+ *
* Updates can be sent back to the server using the
* {@link ApplicationConnection#updateVariable()} methods.
*/
@@ -32,7 +32,7 @@ public interface ComponentConnector extends ServerConnector {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.VPaintable#getState()
*/
@Override
@@ -49,7 +49,7 @@ public interface ComponentConnector extends ServerConnector {
* Returns true if the width of this paintable is currently
* undefined. If the width is undefined, the actual width of the paintable
* is defined by its contents.
- *
+ *
* @return true if the width is undefined, else
* false
*/
@@ -59,7 +59,7 @@ public interface ComponentConnector extends ServerConnector {
* Returns true if the height of this paintable is currently
* undefined. If the height is undefined, the actual height of the paintable
* is defined by its contents.
- *
+ *
* @return true if the height is undefined, else
* false
*/
@@ -69,7 +69,7 @@ public interface ComponentConnector extends ServerConnector {
* Returns true if the width of this paintable is currently
* relative. If the width is relative, the actual width of the paintable is
* a percentage of the size allocated to it by its parent.
- *
+ *
* @return true if the width is undefined, else
* false
*/
@@ -79,7 +79,7 @@ public interface ComponentConnector extends ServerConnector {
* Returns true if the height of this paintable is currently
* relative. If the height is relative, the actual height of the paintable
* is a percentage of the size allocated to it by its parent.
- *
+ *
* @return true if the width is undefined, else
* false
*/
@@ -87,7 +87,7 @@ public interface ComponentConnector extends ServerConnector {
/**
* Checks if the connector is read only.
- *
+ *
* @deprecated This belongs in AbstractFieldConnector, see #8514
* @return true
*/
@@ -97,13 +97,13 @@ public interface ComponentConnector extends ServerConnector {
/**
* Return true if parent handles caption, false if the paintable handles the
* caption itself.
- *
+ *
*
* This should always return true and all components should let the parent
* handle the caption and use other attributes for internal texts in the
* component
*
- *
+ *
* @return true if caption handling is delegated to the parent, false if
* parent should not be allowed to render caption
*/
@@ -111,7 +111,7 @@ public interface ComponentConnector extends ServerConnector {
/**
* Sets the enabled state of the widget associated to this connector.
- *
+ *
* @param widgetEnabled
* true if the widget should be enabled, false otherwise
*/
@@ -124,7 +124,7 @@ public interface ComponentConnector extends ServerConnector {
* overridden to return true in all situations where this
* method might return a non-empty result.
*
- *
+ *
* @param element
* The element to lookup a tooltip for
* @return The tooltip for the element or null if no tooltip is defined for
@@ -140,7 +140,7 @@ public interface ComponentConnector extends ServerConnector {
* This is only done to optimize performance, so in cases where the status
* is not known, it's safer to return true so that there will
* be a tooltip handler even though it might not be needed in all cases.
- *
+ *
* @return true if some part of the component might have a
* tooltip, otherwise false
*/
diff --git a/client/src/main/java/com/vaadin/client/ComponentDetail.java b/client/src/main/java/com/vaadin/client/ComponentDetail.java
index 9e5e2a82a8..a6a1878407 100644
--- a/client/src/main/java/com/vaadin/client/ComponentDetail.java
+++ b/client/src/main/java/com/vaadin/client/ComponentDetail.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -30,7 +30,7 @@ class ComponentDetail {
/**
* Returns a TooltipInfo assosiated with Component. If element is given,
* returns an additional TooltipInfo.
- *
+ *
* @param key
* @return the tooltipInfo
*/
diff --git a/client/src/main/java/com/vaadin/client/ComponentDetailMap.java b/client/src/main/java/com/vaadin/client/ComponentDetailMap.java
index c99ebd2738..498e28c28b 100644
--- a/client/src/main/java/com/vaadin/client/ComponentDetailMap.java
+++ b/client/src/main/java/com/vaadin/client/ComponentDetailMap.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
diff --git a/client/src/main/java/com/vaadin/client/ComputedStyle.java b/client/src/main/java/com/vaadin/client/ComputedStyle.java
index 65a6e69019..f887dbb7d1 100644
--- a/client/src/main/java/com/vaadin/client/ComputedStyle.java
+++ b/client/src/main/java/com/vaadin/client/ComputedStyle.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -29,7 +29,7 @@ public class ComputedStyle {
*
* Note that this method is expensive. Wherever possible, reuse the returned
* object.
- *
+ *
* @param elem
* the element
* @return the computed style
@@ -44,18 +44,18 @@ public class ComputedStyle {
if(elem.nodeType != 1) {
return {};
}
-
+
if($wnd.document.defaultView && $wnd.document.defaultView.getComputedStyle) {
return $wnd.document.defaultView.getComputedStyle(elem, null);
}
-
+
if(elem.currentStyle) {
return elem.currentStyle;
}
}-*/;
/**
- *
+ *
* @param name
* name of the CSS property in camelCase
* @return the value of the property, normalized for across browsers (each
@@ -65,7 +65,7 @@ public class ComputedStyle {
/*-{
var cs = this.@com.vaadin.client.ComputedStyle::computedStyle;
var elem = this.@com.vaadin.client.ComputedStyle::elem;
-
+
// Border values need to be checked separately. The width might have a
// meaningful value even if the border style is "none". In that case the
// value should be 0.
@@ -80,13 +80,13 @@ public class ComputedStyle {
}
if(cs.getPropertyValue) {
-
+
// Convert name to dashed format
name = name.replace(/([A-Z])/g, "-$1").toLowerCase();
var ret = cs.getPropertyValue(name);
-
+
} else {
-
+
var ret = cs[name];
var style = elem.style;
@@ -98,25 +98,25 @@ public class ComputedStyle {
if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) {
// Remember the original values
var left = style.left, rsLeft = elem.runtimeStyle.left;
-
+
// Put in the new values to get a computed value out
elem.runtimeStyle.left = cs.left;
style.left = ret || 0;
ret = style.pixelLeft + "px";
-
+
// Revert the changed values
style.left = left;
elem.runtimeStyle.left = rsLeft;
}
-
+
}
-
+
// Normalize margin values. This is not totally valid, but in most cases
// it is what the user wants to know.
if(name.indexOf("margin") > -1 && ret == "auto") {
return "0px";
}
-
+
// Some browsers return undefined width and height values as "auto", so
// we need to retrieve those ourselves.
if (name == "width" && ret == "auto") {
@@ -126,14 +126,14 @@ public class ComputedStyle {
}
return ret;
-
+
}-*/;
/**
* Retrieves the given computed property as an integer
- *
+ *
* Returns 0 if the property cannot be converted to an integer
- *
+ *
* @param name
* the property to retrieve
* @return the integer value of the property or 0
@@ -148,9 +148,9 @@ public class ComputedStyle {
/**
* Retrieves the given computed property as a double
- *
+ *
* Returns NaN if the property cannot be converted to a double
- *
+ *
* @since 7.5.1
* @param name
* the property to retrieve
@@ -205,7 +205,7 @@ public class ComputedStyle {
/**
* Returns the current width from the DOM.
- *
+ *
* @since 7.5.1
* @return the computed width
*/
@@ -215,7 +215,7 @@ public class ComputedStyle {
/**
* Returns the current height from the DOM.
- *
+ *
* @since 7.5.1
* @return the computed height
*/
@@ -225,13 +225,13 @@ public class ComputedStyle {
/**
* Takes a String value e.g. "12px" and parses that to Integer 12.
- *
+ *
* @param String
* a value starting with a number
* @return Integer the value from the string before any non-numeric
* characters. If the value cannot be parsed to a number, returns
* null.
- *
+ *
* @deprecated Since 7.1.4, the method {@link #parseIntNative(String)} is
* used internally and this method does not belong in the public
* API of {@link ComputedStyle}. {@link #parseInt(String)} might
@@ -250,10 +250,10 @@ public class ComputedStyle {
/**
* Takes a String value e.g. "12px" and parses that to int 12.
- *
+ *
*
* This method returns 0 for NaN.
- *
+ *
* @param String
* a value starting with a number
* @return int the value from the string before any non-numeric characters.
@@ -270,7 +270,7 @@ public class ComputedStyle {
/**
* Takes a String value e.g. "12.3px" and parses that to a double, 12.3.
- *
+ *
* @param String
* a value starting with a number
* @return the value from the string before any non-numeric characters or
@@ -283,7 +283,7 @@ public class ComputedStyle {
/**
* Returns the sum of the top and bottom border width
- *
+ *
* @since 7.5.3
* @return the sum of the top and bottom border
*/
@@ -296,7 +296,7 @@ public class ComputedStyle {
/**
* Returns the sum of the left and right border width
- *
+ *
* @since 7.5.3
* @return the sum of the left and right border
*/
@@ -309,7 +309,7 @@ public class ComputedStyle {
/**
* Returns the sum of the top and bottom padding
- *
+ *
* @since 7.5.3
* @return the sum of the top and bottom padding
*/
@@ -322,7 +322,7 @@ public class ComputedStyle {
/**
* Returns the sum of the top and bottom padding
- *
+ *
* @since 7.5.3
* @return the sum of the left and right padding
*/
@@ -335,7 +335,7 @@ public class ComputedStyle {
/**
* Returns the sum of the top and bottom margin
- *
+ *
* @since 7.5.6
* @return the sum of the top and bottom margin
*/
@@ -348,7 +348,7 @@ public class ComputedStyle {
/**
* Returns the sum of the top and bottom margin
- *
+ *
* @since 7.5.6
* @return the sum of the left and right margin
*/
diff --git a/client/src/main/java/com/vaadin/client/ConnectorHierarchyChangeEvent.java b/client/src/main/java/com/vaadin/client/ConnectorHierarchyChangeEvent.java
index 419f052324..a46b191aa1 100644
--- a/client/src/main/java/com/vaadin/client/ConnectorHierarchyChangeEvent.java
+++ b/client/src/main/java/com/vaadin/client/ConnectorHierarchyChangeEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -29,13 +29,13 @@ import com.vaadin.client.ui.AbstractHasComponentsConnector;
* hierarchy. A {@link ConnectorHierarchyChangedEvent} is fired when an update
* from the server has been fully processed and all hierarchy updates have been
* completed.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
- *
+ *
*/
-public class ConnectorHierarchyChangeEvent extends
- AbstractServerConnectorEvent {
+public class ConnectorHierarchyChangeEvent
+ extends AbstractServerConnectorEvent {
/**
* Type of this event, used by the event bus.
*/
@@ -49,7 +49,7 @@ public class ConnectorHierarchyChangeEvent extends
/**
* Returns a collection of the old children for the connector. This was the
* state before the update was received from the server.
- *
+ *
* @return A collection of old child connectors. Never returns null.
*/
public List getOldChildren() {
@@ -58,7 +58,7 @@ public class ConnectorHierarchyChangeEvent extends
/**
* Sets the collection of the old children for the connector.
- *
+ *
* @param oldChildren
* The old child connectors. Must not be null.
*/
@@ -68,7 +68,7 @@ public class ConnectorHierarchyChangeEvent extends
/**
* Returns the {@link HasComponentsConnector} for which this event occurred.
- *
+ *
* @return The {@link HasComponentsConnector} whose child collection has
* changed. Never returns null.
*/
@@ -90,8 +90,8 @@ public class ConnectorHierarchyChangeEvent extends
* implement this interface, but instead make your connector class extend
* {@link AbstractHasComponentsConnector} or an appropriate subclass.
*/
- public interface ConnectorHierarchyChangeHandler extends Serializable,
- EventHandler {
+ public interface ConnectorHierarchyChangeHandler
+ extends Serializable, EventHandler {
/**
* Called by the framework when the list of child components of the
* connector implementing this interface has changed. The implementation
@@ -112,7 +112,7 @@ public class ConnectorHierarchyChangeEvent extends
* parent connector might not yet have detached a child widget and that
* the widget of a removed child might already have been attached by its
* new parent.
- *
+ *
* @param connectorHierarchyChangeEvent
* the event with information about the hierarchy change
*/
diff --git a/client/src/main/java/com/vaadin/client/ConnectorMap.java b/client/src/main/java/com/vaadin/client/ConnectorMap.java
index 3200dd6ab4..d6506db673 100644
--- a/client/src/main/java/com/vaadin/client/ConnectorMap.java
+++ b/client/src/main/java/com/vaadin/client/ConnectorMap.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -26,7 +26,8 @@ import com.google.gwt.user.client.ui.Widget;
public class ConnectorMap {
- public static ConnectorMap get(ApplicationConnection applicationConnection) {
+ public static ConnectorMap get(
+ ApplicationConnection applicationConnection) {
return applicationConnection.getConnectorMap();
}
@@ -36,7 +37,7 @@ public class ConnectorMap {
/**
* Returns a {@link ServerConnector} by its id
- *
+ *
* @param id
* The connector id
* @return A connector or null if a connector with the given id has not been
@@ -53,7 +54,7 @@ public class ConnectorMap {
/**
* Returns a {@link ComponentConnector} element by its root element.
- *
+ *
* @param element
* Root element of the {@link ComponentConnector}
* @return A connector or null if a connector with the given id has not been
@@ -81,7 +82,7 @@ public class ConnectorMap {
/**
* FIXME: What does this even do and why?
- *
+ *
* @param pid
* @return
*/
@@ -91,7 +92,7 @@ public class ConnectorMap {
/**
* Checks if a connector with the given id has been registered.
- *
+ *
* @param connectorId
* The id to check for
* @return true if a connector has been registered with the given id, false
@@ -110,7 +111,7 @@ public class ConnectorMap {
/**
* Retrieves the connector whose widget matches the parameter.
- *
+ *
* @param widget
* The widget
* @return A connector with {@literal widget} as its root widget or null if
@@ -144,7 +145,7 @@ public class ConnectorMap {
* Gets the connector id using a DOM element - the element should be the
* root element for a connector, otherwise no id will be found. Use
* {@link #getConnectorId(ServerConnector)} instead whenever possible.
- *
+ *
* @see #getConnectorId(ServerConnector)
* @param el
* element of the connector whose id is desired
@@ -158,7 +159,7 @@ public class ConnectorMap {
/**
* Gets the main element for the connector with the given id. The reverse of
* {@link #getConnectorId(Element)}.
- *
+ *
* @param connectorId
* the id of the widget whose element is desired
* @return the element for the connector corresponding to the id
@@ -177,7 +178,7 @@ public class ConnectorMap {
* This method does not remove the connector from the DOM, but marks the
* connector so that ApplicationConnection may clean up its references to
* it. Removing the widget from DOM is component containers responsibility.
- *
+ *
* @param connector
* the connector to remove
*/
@@ -208,9 +209,9 @@ public class ConnectorMap {
/**
* Gets all registered {@link ComponentConnector} instances
- *
+ *
* @return An array of all registered {@link ComponentConnector} instances
- *
+ *
* @deprecated As of 7.0.1, use {@link #getComponentConnectorsAsJsArray()}
* for better performance.
*/
@@ -259,7 +260,7 @@ public class ConnectorMap {
/**
* @return
- *
+ *
* @deprecated As of 7.0.1, use {@link #getConnectorsAsJsArray()} for
* improved performance.
*/
@@ -290,7 +291,7 @@ public class ConnectorMap {
/**
* Tests if the widget is the root widget of a {@link ComponentConnector}.
- *
+ *
* @param widget
* The widget to test
* @return true if the widget is the root widget of a
diff --git a/client/src/main/java/com/vaadin/client/ContainerResizedListener.java b/client/src/main/java/com/vaadin/client/ContainerResizedListener.java
index 702542f0ac..2cacc78b38 100644
--- a/client/src/main/java/com/vaadin/client/ContainerResizedListener.java
+++ b/client/src/main/java/com/vaadin/client/ContainerResizedListener.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -19,7 +19,7 @@ package com.vaadin.client;
/**
* ContainerResizedListener interface is useful for Widgets that support
* relative sizes and who need some additional sizing logic.
- *
+ *
* @deprecated As of 7.0, serves no purpose. Use {@link LayoutManager} and its
* methods instead.
*/
@@ -31,9 +31,9 @@ public interface ContainerResizedListener {
* function on its ancestors that implement NeedsLayout in case their
* container has resized. runAnchestorsLayout(HasWidgets parent) function
* from Util class may be a good helper for this.
- *
+ *
* @deprecated As of 7.0, this method is never called by the framework.
- *
+ *
*/
@Deprecated
public void iLayout();
diff --git a/client/src/main/java/com/vaadin/client/DateTimeService.java b/client/src/main/java/com/vaadin/client/DateTimeService.java
index 04006d85fb..af7e861edb 100644
--- a/client/src/main/java/com/vaadin/client/DateTimeService.java
+++ b/client/src/main/java/com/vaadin/client/DateTimeService.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -27,9 +27,9 @@ import com.vaadin.shared.ui.datefield.Resolution;
/**
* This class provides date/time parsing services to all components on the
* client side.
- *
+ *
* @author Vaadin Ltd.
- *
+ *
*/
@SuppressWarnings("deprecation")
public class DateTimeService {
@@ -48,7 +48,7 @@ public class DateTimeService {
/**
* Creates a new date time service with a given locale.
- *
+ *
* @param locale
* e.g. fi, en etc.
* @throws LocaleNotLoadedException
@@ -152,8 +152,8 @@ public class DateTimeService {
try {
firstDay = LocaleService.getFirstDayOfWeek(currentLocale);
} catch (final LocaleNotLoadedException e) {
- getLogger().log(Level.SEVERE,
- "Locale not loaded, using fallback 0", e);
+ getLogger().log(Level.SEVERE, "Locale not loaded, using fallback 0",
+ e);
firstDay = 0;
}
int start = dateForFirstOfThisMonth.getDay() - firstDay;
@@ -261,7 +261,7 @@ public class DateTimeService {
/**
* Returns the ISO-8601 week number of the given date.
- *
+ *
* @param date
* The date for which the week number should be resolved
* @return The ISO-8601 week number for {@literal date}
@@ -278,16 +278,16 @@ public class DateTimeService {
// Find nearest thursday (defines the week in ISO 8601). The week number
// for the nearest thursday is the same as for the target date.
int nearestThursdayDiff = 4 - dayOfWeek; // 4 is thursday
- Date nearestThursday = new Date(date.getTime() + nearestThursdayDiff
- * MILLISECONDS_PER_DAY);
+ Date nearestThursday = new Date(
+ date.getTime() + nearestThursdayDiff * MILLISECONDS_PER_DAY);
Date firstOfJanuary = new Date(nearestThursday.getYear(), 0, 1);
long timeDiff = nearestThursday.getTime() - firstOfJanuary.getTime();
// Rounding the result, as the division doesn't result in an integer
// when the given date is inside daylight saving time period.
- int daysSinceFirstOfJanuary = (int) Math.round((double) timeDiff
- / MILLISECONDS_PER_DAY);
+ int daysSinceFirstOfJanuary = (int) Math
+ .round((double) timeDiff / MILLISECONDS_PER_DAY);
int weekNumber = (daysSinceFirstOfJanuary) / 7 + 1;
@@ -299,11 +299,11 @@ public class DateTimeService {
* it to the month name since DateTimeFormat.format always uses the current
* locale and will replace the month name wrong if current locale is
* different from the locale set for the DateField.
- *
+ *
* MMMM is converted into long month name, MMM is converted into short month
* name. '' are added around the name to avoid that DateTimeFormat parses
* the month name as a pattern.
- *
+ *
* @param date
* The date to convert
* @param formatStr
@@ -343,8 +343,8 @@ public class DateTimeService {
formatStr = formatStr.replaceAll("'([E]{4,})'", dayName);
formatStr = formatStr.replaceAll("([E]{4,})'", "'" + dayName);
formatStr = formatStr.replaceAll("'([E]{4,})", dayName + "'");
- formatStr = formatStr
- .replaceAll("[E]{4,}", "'" + dayName + "'");
+ formatStr = formatStr.replaceAll("[E]{4,}",
+ "'" + dayName + "'");
}
}
@@ -363,8 +363,8 @@ public class DateTimeService {
formatStr = formatStr.replaceAll("'([E]{3,})'", dayName);
formatStr = formatStr.replaceAll("([E]{3,})'", "'" + dayName);
formatStr = formatStr.replaceAll("'([E]{3,})", dayName + "'");
- formatStr = formatStr
- .replaceAll("[E]{3,}", "'" + dayName + "'");
+ formatStr = formatStr.replaceAll("[E]{3,}",
+ "'" + dayName + "'");
}
}
@@ -386,8 +386,8 @@ public class DateTimeService {
formatStr = formatStr.replaceAll("'([M]{4,})'", monthName);
formatStr = formatStr.replaceAll("([M]{4,})'", "'" + monthName);
formatStr = formatStr.replaceAll("'([M]{4,})", monthName + "'");
- formatStr = formatStr.replaceAll("[M]{4,}", "'" + monthName
- + "'");
+ formatStr = formatStr.replaceAll("[M]{4,}",
+ "'" + monthName + "'");
}
}
@@ -406,8 +406,8 @@ public class DateTimeService {
formatStr = formatStr.replaceAll("'([M]{3,})'", monthName);
formatStr = formatStr.replaceAll("([M]{3,})'", "'" + monthName);
formatStr = formatStr.replaceAll("'([M]{3,})", monthName + "'");
- formatStr = formatStr.replaceAll("[M]{3,}", "'" + monthName
- + "'");
+ formatStr = formatStr.replaceAll("[M]{3,}",
+ "'" + monthName + "'");
}
}
@@ -417,7 +417,7 @@ public class DateTimeService {
/**
* Replaces month names in the entered date with the name in the current
* browser locale.
- *
+ *
* @param enteredDate
* Date string e.g. "5 May 2010"
* @param formatString
@@ -457,7 +457,7 @@ public class DateTimeService {
/**
* Parses the given date string using the given format string and the locale
* set in this DateTimeService instance.
- *
+ *
* @param dateString
* Date string e.g. "1 February 2010"
* @param formatString
@@ -467,7 +467,7 @@ public class DateTimeService {
* @return A Date object representing the dateString. Never returns null.
* @throws IllegalArgumentException
* if the parsing fails
- *
+ *
*/
public Date parseDate(String dateString, String formatString,
boolean lenient) throws IllegalArgumentException {
@@ -490,8 +490,8 @@ public class DateTimeService {
// Some version of Firefox sets the timestamp to 0 if parsing fails.
if (date != null && date.getTime() == 0) {
- throw new IllegalArgumentException("Parsing of '" + dateString
- + "' failed");
+ throw new IllegalArgumentException(
+ "Parsing of '" + dateString + "' failed");
}
return date;
diff --git a/client/src/main/java/com/vaadin/client/DeferredWorker.java b/client/src/main/java/com/vaadin/client/DeferredWorker.java
index cc22cda2a2..c0dd1a8dec 100644
--- a/client/src/main/java/com/vaadin/client/DeferredWorker.java
+++ b/client/src/main/java/com/vaadin/client/DeferredWorker.java
@@ -20,7 +20,7 @@ package com.vaadin.client;
* there is work scheduled to be executed in the near future and that the
* framework should wait for this work to complete before assuming the UI has
* reached a steady state.
- *
+ *
* @since 7.3
* @author Vaadin Ltd
*/
@@ -28,7 +28,7 @@ public interface DeferredWorker {
/**
* Checks whether there are operations pending for this widget or connector
* that must be executed before reaching a steady state.
- *
+ *
* @returns true iff there are operations pending which must be
* executed before reaching a steady state
*/
diff --git a/client/src/main/java/com/vaadin/client/DirectionalManagedLayout.java b/client/src/main/java/com/vaadin/client/DirectionalManagedLayout.java
index eab9811082..803410f5e0 100644
--- a/client/src/main/java/com/vaadin/client/DirectionalManagedLayout.java
+++ b/client/src/main/java/com/vaadin/client/DirectionalManagedLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
diff --git a/client/src/main/java/com/vaadin/client/EventHelper.java b/client/src/main/java/com/vaadin/client/EventHelper.java
index 1ee252af0f..978e6d5769 100644
--- a/client/src/main/java/com/vaadin/client/EventHelper.java
+++ b/client/src/main/java/com/vaadin/client/EventHelper.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -37,9 +37,9 @@ import com.google.gwt.user.client.ui.Widget;
* registration (possibly the same as given, should be store for next update.
*
* Pseudocode what helpers do:
- *
+ *
*
- *
+ *
* if paintable has event listener in UIDL
* if registration is null
* register paintable as as handler for event
@@ -48,8 +48,8 @@ import com.google.gwt.user.client.ui.Widget;
* if registration is not null
* remove the handler from paintable
* return null
- *
- *
+ *
+ *
*
*/
public class EventHelper {
@@ -57,7 +57,7 @@ public class EventHelper {
/**
* Adds or removes a focus handler depending on if the connector has focus
* listeners on the server side or not.
- *
+ *
* @param connector
* The connector to update. Must implement focusHandler.
* @param handlerRegistration
@@ -75,7 +75,7 @@ public class EventHelper {
/**
* Adds or removes a focus handler depending on if the connector has focus
* listeners on the server side or not.
- *
+ *
* @param connector
* The connector to update. Must implement focusHandler.
* @param handlerRegistration
@@ -87,7 +87,8 @@ public class EventHelper {
* handler later
*/
public static HandlerRegistration updateFocusHandler(
- T connector, HandlerRegistration handlerRegistration, Widget widget) {
+ T connector, HandlerRegistration handlerRegistration,
+ Widget widget) {
return updateHandler(connector, connector, FOCUS, handlerRegistration,
FocusEvent.getType(), widget);
}
@@ -95,7 +96,7 @@ public class EventHelper {
/**
* Adds or removes a blur handler depending on if the connector has blur
* listeners on the server side or not.
- *
+ *
* @param connector
* The connector to update. Must implement BlurHandler.
* @param handlerRegistration
@@ -113,7 +114,7 @@ public class EventHelper {
/**
* Adds or removes a blur handler depending on if the connector has blur
* listeners on the server side or not.
- *
+ *
* @param connector
* The connector to update. Must implement BlurHandler.
* @param handlerRegistration
@@ -121,19 +122,21 @@ public class EventHelper {
* registered previously
* @param widget
* The widget which emits blur events
- *
+ *
* @return a new registration handler that can be used to unregister the
* handler later
*/
public static HandlerRegistration updateBlurHandler(
- T connector, HandlerRegistration handlerRegistration, Widget widget) {
+ T connector, HandlerRegistration handlerRegistration,
+ Widget widget) {
return updateHandler(connector, connector, BLUR, handlerRegistration,
BlurEvent.getType(), widget);
}
public static HandlerRegistration updateHandler(
ComponentConnector connector, H handler, String eventIdentifier,
- HandlerRegistration handlerRegistration, Type type, Widget widget) {
+ HandlerRegistration handlerRegistration, Type type,
+ Widget widget) {
if (connector.hasEventListener(eventIdentifier)) {
if (handlerRegistration == null) {
handlerRegistration = widget.addDomHandler(handler, type);
diff --git a/client/src/main/java/com/vaadin/client/FastStringMap.java b/client/src/main/java/com/vaadin/client/FastStringMap.java
index ba3d07025b..c0a6dceb32 100644
--- a/client/src/main/java/com/vaadin/client/FastStringMap.java
+++ b/client/src/main/java/com/vaadin/client/FastStringMap.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
diff --git a/client/src/main/java/com/vaadin/client/FastStringSet.java b/client/src/main/java/com/vaadin/client/FastStringSet.java
index 756bd374dc..ee659cf14f 100644
--- a/client/src/main/java/com/vaadin/client/FastStringSet.java
+++ b/client/src/main/java/com/vaadin/client/FastStringSet.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
diff --git a/client/src/main/java/com/vaadin/client/Focusable.java b/client/src/main/java/com/vaadin/client/Focusable.java
index 05b32a7b05..129289ccd0 100644
--- a/client/src/main/java/com/vaadin/client/Focusable.java
+++ b/client/src/main/java/com/vaadin/client/Focusable.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -19,7 +19,7 @@ package com.vaadin.client;
* GWT's HasFocus is way too overkill for just receiving focus in simple
* components. Vaadin uses this interface in addition to GWT's HasFocus to pass
* focus requests from server to actual ui widgets in browsers.
- *
+ *
* So in to make your server side focusable component receive focus on client
* side it must either implement this or HasFocus interface.
*/
diff --git a/client/src/main/java/com/vaadin/client/HasChildMeasurementHintConnector.java b/client/src/main/java/com/vaadin/client/HasChildMeasurementHintConnector.java
index bb76377cd1..2e8a2fd5cd 100644
--- a/client/src/main/java/com/vaadin/client/HasChildMeasurementHintConnector.java
+++ b/client/src/main/java/com/vaadin/client/HasChildMeasurementHintConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -21,12 +21,12 @@ import com.vaadin.client.ui.layout.ElementResizeListener;
/**
* Connector with layout measuring hint. Used to improve granularity of control
* over child component measurements.
- *
+ *
* @since 7.6
* @author Vaadin Ltd
*/
-public interface HasChildMeasurementHintConnector extends
- HasComponentsConnector {
+public interface HasChildMeasurementHintConnector
+ extends HasComponentsConnector {
/**
* Specifies how you would like child components measurements to be handled.
@@ -56,7 +56,7 @@ public interface HasChildMeasurementHintConnector extends
/**
* Sets the child measurement hint for this component.
- *
+ *
* @param hint
* the value to set
*/
@@ -64,7 +64,7 @@ public interface HasChildMeasurementHintConnector extends
/**
* Returns the current child measurement hint value.
- *
+ *
* @return a ChildLayoutMeasureMode value
*/
ChildMeasurementHint getChildMeasurementHint();
diff --git a/client/src/main/java/com/vaadin/client/HasComponentsConnector.java b/client/src/main/java/com/vaadin/client/HasComponentsConnector.java
index 19b93edd61..f44ccf5431 100644
--- a/client/src/main/java/com/vaadin/client/HasComponentsConnector.java
+++ b/client/src/main/java/com/vaadin/client/HasComponentsConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -31,14 +31,14 @@ public interface HasComponentsConnector extends ServerConnector {
/**
* Update child components caption, description and error message.
- *
+ *
*
* Each component is responsible for maintaining its caption, description
* and error message. In most cases components doesn't want to do that and
* those elements reside outside of the component. Because of this layouts
* must provide service for it's childen to show those elements for them.
*
- *
+ *
* @param connector
* Child component for which service is requested.
*/
@@ -53,7 +53,7 @@ public interface HasComponentsConnector extends ServerConnector {
* Note that the method {@link ServerConnector#getChildren()} can return a
* larger list of children including both the child components and any
* extensions registered for the connector.
- *
+ *
* @return A collection of child components for this connector. An empty
* collection if there are no children. Never returns null.
*/
@@ -73,7 +73,7 @@ public interface HasComponentsConnector extends ServerConnector {
* {@link ServerConnector#setChildren(List)} and contains only child
* components. Both methods are called separately by the framework if the
* connector implements {@link HasComponentsConnector}.
- *
+ *
* @param children
* The new child connectors (components only)
*/
@@ -82,7 +82,7 @@ public interface HasComponentsConnector extends ServerConnector {
/**
* Adds a handler that is called whenever the child hierarchy of this
* connector has been updated by the server.
- *
+ *
* @param handler
* The handler that should be added.
* @return A handler registration reference that can be used to unregister
diff --git a/client/src/main/java/com/vaadin/client/JavaScriptConnectorHelper.java b/client/src/main/java/com/vaadin/client/JavaScriptConnectorHelper.java
index 1833b370e5..b37557cb05 100644
--- a/client/src/main/java/com/vaadin/client/JavaScriptConnectorHelper.java
+++ b/client/src/main/java/com/vaadin/client/JavaScriptConnectorHelper.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -64,8 +64,8 @@ public class JavaScriptConnectorHelper {
/**
* The id of the previous response for which state changes have been
* processed. If this is the same as the
- * {@link ApplicationConnection#getLastSeenServerSyncId()}, it means that the
- * state change has already been handled and should not be done again.
+ * {@link ApplicationConnection#getLastSeenServerSyncId()}, it means that
+ * the state change has already been handled and should not be done again.
*/
private int processedResponseId = -1;
@@ -83,7 +83,7 @@ public class JavaScriptConnectorHelper {
* javascript is usually initalized the first time a state change event is
* received, but it might in some cases be necessary to make this happen
* earlier.
- *
+ *
* @since 7.4.0
*/
public void ensureJavascriptInited() {
@@ -93,7 +93,8 @@ public class JavaScriptConnectorHelper {
}
private void processStateChanges() {
- int lastResponseId = connector.getConnection().getLastSeenServerSyncId();
+ int lastResponseId = connector.getConnection()
+ .getLastSeenServerSyncId();
if (processedResponseId == lastResponseId) {
return;
}
@@ -140,7 +141,8 @@ public class JavaScriptConnectorHelper {
return rpcName.replace('$', '.');
}
- protected JavaScriptObject createRpcObject(String iface, Set methods) {
+ protected JavaScriptObject createRpcObject(String iface,
+ Set methods) {
JavaScriptObject object = JavaScriptObject.createObject();
for (String method : methods) {
@@ -157,19 +159,16 @@ public class JavaScriptConnectorHelper {
Integer tag = Integer.valueOf(this.tag);
while (tag != null) {
String serverSideClassName = conf.getServerSideClassNameForTag(tag);
- String initFunctionName = serverSideClassName
- .replaceAll("\\.", "_");
+ String initFunctionName = serverSideClassName.replaceAll("\\.",
+ "_");
if (tryInitJs(initFunctionName, getConnectorWrapper())) {
- getLogger().info(
- "JavaScript connector initialized using "
- + initFunctionName);
+ getLogger().info("JavaScript connector initialized using "
+ + initFunctionName);
this.initFunctionName = initFunctionName;
return true;
} else {
- getLogger()
- .warning(
- "No JavaScript function " + initFunctionName
- + " found");
+ getLogger().warning("No JavaScript function " + initFunctionName
+ + " found");
attemptedNames.add(initFunctionName);
tag = conf.getParentTag(tag.intValue());
}
@@ -267,8 +266,8 @@ public class JavaScriptConnectorHelper {
ElementResizeListener listener = elementListeners.get(callbackFunction);
if (listener == null) {
- LayoutManager layoutManager = LayoutManager.get(connector
- .getConnection());
+ LayoutManager layoutManager = LayoutManager
+ .get(connector.getConnection());
listener = new ElementResizeListener() {
@Override
public void onElementResize(ElementResizeEvent e) {
@@ -343,8 +342,8 @@ public class JavaScriptConnectorHelper {
return connector;
}
- return ConnectorMap.get(connector.getConnection()).getConnector(
- connectorId);
+ return ConnectorMap.get(connector.getConnection())
+ .getConnector(connectorId);
}
private void fireRpc(String iface, String method,
@@ -378,16 +377,15 @@ public class JavaScriptConnectorHelper {
interfaceList += getJsInterfaceName(iface);
}
- throw new IllegalStateException(
- "Can not call method "
- + method
- + " for wildcard rpc proxy because the function is defined for multiple rpc interfaces: "
- + interfaceList
- + ". Retrieve a rpc proxy for a specific interface using getRpcProxy(interfaceName) to use the function.");
+ throw new IllegalStateException("Can not call method " + method
+ + " for wildcard rpc proxy because the function is defined for multiple rpc interfaces: "
+ + interfaceList
+ + ". Retrieve a rpc proxy for a specific interface using getRpcProxy(interfaceName) to use the function.");
}
}
- private void fireCallback(String name, JsArray arguments) {
+ private void fireCallback(String name,
+ JsArray arguments) {
MethodInvocation invocation = new JavaScriptMethodInvocation(
connector.getConnectorId(),
"com.vaadin.ui.JavaScript$JavaScriptCallbackRpc", "call",
@@ -410,7 +408,7 @@ public class JavaScriptConnectorHelper {
delete state[key];
}
}
-
+
for(var key in input) {
if (input.hasOwnProperty(key)) {
state[key] = input[key];
@@ -450,7 +448,8 @@ public class JavaScriptConnectorHelper {
}-*/;
private static native void invokeJsRpc(JavaScriptObject rpcMap,
- String interfaceName, String methodName, JavaScriptObject parameters)
+ String interfaceName, String methodName,
+ JavaScriptObject parameters)
/*-{
var targets = rpcMap[interfaceName];
if (!targets) {
@@ -479,14 +478,15 @@ public class JavaScriptConnectorHelper {
invokeIfPresent(connectorWrapper, "onUnregister");
if (!resizeListeners.isEmpty()) {
- LayoutManager layoutManager = LayoutManager.get(connector
- .getConnection());
+ LayoutManager layoutManager = LayoutManager
+ .get(connector.getConnection());
for (Entry> entry : resizeListeners
.entrySet()) {
Element element = entry.getKey();
- for (ElementResizeListener listener : entry.getValue().values()) {
- layoutManager
- .removeElementResizeListener(element, listener);
+ for (ElementResizeListener listener : entry.getValue()
+ .values()) {
+ layoutManager.removeElementResizeListener(element,
+ listener);
}
}
resizeListeners.clear();
diff --git a/client/src/main/java/com/vaadin/client/JavaScriptExtension.java b/client/src/main/java/com/vaadin/client/JavaScriptExtension.java
index 9c60d38a5a..c74715eb18 100644
--- a/client/src/main/java/com/vaadin/client/JavaScriptExtension.java
+++ b/client/src/main/java/com/vaadin/client/JavaScriptExtension.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
diff --git a/client/src/main/java/com/vaadin/client/JsArrayObject.java b/client/src/main/java/com/vaadin/client/JsArrayObject.java
index b6dcf3789d..acbc43ac6b 100644
--- a/client/src/main/java/com/vaadin/client/JsArrayObject.java
+++ b/client/src/main/java/com/vaadin/client/JsArrayObject.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
diff --git a/client/src/main/java/com/vaadin/client/LayoutManager.java b/client/src/main/java/com/vaadin/client/LayoutManager.java
index 371ea46d3d..306cea5ced 100644
--- a/client/src/main/java/com/vaadin/client/LayoutManager.java
+++ b/client/src/main/java/com/vaadin/client/LayoutManager.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -87,7 +87,7 @@ public class LayoutManager {
/**
* Returns the application connection for this layout manager.
- *
+ *
* @return connection
*/
protected ApplicationConnection getConnection() {
@@ -97,7 +97,7 @@ public class LayoutManager {
/**
* Gets the layout manager associated with the given
* {@link ApplicationConnection}.
- *
+ *
* @param connection
* the application connection to get a layout manager for
* @return the layout manager associated with the provided application
@@ -112,7 +112,7 @@ public class LayoutManager {
* This causes this layout manager to measure the element in the beginning
* of every layout phase and call the appropriate layout method of the
* managed layout if the size of the element has changed.
- *
+ *
* @param owner
* the ManagedLayout that depends on an element
* @param element
@@ -164,7 +164,7 @@ public class LayoutManager {
/**
* Assigns a measured size to an element. Method defined as protected to
* allow separate implementation for IE8.
- *
+ *
* @param element
* the dom element to attach the measured size to
* @param measuredSize
@@ -184,7 +184,7 @@ public class LayoutManager {
/**
* Gets the measured size for an element. Method defined as protected to
* allow separate implementation for IE8.
- *
+ *
* @param element
* The element to get measured size for
* @param defaultSize
@@ -209,9 +209,9 @@ public class LayoutManager {
/**
* Registers that a ManagedLayout is no longer depending on the size of an
* Element.
- *
+ *
* @see #registerDependency(ManagedLayout, Element)
- *
+ *
* @param owner
* the ManagedLayout no longer depends on an element
* @param element
@@ -240,9 +240,8 @@ public class LayoutManager {
}
layoutCounts.put(layout.getConnectorId(), count);
if (count.intValue() > 2) {
- getLogger().severe(
- Util.getConnectorString(layout) + " has been layouted "
- + count.intValue() + " times");
+ getLogger().severe(Util.getConnectorString(layout)
+ + " has been layouted " + count.intValue() + " times");
}
}
@@ -321,8 +320,8 @@ public class LayoutManager {
for (int i = 0; i < dumpLength; i++) {
ServerConnector connector = connectorMap.getConnector(dump.get(i));
if (connector != null) {
- currentDependencyTree.setNeedsMeasure(
- (ComponentConnector) connector, true);
+ currentDependencyTree
+ .setNeedsMeasure((ComponentConnector) connector, true);
}
}
needsMeasure = FastStringSet.create();
@@ -357,23 +356,27 @@ public class LayoutManager {
Collection listeners = elementResizeListeners
.get(element);
if (listeners != null) {
- Profiler.enter("Layout fire resize events - listeners not null");
- Profiler.enter("ElementResizeListener.onElementResize copy list");
- ElementResizeListener[] array = listeners
- .toArray(new ElementResizeListener[listeners
- .size()]);
- Profiler.leave("ElementResizeListener.onElementResize copy list");
+ Profiler.enter(
+ "Layout fire resize events - listeners not null");
+ Profiler.enter(
+ "ElementResizeListener.onElementResize copy list");
+ ElementResizeListener[] array = listeners.toArray(
+ new ElementResizeListener[listeners.size()]);
+ Profiler.leave(
+ "ElementResizeListener.onElementResize copy list");
ElementResizeEvent event = new ElementResizeEvent(this,
element);
for (ElementResizeListener listener : array) {
try {
String key = null;
if (Profiler.isEnabled()) {
- Profiler.enter("ElementResizeListener.onElementResize construct profiler key");
+ Profiler.enter(
+ "ElementResizeListener.onElementResize construct profiler key");
key = "ElementResizeListener.onElementResize for "
+ listener.getClass()
.getSimpleName();
- Profiler.leave("ElementResizeListener.onElementResize construct profiler key");
+ Profiler.leave(
+ "ElementResizeListener.onElementResize construct profiler key");
Profiler.enter(key);
}
@@ -386,7 +389,8 @@ public class LayoutManager {
"Error in resize listener", e);
}
}
- Profiler.leave("Layout fire resize events - listeners not null");
+ Profiler.leave(
+ "Layout fire resize events - listeners not null");
}
}
listenersToFire.clear();
@@ -451,10 +455,9 @@ public class LayoutManager {
Profiler.leave(key);
}
} catch (RuntimeException e) {
- getLogger()
- .log(Level.SEVERE,
- "Error in SimpleManagedLayout (horizontal) handling",
- e);
+ getLogger().log(Level.SEVERE,
+ "Error in SimpleManagedLayout (horizontal) handling",
+ e);
}
countLayout(layoutCounts, rr);
@@ -488,10 +491,9 @@ public class LayoutManager {
Profiler.leave(key);
}
} catch (RuntimeException e) {
- getLogger()
- .log(Level.SEVERE,
- "Error in DirectionalManagedLayout handling",
- e);
+ getLogger().log(Level.SEVERE,
+ "Error in DirectionalManagedLayout handling",
+ e);
}
countLayout(layoutCounts, cl);
} else {
@@ -514,10 +516,9 @@ public class LayoutManager {
Profiler.leave(key);
}
} catch (RuntimeException e) {
- getLogger()
- .log(Level.SEVERE,
- "Error in SimpleManagedLayout (vertical) handling",
- e);
+ getLogger().log(Level.SEVERE,
+ "Error in SimpleManagedLayout (vertical) handling",
+ e);
}
countLayout(layoutCounts, rr);
}
@@ -544,8 +545,9 @@ public class LayoutManager {
}
String connectorString = changedCids.get(i);
if (changedCids.length() < 10) {
- ServerConnector connector = ConnectorMap.get(
- connection).getConnector(connectorString);
+ ServerConnector connector = ConnectorMap
+ .get(connection)
+ .getConnector(connectorString);
connectorString = Util
.getConnectorString(connector);
}
@@ -557,18 +559,17 @@ public class LayoutManager {
Profiler.leave("Layout pass");
- getLogger()
- .info("Pass " + passes + " measured "
- + measuredConnectorCount + " elements, fired "
- + firedListeners + " listeners and did "
- + layoutCount + " layouts.");
+ getLogger().info("Pass " + passes + " measured "
+ + measuredConnectorCount + " elements, fired "
+ + firedListeners + " listeners and did " + layoutCount
+ + " layouts.");
if (passes > 100) {
getLogger().severe(LOOP_ABORT_MESSAGE);
if (ApplicationConfiguration.isDebugMode()) {
- VNotification.createNotification(
- VNotification.DELAY_FOREVER,
- connection.getUIConnector().getWidget())
+ VNotification
+ .createNotification(VNotification.DELAY_FOREVER,
+ connection.getUIConnector().getWidget())
.show(LOOP_ABORT_MESSAGE, VNotification.CENTERED,
"error");
}
@@ -608,15 +609,14 @@ public class LayoutManager {
pendingOverflowFixes = FastStringSet.create();
}
- getLogger().info(
- "Total layout phase time: " + totalDuration.elapsedMillis()
- + "ms");
+ getLogger().info("Total layout phase time: "
+ + totalDuration.elapsedMillis() + "ms");
}
private void logConnectorStatus(int connectorId) {
- currentDependencyTree
- .logDependencyStatus((ComponentConnector) ConnectorMap.get(
- connection).getConnector(Integer.toString(connectorId)));
+ currentDependencyTree.logDependencyStatus(
+ (ComponentConnector) ConnectorMap.get(connection)
+ .getConnector(Integer.toString(connectorId)));
}
private int measureConnectors(LayoutDependencyTree layoutDependencyTree,
@@ -644,12 +644,10 @@ public class LayoutManager {
}
if (debugLogging) {
- getLogger()
- .info("Doing overflow fix for "
- + Util.getConnectorString(componentConnector)
- + " in "
- + Util.getConnectorString(componentConnector
- .getParent()));
+ getLogger().info("Doing overflow fix for "
+ + Util.getConnectorString(componentConnector)
+ + " in " + Util.getConnectorString(
+ componentConnector.getParent()));
}
Profiler.enter("Overflow fix apply");
@@ -767,9 +765,8 @@ public class LayoutManager {
return true;
}
ServerConnector parent = componentConnector.getParent();
- if (parent instanceof ComponentConnector
- && !currentDependencyTree
- .noMoreChangesExpected((ComponentConnector) parent)) {
+ if (parent instanceof ComponentConnector && !currentDependencyTree
+ .noMoreChangesExpected((ComponentConnector) parent)) {
return true;
}
@@ -826,9 +823,8 @@ public class LayoutManager {
measuredAndUpdate(element, getMeasuredSize(element, null));
}
Profiler.leave("LayoutManager.measureNonConenctors");
- getLogger().info(
- "Measured " + measuredNonConnectorElements.size()
- + " non connector elements");
+ getLogger().info("Measured " + measuredNonConnectorElements.size()
+ + " non connector elements");
}
private MeasureResult measuredAndUpdate(Element element,
@@ -895,7 +891,7 @@ public class LayoutManager {
* to explicitly cause some layout to be considered in an ongoing layout
* phase, you should use {@link #setNeedsMeasure(ComponentConnector)}
* instead.
- *
+ *
* @param layout
* the managed layout that should be layouted
*/
@@ -917,15 +913,14 @@ public class LayoutManager {
* to explicitly cause some layout to be considered in an ongoing layout
* phase, you should use {@link #setNeedsMeasure(ComponentConnector)}
* instead.
- *
+ *
* @param layout
* the managed layout that should be layouted
*/
public final void setNeedsHorizontalLayout(ManagedLayout layout) {
if (isLayoutRunning()) {
- getLogger()
- .warning(
- "setNeedsHorizontalLayout should not be run while a layout phase is in progress.");
+ getLogger().warning(
+ "setNeedsHorizontalLayout should not be run while a layout phase is in progress.");
}
needsHorizontalLayout.add(layout.getConnectorId());
}
@@ -943,15 +938,14 @@ public class LayoutManager {
* to explicitly cause some layout to be considered in an ongoing layout
* phase, you should use {@link #setNeedsMeasure(ComponentConnector)}
* instead.
- *
+ *
* @param layout
* the managed layout that should be layouted
*/
public final void setNeedsVerticalLayout(ManagedLayout layout) {
if (isLayoutRunning()) {
- getLogger()
- .warning(
- "setNeedsVerticalLayout should not be run while a layout phase is in progress.");
+ getLogger().warning(
+ "setNeedsVerticalLayout should not be run while a layout phase is in progress.");
}
needsVerticalLayout.add(layout.getConnectorId());
}
@@ -966,22 +960,23 @@ public class LayoutManager {
*
Elements for which at least one ManagedLayout has registered a
* dependency
*
- *
+ *
* -1 is returned if the element has not been measured. If 0 is returned, it
* might indicate that the element is not attached to the DOM.
*
* The value returned by this method is always rounded up. To get the exact
* outer width, use {@link #getOuterHeightDouble(Element)}
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured outer height (including margins, paddings and
* borders) of the element in pixels.
*/
public final int getOuterHeight(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
- return (int) Math.ceil(getMeasuredSize(element, nullSize)
- .getOuterHeight());
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
+ return (int) Math
+ .ceil(getMeasuredSize(element, nullSize).getOuterHeight());
}
/**
@@ -994,10 +989,10 @@ public class LayoutManager {
*
Elements for which at least one ManagedLayout has registered a
* dependency
*
- *
+ *
* -1 is returned if the element has not been measured. If 0 is returned, it
* might indicate that the element is not attached to the DOM.
- *
+ *
* @since 7.5.1
* @param element
* the element to get the measured size for
@@ -1005,7 +1000,8 @@ public class LayoutManager {
* borders) of the element in pixels.
*/
public final double getOuterHeightDouble(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getOuterHeight();
}
@@ -1019,13 +1015,13 @@ public class LayoutManager {
*
Elements for which at least one ManagedLayout has registered a
* dependency
*
- *
+ *
* -1 is returned if the element has not been measured. If 0 is returned, it
* might indicate that the element is not attached to the DOM.
*
* The value returned by this method is always rounded up. To get the exact
* outer width, use {@link #getOuterWidthDouble(Element)}
- *
+ *
* @since 7.5.1
* @param element
* the element to get the measured size for
@@ -1033,9 +1029,10 @@ public class LayoutManager {
* borders) of the element in pixels.
*/
public final int getOuterWidth(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
- return (int) Math.ceil(getMeasuredSize(element, nullSize)
- .getOuterWidth());
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
+ return (int) Math
+ .ceil(getMeasuredSize(element, nullSize).getOuterWidth());
}
/**
@@ -1048,17 +1045,18 @@ public class LayoutManager {
*
Elements for which at least one ManagedLayout has registered a
* dependency
*
- *
+ *
* -1 is returned if the element has not been measured. If 0 is returned, it
* might indicate that the element is not attached to the DOM.
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured outer width (including margins, paddings and
* borders) of the element in pixels.
*/
public final double getOuterWidthDouble(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getOuterWidth();
}
@@ -1072,22 +1070,23 @@ public class LayoutManager {
*
Elements for which at least one ManagedLayout has registered a
* dependency
*
- *
+ *
* -1 is returned if the element has not been measured. If 0 is returned, it
* might indicate that the element is not attached to the DOM.
*
* The value returned by this method is always rounded up. To get the exact
* outer width, use {@link #getInnerHeightDouble(Element)}
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured inner height (excluding margins, paddings and
* borders) of the element in pixels.
*/
public final int getInnerHeight(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
- return (int) Math.ceil(getMeasuredSize(element, nullSize)
- .getInnerHeight());
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
+ return (int) Math
+ .ceil(getMeasuredSize(element, nullSize).getInnerHeight());
}
/**
@@ -1100,10 +1099,10 @@ public class LayoutManager {
*
Elements for which at least one ManagedLayout has registered a
* dependency
*
- *
+ *
* -1 is returned if the element has not been measured. If 0 is returned, it
* might indicate that the element is not attached to the DOM.
- *
+ *
* @since 7.5.1
* @param element
* the element to get the measured size for
@@ -1111,7 +1110,8 @@ public class LayoutManager {
* borders) of the element in pixels.
*/
public final double getInnerHeightDouble(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getInnerHeight();
}
@@ -1125,22 +1125,23 @@ public class LayoutManager {
*
Elements for which at least one ManagedLayout has registered a
* dependency
*
- *
+ *
* -1 is returned if the element has not been measured. If 0 is returned, it
* might indicate that the element is not attached to the DOM.
*
* The value returned by this method is always rounded up. To get the exact
* outer width, use {@link #getOuterHeightDouble(Element)}
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured inner width (excluding margins, paddings and
* borders) of the element in pixels.
*/
public final int getInnerWidth(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
- return (int) Math.ceil(getMeasuredSize(element, nullSize)
- .getInnerWidth());
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
+ return (int) Math
+ .ceil(getMeasuredSize(element, nullSize).getInnerWidth());
}
/**
@@ -1153,10 +1154,10 @@ public class LayoutManager {
*
Elements for which at least one ManagedLayout has registered a
* dependency
*
- *
+ *
* -1 is returned if the element has not been measured. If 0 is returned, it
* might indicate that the element is not attached to the DOM.
- *
+ *
* @since 7.5.1
* @param element
* the element to get the measured size for
@@ -1164,7 +1165,8 @@ public class LayoutManager {
* borders) of the element in pixels.
*/
public final double getInnerWidthDouble(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getInnerWidth();
}
@@ -1178,18 +1180,19 @@ public class LayoutManager {
*
Elements for which at least one ManagedLayout has registered a
* dependency
*
- *
+ *
* A negative number is returned if the element has not been measured. If 0
* is returned, it might indicate that the element is not attached to the
* DOM.
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured border height (top border + bottom border) of the
* element in pixels.
*/
public final int getBorderHeight(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getBorderHeight();
}
@@ -1203,18 +1206,19 @@ public class LayoutManager {
*
Elements for which at least one ManagedLayout has registered a
* dependency
*
- *
+ *
* A negative number is returned if the element has not been measured. If 0
* is returned, it might indicate that the element is not attached to the
* DOM.
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured padding height (top padding + bottom padding) of the
* element in pixels.
*/
public int getPaddingHeight(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getPaddingHeight();
}
@@ -1228,18 +1232,19 @@ public class LayoutManager {
*
Elements for which at least one ManagedLayout has registered a
* dependency
*
- *
+ *
* A negative number is returned if the element has not been measured. If 0
* is returned, it might indicate that the element is not attached to the
* DOM.
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured border width (left border + right border) of the
* element in pixels.
*/
public int getBorderWidth(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getBorderWidth();
}
@@ -1252,17 +1257,18 @@ public class LayoutManager {
*
Elements for which at least one ManagedLayout has registered a
* dependency
*
- *
+ *
* A negative number is returned if the element has not been measured. If 0
* is returned, it might indicate that the element is not attached to the
* DOM.
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured top border of the element in pixels.
*/
public int getBorderTop(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getBorderTop();
}
@@ -1275,17 +1281,18 @@ public class LayoutManager {
*
Elements for which at least one ManagedLayout has registered a
* dependency
*
- *
+ *
* A negative number is returned if the element has not been measured. If 0
* is returned, it might indicate that the element is not attached to the
* DOM.
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured left border of the element in pixels.
*/
public int getBorderLeft(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getBorderLeft();
}
@@ -1298,17 +1305,18 @@ public class LayoutManager {
*
Elements for which at least one ManagedLayout has registered a
* dependency
*
- *
+ *
* A negative number is returned if the element has not been measured. If 0
* is returned, it might indicate that the element is not attached to the
* DOM.
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured bottom border of the element in pixels.
*/
public int getBorderBottom(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getBorderBottom();
}
@@ -1321,17 +1329,18 @@ public class LayoutManager {
*
Elements for which at least one ManagedLayout has registered a
* dependency
*
- *
+ *
* A negative number is returned if the element has not been measured. If 0
* is returned, it might indicate that the element is not attached to the
* DOM.
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured right border of the element in pixels.
*/
public int getBorderRight(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getBorderRight();
}
@@ -1345,18 +1354,19 @@ public class LayoutManager {
*
Elements for which at least one ManagedLayout has registered a
* dependency
*
- *
+ *
* A negative number is returned if the element has not been measured. If 0
* is returned, it might indicate that the element is not attached to the
* DOM.
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured padding width (left padding + right padding) of the
* element in pixels.
*/
public int getPaddingWidth(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getPaddingWidth();
}
@@ -1369,17 +1379,18 @@ public class LayoutManager {
*
Elements for which at least one ManagedLayout has registered a
* dependency
*
- *
+ *
* A negative number is returned if the element has not been measured. If 0
* is returned, it might indicate that the element is not attached to the
* DOM.
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured top padding of the element in pixels.
*/
public int getPaddingTop(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getPaddingTop();
}
@@ -1392,17 +1403,18 @@ public class LayoutManager {
*
Elements for which at least one ManagedLayout has registered a
* dependency
*
- *
+ *
* A negative number is returned if the element has not been measured. If 0
* is returned, it might indicate that the element is not attached to the
* DOM.
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured left padding of the element in pixels.
*/
public int getPaddingLeft(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getPaddingLeft();
}
@@ -1415,17 +1427,18 @@ public class LayoutManager {
*
Elements for which at least one ManagedLayout has registered a
* dependency
*
- *
+ *
* A negative number is returned if the element has not been measured. If 0
* is returned, it might indicate that the element is not attached to the
* DOM.
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured bottom padding of the element in pixels.
*/
public int getPaddingBottom(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getPaddingBottom();
}
@@ -1438,17 +1451,18 @@ public class LayoutManager {
*
Elements for which at least one ManagedLayout has registered a
* dependency
*
- *
+ *
* A negative number is returned if the element has not been measured. If 0
* is returned, it might indicate that the element is not attached to the
* DOM.
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured right padding of the element in pixels.
*/
public int getPaddingRight(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getPaddingRight();
}
@@ -1461,17 +1475,18 @@ public class LayoutManager {
*
Elements for which at least one ManagedLayout has registered a
* dependency
*
- *
+ *
* A negative number is returned if the element has not been measured. If 0
* is returned, it might indicate that the element is not attached to the
* DOM.
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured top margin of the element in pixels.
*/
public int getMarginTop(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getMarginTop();
}
@@ -1484,17 +1499,18 @@ public class LayoutManager {
*
Elements for which at least one ManagedLayout has registered a
* dependency
*
- *
+ *
* A negative number is returned if the element has not been measured. If 0
* is returned, it might indicate that the element is not attached to the
* DOM.
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured right margin of the element in pixels.
*/
public int getMarginRight(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getMarginRight();
}
@@ -1507,17 +1523,18 @@ public class LayoutManager {
*
Elements for which at least one ManagedLayout has registered a
* dependency
*
- *
+ *
* A negative number is returned if the element has not been measured. If 0
* is returned, it might indicate that the element is not attached to the
* DOM.
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured bottom margin of the element in pixels.
*/
public int getMarginBottom(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getMarginBottom();
}
@@ -1530,17 +1547,18 @@ public class LayoutManager {
*
Elements for which at least one ManagedLayout has registered a
* dependency
*
- *
+ *
* A negative number is returned if the element has not been measured. If 0
* is returned, it might indicate that the element is not attached to the
* DOM.
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured left margin of the element in pixels.
*/
public int getMarginLeft(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getMarginLeft();
}
@@ -1553,11 +1571,11 @@ public class LayoutManager {
*
Elements for which at least one ManagedLayout has registered a
* dependency
*
- *
+ *
* A negative number is returned if the element has not been measured. If 0
* is returned, it might indicate that the element is not attached to the
* DOM.
- *
+ *
* @param element
* the element to get the measured margin for
* @return the measured top+bottom margin of the element in pixels.
@@ -1575,11 +1593,11 @@ public class LayoutManager {
*
Elements for which at least one ManagedLayout has registered a
* dependency
*
- *
+ *
* A negative number is returned if the element has not been measured. If 0
* is returned, it might indicate that the element is not attached to the
* DOM.
- *
+ *
* @param element
* the element to get the measured margin for
* @return the measured left+right margin of the element in pixels.
@@ -1594,14 +1612,15 @@ public class LayoutManager {
* informing the LayoutManager about what size a component will have, the
* layout propagation can continue directly without first measuring the
* potentially resized elements.
- *
+ *
* @param component
* the component for which the size is reported
* @param outerHeight
* the new outer height (including margins, borders and paddings)
* of the component in pixels
*/
- public void reportOuterHeight(ComponentConnector component, int outerHeight) {
+ public void reportOuterHeight(ComponentConnector component,
+ int outerHeight) {
Element element = component.getWidget().getElement();
MeasuredSize measuredSize = getMeasuredSize(element);
if (isLayoutRunning()) {
@@ -1623,7 +1642,7 @@ public class LayoutManager {
* LayoutManager about what size a component will have, the layout
* propagation can continue directly without first measuring the potentially
* resized elements.
- *
+ *
* @param component
* the relatively sized component for which the size is reported
* @param assignedHeight
@@ -1634,8 +1653,8 @@ public class LayoutManager {
int assignedHeight) {
assert component.isRelativeHeight();
- float percentSize = parsePercent(component.getState().height == null ? ""
- : component.getState().height);
+ float percentSize = parsePercent(component.getState().height == null
+ ? "" : component.getState().height);
int effectiveHeight = Math.round(assignedHeight * (percentSize / 100));
reportOuterHeight(component, effectiveHeight);
@@ -1647,7 +1666,7 @@ public class LayoutManager {
* LayoutManager about what size a component will have, the layout
* propagation can continue directly without first measuring the potentially
* resized elements.
- *
+ *
* @param component
* the relatively sized component for which the size is reported
* @param assignedWidth
@@ -1675,7 +1694,7 @@ public class LayoutManager {
* informing the LayoutManager about what size a component will have, the
* layout propagation can continue directly without first measuring the
* potentially resized elements.
- *
+ *
* @param component
* the component for which the size is reported
* @param outerWidth
@@ -1703,7 +1722,7 @@ public class LayoutManager {
* element changes. Adding a listener to an element also ensures that all
* sizes for that element will be available starting from the next layout
* phase.
- *
+ *
* @param element
* the element that should be checked for size changes
* @param listener
@@ -1726,7 +1745,7 @@ public class LayoutManager {
* Removes an element resize listener from the provided element. This might
* cause this LayoutManager to stop tracking the size of the element if no
* other sources are interested in the size.
- *
+ *
* @param element
* the element to which the element resize listener was
* previously added
@@ -1765,7 +1784,7 @@ public class LayoutManager {
* {@link #setNeedsMeasureRecursively(ComponentConnector)} instead.
*
* If there is no upcoming layout phase, a new layout phase is scheduled.
- *
+ *
* @param component
* the component whose size might have changed.
*/
@@ -1788,7 +1807,7 @@ public class LayoutManager {
* {@link #setNeedsMeasure(ComponentConnector)} instead.
*
* If there is no upcoming layout phase, a new layout phase is scheduled.
- *
+ *
* @since 7.2
* @param component
* the component at the root of the component hierarchy to
@@ -1799,7 +1818,8 @@ public class LayoutManager {
if (component instanceof HasComponentsConnector) {
HasComponentsConnector hasComponents = (HasComponentsConnector) component;
- for (ComponentConnector child : hasComponents.getChildComponents()) {
+ for (ComponentConnector child : hasComponents
+ .getChildComponents()) {
setNeedsMeasureRecursively(child);
}
}
@@ -1821,13 +1841,14 @@ public class LayoutManager {
/**
* Checks if there is something waiting for a layout to take place.
- *
+ *
* @since 7.5.6
* @return true if there are connectors waiting for measurement or layout,
* false otherwise
*/
public boolean isLayoutNeeded() {
- if (!needsHorizontalLayout.isEmpty() || !needsVerticalLayout.isEmpty()) {
+ if (!needsHorizontalLayout.isEmpty()
+ || !needsVerticalLayout.isEmpty()) {
return true;
}
if (!needsMeasure.isEmpty()) {
diff --git a/client/src/main/java/com/vaadin/client/LayoutManagerIE8.java b/client/src/main/java/com/vaadin/client/LayoutManagerIE8.java
index 479155d0e6..603ac03337 100644
--- a/client/src/main/java/com/vaadin/client/LayoutManagerIE8.java
+++ b/client/src/main/java/com/vaadin/client/LayoutManagerIE8.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -29,10 +29,10 @@ import com.google.gwt.user.client.ui.RootPanel;
* element in IE8 seems to make the browser think the element has changed in a
* way that requires a reflow. To work around that, the MeasureData is instead
* stored in Map for IE8.
- *
+ *
* This implementation is injected for IE8 by a replace-with definition in the
* GWT module.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
diff --git a/client/src/main/java/com/vaadin/client/LocaleNotLoadedException.java b/client/src/main/java/com/vaadin/client/LocaleNotLoadedException.java
index 6f59e786e4..6d2cbf28ae 100644
--- a/client/src/main/java/com/vaadin/client/LocaleNotLoadedException.java
+++ b/client/src/main/java/com/vaadin/client/LocaleNotLoadedException.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
diff --git a/client/src/main/java/com/vaadin/client/LocaleService.java b/client/src/main/java/com/vaadin/client/LocaleService.java
index dcd1c9ea4e..490101285b 100644
--- a/client/src/main/java/com/vaadin/client/LocaleService.java
+++ b/client/src/main/java/com/vaadin/client/LocaleService.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -27,9 +27,9 @@ import com.vaadin.shared.ui.ui.UIState.LocaleData;
/**
* Date / time etc. localisation service for all widgets. Caches all loaded
* locales as JSONObjects.
- *
+ *
* @author Vaadin Ltd.
- *
+ *
*/
public class LocaleService {
diff --git a/client/src/main/java/com/vaadin/client/MeasuredSize.java b/client/src/main/java/com/vaadin/client/MeasuredSize.java
index 2099008350..7f95d1826a 100644
--- a/client/src/main/java/com/vaadin/client/MeasuredSize.java
+++ b/client/src/main/java/com/vaadin/client/MeasuredSize.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -205,7 +205,8 @@ public class MeasuredSize {
heightChanged = true;
}
if (!widthChanged && hasWidthChanged(this.paddings, paddings)) {
- debugSizeChange(element, "Width (padding)", this.paddings, paddings);
+ debugSizeChange(element, "Width (padding)", this.paddings,
+ paddings);
widthChanged = true;
}
this.paddings = paddings;
@@ -278,9 +279,8 @@ public class MeasuredSize {
private void debugSizeChange(Element element, String sizeChangeType,
String changedFrom, String changedTo) {
if (debugSizeChanges) {
- getLogger()
- .info(sizeChangeType + " has changed from " + changedFrom
- + " to " + changedTo + " for " + element.toString());
+ getLogger().info(sizeChangeType + " has changed from " + changedFrom
+ + " to " + changedTo + " for " + element.toString());
}
}
diff --git a/client/src/main/java/com/vaadin/client/MouseEventDetailsBuilder.java b/client/src/main/java/com/vaadin/client/MouseEventDetailsBuilder.java
index 11ebe3925c..62b96ee712 100644
--- a/client/src/main/java/com/vaadin/client/MouseEventDetailsBuilder.java
+++ b/client/src/main/java/com/vaadin/client/MouseEventDetailsBuilder.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -24,16 +24,16 @@ import com.vaadin.shared.MouseEventDetails.MouseButton;
/**
* Helper class for constructing a MouseEventDetails object from a
* {@link NativeEvent}.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
- *
+ *
*/
public class MouseEventDetailsBuilder {
/**
* Construct a {@link MouseEventDetails} object from the given event
- *
+ *
* @param evt
* The event to use as a source for the details
* @return a MouseEventDetails containing information from the event
@@ -44,7 +44,7 @@ public class MouseEventDetailsBuilder {
/**
* Construct a {@link MouseEventDetails} object from the given event
- *
+ *
* @param evt
* The event to use as a source for the details
* @param relativeToElement
diff --git a/client/src/main/java/com/vaadin/client/Paintable.java b/client/src/main/java/com/vaadin/client/Paintable.java
index 34f2d0714f..1e3ca24dca 100644
--- a/client/src/main/java/com/vaadin/client/Paintable.java
+++ b/client/src/main/java/com/vaadin/client/Paintable.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -20,7 +20,7 @@ package com.vaadin.client;
* An interface used by client-side widgets or paintable parts to receive
* updates from the corresponding server-side components in the form of
* {@link UIDL}.
- *
+ *
* Updates can be sent back to the server using the
* {@link ApplicationConnection#updateVariable()} methods.
*/
diff --git a/client/src/main/java/com/vaadin/client/Profiler.java b/client/src/main/java/com/vaadin/client/Profiler.java
index 3923b66218..b5123bbaa7 100644
--- a/client/src/main/java/com/vaadin/client/Profiler.java
+++ b/client/src/main/java/com/vaadin/client/Profiler.java
@@ -69,7 +69,7 @@ public class Profiler {
* Interface for getting data from the {@link Profiler}.
*
* Warning! This interface is most likely to change in the future
- *
+ *
* @since 7.1
* @author Vaadin Ltd
*/
@@ -98,7 +98,7 @@ public class Profiler {
/**
* Create a new node with the given name.
- *
+ *
* @param name
*/
public Node(String name) {
@@ -107,7 +107,7 @@ public class Profiler {
/**
* Gets the name of the node
- *
+ *
* @return the name of the node
*/
public String getName() {
@@ -117,7 +117,7 @@ public class Profiler {
/**
* Creates a new child node or retrieves and existing child and updates
* its total time and hit count.
- *
+ *
* @param name
* the name of the child
* @param timestamp
@@ -138,7 +138,7 @@ public class Profiler {
/**
* Gets the total time spent in this node, including time spent in sub
* nodes
- *
+ *
* @return the total time spent, in milliseconds
*/
public double getTimeSpent() {
@@ -148,7 +148,7 @@ public class Profiler {
/**
* Gets the minimum time spent for one invocation of this node,
* including time spent in sub nodes
- *
+ *
* @return the time spent for the fastest invocation, in milliseconds
*/
public double getMinTimeSpent() {
@@ -158,7 +158,7 @@ public class Profiler {
/**
* Gets the maximum time spent for one invocation of this node,
* including time spent in sub nodes
- *
+ *
* @return the time spent for the slowest invocation, in milliseconds
*/
public double getMaxTimeSpent() {
@@ -167,7 +167,7 @@ public class Profiler {
/**
* Gets the number of times this node has been entered
- *
+ *
* @return the number of times the node has been entered
*/
public int getCount() {
@@ -177,7 +177,7 @@ public class Profiler {
/**
* Gets the total time spent in this node, excluding time spent in sub
* nodes
- *
+ *
* @return the total time spent, in milliseconds
*/
public double getOwnTime() {
@@ -190,14 +190,15 @@ public class Profiler {
/**
* Gets the child nodes of this node
- *
+ *
* @return a collection of child nodes
*/
public Collection getChildren() {
return Collections.unmodifiableCollection(children.values());
}
- private void buildRecursiveString(StringBuilder builder, String prefix) {
+ private void buildRecursiveString(StringBuilder builder,
+ String prefix) {
if (getName() != null) {
String msg = getStringRepresentation(prefix);
builder.append(msg + '\n');
@@ -220,9 +221,7 @@ public class Profiler {
String msg = prefix + " " + getName() + " in "
+ roundToSignificantFigures(getTimeSpent()) + " ms.";
if (getCount() > 1) {
- msg += " Invoked "
- + getCount()
- + " times ("
+ msg += " Invoked " + getCount() + " times ("
+ roundToSignificantFigures(getTimeSpent() / getCount())
+ " ms per time, min "
+ roundToSignificantFigures(getMinTimeSpent())
@@ -270,10 +269,10 @@ public class Profiler {
totalNode.time += getOwnTime();
totalNode.count += getCount();
- totalNode.minTime = roundToSignificantFigures(Math.min(
- totalNode.minTime, getMinTimeSpent()));
- totalNode.maxTime = roundToSignificantFigures(Math.max(
- totalNode.maxTime, getMaxTimeSpent()));
+ totalNode.minTime = roundToSignificantFigures(
+ Math.min(totalNode.minTime, getMinTimeSpent()));
+ totalNode.maxTime = roundToSignificantFigures(
+ Math.max(totalNode.maxTime, getMaxTimeSpent()));
}
for (Node node : children.values()) {
node.sumUpTotals(totals);
@@ -390,7 +389,7 @@ public class Profiler {
* Returns time relative to the particular page load time. The value should
* not be used directly but rather difference between two values returned by
* this method should be used to compare measurements.
- *
+ *
* @since 7.6
*/
public static double getRelativeTimeMillis() {
@@ -468,9 +467,8 @@ public class Profiler {
stack.add(rootNode);
JsArray gwtStatsEvents = getGwtStatsEvents();
if (gwtStatsEvents.length() == 0) {
- getLogger()
- .warning(
- "No profiling events recorded, this might happen if another __gwtStatsEvent handler is installed.");
+ getLogger().warning(
+ "No profiling events recorded, this might happen if another __gwtStatsEvent handler is installed.");
return;
}
@@ -503,10 +501,8 @@ public class Profiler {
if (type.equals("end")) {
if (!inEvent) {
- getLogger().severe(
- "Got end event for " + eventName
- + " but is currently in "
- + stackTop.getName());
+ getLogger().severe("Got end event for " + eventName
+ + " but is currently in " + stackTop.getName());
return;
}
Node previousStackTop = stack.removeLast();
@@ -516,8 +512,9 @@ public class Profiler {
previousStackTop.leave(gwtStatsEvent.getMillis());
}
} else {
- double millis = isExtendedEvent ? gwtStatsEvent
- .getRelativeMillis() : gwtStatsEvent.getMillis();
+ double millis = isExtendedEvent
+ ? gwtStatsEvent.getRelativeMillis()
+ : gwtStatsEvent.getMillis();
if (!inEvent) {
stackTop = stackTop.enterChild(eventName, millis);
stack.add(stackTop);
@@ -538,9 +535,8 @@ public class Profiler {
}
if (stack.size() != 1) {
- getLogger().warning(
- "Not all nodes are left, the last node is "
- + stack.getLast().getName());
+ getLogger().warning("Not all nodes are left, the last node is "
+ + stack.getLast().getName());
return;
}
@@ -600,8 +596,8 @@ public class Profiler {
}
if (timings.isEmpty()) {
- getLogger()
- .info("Bootstrap timings not supported, please ensure your browser supports performance.timing");
+ getLogger().info(
+ "Bootstrap timings not supported, please ensure your browser supports performance.timing");
return;
}
@@ -675,7 +671,8 @@ public class Profiler {
public static void setProfilerResultConsumer(
ProfilerResultConsumer profilerResultConsumer) {
if (consumer != null) {
- throw new IllegalStateException("The consumer has already been set");
+ throw new IllegalStateException(
+ "The consumer has already been set");
}
consumer = profilerResultConsumer;
}
@@ -697,8 +694,8 @@ public class Profiler {
double getRelativeTime();
}
- private static class DefaultRelativeTimeSupplier implements
- RelativeTimeSupplier {
+ private static class DefaultRelativeTimeSupplier
+ implements RelativeTimeSupplier {
@Override
public native double getRelativeTime()
@@ -707,8 +704,8 @@ public class Profiler {
}-*/;
}
- private static class HighResolutionTimeSupplier implements
- RelativeTimeSupplier {
+ private static class HighResolutionTimeSupplier
+ implements RelativeTimeSupplier {
@Override
public native double getRelativeTime()
diff --git a/client/src/main/java/com/vaadin/client/RenderInformation.java b/client/src/main/java/com/vaadin/client/RenderInformation.java
index 8fd3fc7e0b..dbc08dc8d2 100644
--- a/client/src/main/java/com/vaadin/client/RenderInformation.java
+++ b/client/src/main/java/com/vaadin/client/RenderInformation.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -20,9 +20,9 @@ import com.google.gwt.user.client.DOM;
/**
* Contains size information about a rendered container and its content area.
- *
+ *
* @author Artur Signell
- *
+ *
*/
public class RenderInformation {
@@ -48,9 +48,9 @@ public class RenderInformation {
/**
* Update the size of the widget.
- *
+ *
* @param widget
- *
+ *
* @return true if the size has changed since last update
* @deprecated As of 7.2, call and override {@link #updateSize(Element)}
* instead
@@ -69,11 +69,11 @@ public class RenderInformation {
/**
* Update the size of the widget.
- *
+ *
* @param widget
- *
+ *
* @return true if the size has changed since last update
- *
+ *
* @since 7.2
*/
public boolean updateSize(Element element) {
diff --git a/client/src/main/java/com/vaadin/client/RenderSpace.java b/client/src/main/java/com/vaadin/client/RenderSpace.java
index dff774aa6f..cceb9102ab 100644
--- a/client/src/main/java/com/vaadin/client/RenderSpace.java
+++ b/client/src/main/java/com/vaadin/client/RenderSpace.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
diff --git a/client/src/main/java/com/vaadin/client/ResourceLoader.java b/client/src/main/java/com/vaadin/client/ResourceLoader.java
index 559768d09c..6bf0e7a4e8 100644
--- a/client/src/main/java/com/vaadin/client/ResourceLoader.java
+++ b/client/src/main/java/com/vaadin/client/ResourceLoader.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -37,11 +37,11 @@ import com.google.gwt.user.client.Timer;
/**
* ResourceLoader lets you dynamically include external scripts and styles on
* the page and lets you know when the resource has been loaded.
- *
+ *
* You can also preload resources, allowing them to get cached by the browser
* without being evaluated. This enables downloading multiple resources at once
* while still controlling in which order e.g. scripts are executed.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@@ -56,7 +56,7 @@ public class ResourceLoader {
/**
* Creates a new event.
- *
+ *
* @param loader
* the resource loader that has loaded the resource
* @param resourceUrl
@@ -74,7 +74,7 @@ public class ResourceLoader {
/**
* Gets the resource loader that has fired this event
- *
+ *
* @return the resource loader
*/
public ResourceLoader getResourceLoader() {
@@ -83,7 +83,7 @@ public class ResourceLoader {
/**
* Gets the absolute url of the loaded resource.
- *
+ *
* @return the absolute url of the loaded resource
*/
public String getResourceUrl() {
@@ -93,9 +93,9 @@ public class ResourceLoader {
/**
* Returns true if the resource has been preloaded, false if it's fully
* loaded
- *
+ *
* @see ResourceLoader#preloadResource(String, ResourceLoadListener)
- *
+ *
* @return true if the resource has been preloaded, false if it's fully
* loaded
*/
@@ -112,9 +112,9 @@ public class ResourceLoader {
* Notifies this ResourceLoadListener that a resource has been loaded.
* Some browsers do not support any way of detecting load errors. In
* these cases, onLoad will be called regardless of the status.
- *
+ *
* @see ResourceLoadEvent
- *
+ *
* @param event
* a resource load event with information about the loaded
* resource
@@ -127,9 +127,9 @@ public class ResourceLoader {
* server did not respond. Some browsers do not support any way of
* detecting load errors. In these cases, onLoad will be called
* regardless of the status.
- *
+ *
* @see ResourceLoadEvent
- *
+ *
* @param event
* a resource load event with information about the resource
* that could not be loaded.
@@ -183,7 +183,7 @@ public class ResourceLoader {
/**
* Returns the default ResourceLoader
- *
+ *
* @return the default ResourceLoader
*/
public static ResourceLoader get() {
@@ -195,8 +195,8 @@ public class ResourceLoader {
* this method when the script is currently loading or already loaded
* doesn't cause the script to be loaded again, but the listener will still
* be notified when appropriate.
- *
- *
+ *
+ *
* @param scriptUrl
* the url of the script to load
* @param resourceLoadListener
@@ -213,8 +213,8 @@ public class ResourceLoader {
* this method when the script is currently loading or already loaded
* doesn't cause the script to be loaded again, but the listener will still
* be notified when appropriate.
- *
- *
+ *
+ *
* @param scriptUrl
* url of script to load
* @param resourceLoadListener
@@ -278,7 +278,7 @@ public class ResourceLoader {
/**
* The current browser supports script.async='false' for maintaining
* execution order for dynamically-added scripts.
- *
+ *
* @return Browser supports script.async='false'
* @since 7.2.4
*/
@@ -292,12 +292,12 @@ public class ResourceLoader {
* preloaded, it will be present in the browser's cache (provided the HTTP
* headers allow caching), making a subsequent load operation complete
* without having to wait for the resource to be downloaded again.
- *
+ *
* Calling this method when the resource is currently loading, currently
* preloading, already preloaded or already loaded doesn't cause the
* resource to be preloaded again, but the listener will still be notified
* when appropriate.
- *
+ *
* @param url
* the url of the resource to preload
* @param resourceLoadListener
@@ -378,7 +378,7 @@ public class ResourceLoader {
* Adds an onload listener to the given element, which should be a link or a
* script tag. The listener is called whenever loading is complete or an
* error occurred.
- *
+ *
* @since 7.3
* @param element
* the element to attach a listener to
@@ -414,7 +414,7 @@ public class ResourceLoader {
* Calling this method when the stylesheet is currently loading or already
* loaded doesn't cause the stylesheet to be loaded again, but the listener
* will still be notified when appropriate.
- *
+ *
* @param stylesheetUrl
* the url of the stylesheet to load
* @param resourceLoadListener
diff --git a/client/src/main/java/com/vaadin/client/ServerConnector.java b/client/src/main/java/com/vaadin/client/ServerConnector.java
index 0bc2ac9995..29994961d5 100644
--- a/client/src/main/java/com/vaadin/client/ServerConnector.java
+++ b/client/src/main/java/com/vaadin/client/ServerConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -29,7 +29,7 @@ import com.vaadin.shared.communication.SharedState;
* Interface implemented by all client side classes that can be communicate with
* the server. Classes implementing this interface are initialized by the
* framework when needed and have the ability to communicate with the server.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@@ -37,7 +37,7 @@ public interface ServerConnector extends Connector {
/**
* Gets ApplicationConnection instance that created this connector.
- *
+ *
* @return The ApplicationConnection as set by
* {@link #doInit(String, ApplicationConnection)}
*/
@@ -47,13 +47,13 @@ public interface ServerConnector extends Connector {
* Tests whether the connector is enabled or not. This method checks that
* the connector is enabled in context, i.e. if the parent connector is
* disabled, this method must return false.
- *
+ *
* @return true if the connector is enabled, false otherwise
*/
public boolean isEnabled();
/**
- *
+ *
* Called once by the framework to initialize the connector.
*
* Note that the shared state is not yet available at this point nor any
@@ -64,9 +64,9 @@ public interface ServerConnector extends Connector {
/**
* For internal use by the framework: returns the registered RPC
* implementations for an RPC interface identifier.
- *
+ *
* TODO interface identifier type or format may change
- *
+ *
* @param rpcInterfaceId
* RPC interface identifier: fully qualified interface type name
* @return RPC interface implementations registered for an RPC interface,
@@ -78,18 +78,19 @@ public interface ServerConnector extends Connector {
/**
* Adds a handler that is called whenever any part of the state has been
* updated by the server.
- *
+ *
* @param handler
* The handler that should be added.
* @return A handler registration reference that can be used to unregister
* the handler
*/
- public HandlerRegistration addStateChangeHandler(StateChangeHandler handler);
+ public HandlerRegistration addStateChangeHandler(
+ StateChangeHandler handler);
/**
* Removes a handler that is called whenever any part of the state has been
* updated by the server.
- *
+ *
* @param handler
* The handler that should be removed.
*/
@@ -98,7 +99,7 @@ public interface ServerConnector extends Connector {
/**
* Adds a handler that is called whenever the given part of the state has
* been updated by the server.
- *
+ *
* @param propertyName
* the name of the property for which the handler should be
* called
@@ -113,7 +114,7 @@ public interface ServerConnector extends Connector {
/**
* Removes a handler that is called whenever any part of the state has been
* updated by the server.
- *
+ *
* @param propertyName
* the name of the property for which the handler should be
* called
@@ -125,7 +126,7 @@ public interface ServerConnector extends Connector {
/**
* Sends the given event to all registered handlers.
- *
+ *
* @param event
* The event to send.
*/
@@ -139,7 +140,7 @@ public interface ServerConnector extends Connector {
/**
* Returns the parent of this connector. Can be null for only the root
* connector.
- *
+ *
* @return The parent of this connector, as set by
* {@link #setParent(ServerConnector)}.
*/
@@ -154,7 +155,7 @@ public interface ServerConnector extends Connector {
* Note that calling this method does not fire a
* {@link ConnectorHierarchyChangeEvent}. The event is fired only when the
* whole hierarchy has been updated.
- *
+ *
* @param parent
* The new parent of the connector
*/
@@ -171,7 +172,7 @@ public interface ServerConnector extends Connector {
* {@link HasComponentsConnector#setChildComponents(List)} and takes both
* extensions and child components. Both methods are called separately by
* the framework if the connector can have child components.
- *
+ *
* @param children
* The new child connectors (extensions and/or components)
*/
@@ -184,7 +185,7 @@ public interface ServerConnector extends Connector {
* Note that the method {@link HasComponentsConnector#getChildComponents()}
* can be used to obtain the subset of child connectors that correspond to
* components and not extensions.
- *
+ *
* @return A collection of child connectors (components or extensions) for
* this connector. An empty collection if there are no children.
* Never returns null.
@@ -193,12 +194,12 @@ public interface ServerConnector extends Connector {
/**
* Gets the current shared state of the connector.
- *
+ *
* Note that state is considered an internal part of the connector. You
* should not rely on the state object outside of the connector who owns it.
* If you depend on the state of other connectors you should use their
* public API instead of their state object directly.
- *
+ *
* @since 7.0.
* @return state The shared state object. Can be any sub type of
* {@link SharedState}. Never null.
@@ -208,7 +209,7 @@ public interface ServerConnector extends Connector {
/**
* Checks if an event listener has been registered on the server side for
* the given event identifier.
- *
+ *
* @param eventIdentifier
* The identifier for the event
* @return true if a listener has been registered on the server side, false
diff --git a/client/src/main/java/com/vaadin/client/SimpleTree.java b/client/src/main/java/com/vaadin/client/SimpleTree.java
index 3c63f54d5f..76d8cc6cdb 100644
--- a/client/src/main/java/com/vaadin/client/SimpleTree.java
+++ b/client/src/main/java/com/vaadin/client/SimpleTree.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -38,7 +38,7 @@ import com.google.gwt.user.client.ui.Widget;
/**
* @author Vaadin Ltd
- *
+ *
* @deprecated as of 7.1. This class was mainly used by the old debug console
* but is retained for now for backwards compatibility.
*/
@@ -81,14 +81,15 @@ public class SimpleTree extends ComplexPanel implements HasDoubleClickHandlers {
@Override
public void onClick(ClickEvent event) {
if (event.getNativeEvent().getEventTarget().cast() == handle) {
- if (children.getStyle().getDisplay().intern() == Display.NONE
- .getCssName()) {
+ if (children.getStyle().getDisplay()
+ .intern() == Display.NONE.getCssName()) {
open(event.getNativeEvent().getAltKey());
} else {
close();
}
- } else if (event.getNativeEvent().getEventTarget().cast() == text) {
+ } else if (event.getNativeEvent().getEventTarget()
+ .cast() == text) {
select(event);
}
}
@@ -146,7 +147,7 @@ public class SimpleTree extends ComplexPanel implements HasDoubleClickHandlers {
/**
* {@inheritDoc}
- *
+ *
* @deprecated As of 7.2, call and override {@link #add(Widget, Element)}
* instead.
*/
@@ -161,7 +162,7 @@ public class SimpleTree extends ComplexPanel implements HasDoubleClickHandlers {
/**
* {@inheritDoc}
- *
+ *
* @since 7.2
*/
@Override
@@ -173,20 +174,22 @@ public class SimpleTree extends ComplexPanel implements HasDoubleClickHandlers {
* {@inheritDoc} Events are not fired when double clicking child widgets.
*/
@Override
- public HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler) {
+ public HandlerRegistration addDoubleClickHandler(
+ DoubleClickHandler handler) {
if (textDoubleClickHandlerManager == null) {
textDoubleClickHandlerManager = new HandlerManager(this);
addDomHandler(new DoubleClickHandler() {
@Override
public void onDoubleClick(DoubleClickEvent event) {
- if (event.getNativeEvent().getEventTarget().cast() == text) {
+ if (event.getNativeEvent().getEventTarget()
+ .cast() == text) {
textDoubleClickHandlerManager.fireEvent(event);
}
}
}, DoubleClickEvent.getType());
}
- return textDoubleClickHandlerManager.addHandler(
- DoubleClickEvent.getType(), handler);
+ return textDoubleClickHandlerManager
+ .addHandler(DoubleClickEvent.getType(), handler);
}
}
diff --git a/client/src/main/java/com/vaadin/client/StyleConstants.java b/client/src/main/java/com/vaadin/client/StyleConstants.java
index fad88f1359..fe04fc7c46 100644
--- a/client/src/main/java/com/vaadin/client/StyleConstants.java
+++ b/client/src/main/java/com/vaadin/client/StyleConstants.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
diff --git a/client/src/main/java/com/vaadin/client/SuperDevMode.java b/client/src/main/java/com/vaadin/client/SuperDevMode.java
index f664244715..e6f9295c3c 100644
--- a/client/src/main/java/com/vaadin/client/SuperDevMode.java
+++ b/client/src/main/java/com/vaadin/client/SuperDevMode.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -30,10 +30,10 @@ import com.vaadin.client.ui.VNotification.HideEvent;
/**
* Class that enables SuperDevMode using a ?superdevmode parameter in the url.
- *
+ *
* @author Vaadin Ltd
* @since 7.0
- *
+ *
*/
public class SuperDevMode {
@@ -53,9 +53,8 @@ public class SuperDevMode {
private static void recompileWidgetsetAndStartInDevMode(
final String serverUrl) {
- getLogger().info(
- "Recompiling widgetset using " + serverUrl
- + " and then reloading in super dev mode");
+ getLogger().info("Recompiling widgetset using " + serverUrl
+ + " and then reloading in super dev mode");
VNotification n = new VNotification();
n.show("Recompiling widgetset, please wait",
VNotification.CENTERED, VNotification.STYLE_SYSTEM);
@@ -63,8 +62,9 @@ public class SuperDevMode {
JsonpRequestBuilder b = new JsonpRequestBuilder();
b.setCallbackParam("_callback");
b.setTimeout(COMPILE_TIMEOUT_IN_SECONDS * 1000);
- b.requestObject(serverUrl + "recompile/" + GWT.getModuleName() + "?"
- + getRecompileParameters(GWT.getModuleName()),
+ b.requestObject(
+ serverUrl + "recompile/" + GWT.getModuleName() + "?"
+ + getRecompileParameters(GWT.getModuleName()),
new AsyncCallback() {
@Override
@@ -77,8 +77,7 @@ public class SuperDevMode {
return;
}
- setSession(
- getSuperDevModeHookKey(),
+ setSession(getSuperDevModeHookKey(),
getSuperDevWidgetSetUrl(GWT.getModuleName(),
serverUrl));
setSession(SKIP_RECOMPILE, "1");
@@ -92,9 +91,8 @@ public class SuperDevMode {
getLogger().severe("JSONP compile call failed");
// Don't log exception as they are shown as
// notifications
- getLogger().severe(
- caught.getClass().getSimpleName() + ": "
- + caught.getMessage());
+ getLogger().severe(caught.getClass().getSimpleName()
+ + ": " + caught.getMessage());
failed();
}
@@ -127,13 +125,13 @@ public class SuperDevMode {
private native static String getRecompileParameters(String moduleName)
/*-{
var prop_map = $wnd.__gwt_activeModules[moduleName].bindings();
-
+
// convert map to URL parameter string
var props = [];
for (var key in prop_map) {
props.push(encodeURIComponent(key) + '=' + encodeURIComponent(prop_map[key]))
}
-
+
return props.join('&') + '&';
}-*/;
@@ -179,7 +177,7 @@ public class SuperDevMode {
/**
* The URL of the code server. The default URL (http://localhost:9876/) will
* be used if this is empty or null.
- *
+ *
* @param serverUrl
* The url of the code server or null to use the default
* @return true if recompile started, false if we are running in
@@ -243,7 +241,7 @@ public class SuperDevMode {
* method returns true. The application will be restarted once compilation
* is done and then this method will return false.
*
- *
+ *
* @return true if a recompile operation has started and the page will be
* reloaded once it is done, false if no recompilation will be done.
*/
@@ -254,9 +252,10 @@ public class SuperDevMode {
// in super dev mode, as a result of the recompile, the enabled
// check will fail...
if (!isSuperDevModeEnabledInModule()) {
- showError("SuperDevMode is disabled for this module/widgetset. "
- + "Ensure that your module definition (.gwt.xml) does not contain "
- + "<set-configuration-property name="devModeRedirectEnabled" value="false" /> ");
+ showError(
+ "SuperDevMode is disabled for this module/widgetset. "
+ + "Ensure that your module definition (.gwt.xml) does not contain "
+ + "<set-configuration-property name="devModeRedirectEnabled" value="false" /> ");
return false;
}
return SuperDevMode.recompileIfNeeded(superDevModeParameter);
diff --git a/client/src/main/java/com/vaadin/client/TooltipInfo.java b/client/src/main/java/com/vaadin/client/TooltipInfo.java
index c1dd5037eb..6e3e063be2 100644
--- a/client/src/main/java/com/vaadin/client/TooltipInfo.java
+++ b/client/src/main/java/com/vaadin/client/TooltipInfo.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -71,7 +71,7 @@ public class TooltipInfo {
/**
* Checks is a message has been defined for the tooltip.
- *
+ *
* @return true if title or error message is present, false if both are
* empty
*/
@@ -82,6 +82,7 @@ public class TooltipInfo {
public boolean equals(TooltipInfo other) {
return (other != null && SharedUtil.equals(other.title, title)
- && SharedUtil.equals(other.errorMessageHtml, errorMessageHtml) && other.identifier == identifier);
+ && SharedUtil.equals(other.errorMessageHtml, errorMessageHtml)
+ && other.identifier == identifier);
}
}
diff --git a/client/src/main/java/com/vaadin/client/UIDL.java b/client/src/main/java/com/vaadin/client/UIDL.java
index 2c2a5de308..4b1bd3c401 100644
--- a/client/src/main/java/com/vaadin/client/UIDL.java
+++ b/client/src/main/java/com/vaadin/client/UIDL.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -52,7 +52,7 @@ public final class UIDL extends JavaScriptObject {
* Shorthand for getting the attribute named "id", which for Paintables is
* the essential paintableId which binds the server side component to the
* client side widget.
- *
+ *
* @return the value of the id attribute, if available
*/
public String getId() {
@@ -69,7 +69,7 @@ public final class UIDL extends JavaScriptObject {
* internally and is not needed within
* {@link ComponentConnector#updateFromUIDL(UIDL, ApplicationConnection)
* updateFromUIDL()}.
- *
+ *
* @return the name for this section
*/
public native String getTag()
@@ -94,7 +94,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Gets the named attribute as a String.
- *
+ *
* @param name
* the name of the attribute to get
* @return the attribute value
@@ -105,7 +105,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Gets the names of the attributes available.
- *
+ *
* @return the names of available attributes
*/
public Set getAttributeNames() {
@@ -116,7 +116,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Gets the names of variables available.
- *
+ *
* @return the names of available variables
*/
public Set getVariableNames() {
@@ -130,7 +130,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Gets the named attribute as an int.
- *
+ *
* @param name
* the name of the attribute to get
* @return the attribute value
@@ -141,7 +141,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Gets the named attribute as a long.
- *
+ *
* @param name
* the name of the attribute to get
* @return the attribute value
@@ -152,7 +152,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Gets the named attribute as a float.
- *
+ *
* @param name
* the name of the attribute to get
* @return the attribute value
@@ -163,7 +163,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Gets the named attribute as a double.
- *
+ *
* @param name
* the name of the attribute to get
* @return the attribute value
@@ -174,7 +174,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Gets the named attribute as a boolean.
- *
+ *
* @param name
* the name of the attribute to get
* @return the attribute value
@@ -185,7 +185,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Gets the named attribute as a Map of named values (key/value pairs).
- *
+ *
* @param name
* the name of the attribute to get
* @return the attribute Map
@@ -196,7 +196,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Gets the named attribute as an array of Strings.
- *
+ *
* @param name
* the name of the attribute to get
* @return the attribute value
@@ -207,7 +207,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Gets the named attribute as an int array.
- *
+ *
* @param name
* the name of the attribute to get
* @return the attribute value
@@ -218,7 +218,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Get attributes value as string whatever the type is
- *
+ *
* @param name
* @return string presentation of attribute
*/
@@ -234,7 +234,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Indicates whether or not the named attribute is available.
- *
+ *
* @param name
* the name of the attribute to check
* @return true if the attribute is available, false otherwise
@@ -245,7 +245,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Gets the UIDL for the child at the given index.
- *
+ *
* @param i
* the index of the child to get
* @return the UIDL of the child if it exists
@@ -257,7 +257,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Gets the child at the given index as a String.
- *
+ *
* @param i
* the index of the child to get
* @return the String representation of the child if it exists
@@ -286,7 +286,7 @@ public final class UIDL extends JavaScriptObject {
* if getTag() returns "color", one would update the widgets
* color to reflect the value of the "color" section.
*
- *
+ *
* @return an iterator for iterating over UIDL children
*/
public Iterator