summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorIlia Motornyi <elmot@vaadin.com>2018-04-19 15:14:53 +0300
committerTeemu Suo-Anttila <tsuoanttila@users.noreply.github.com>2018-04-19 15:14:53 +0300
commitd543e47becc77e5b18c69a416e6e84122ac10fe1 (patch)
tree49b4e4e245319b0e93a4b1d3739096eb2d082eea /client
parentbdbb0b4328a36a66bb492973ca72497bfd34f6ad (diff)
downloadvaadin-framework-d543e47becc77e5b18c69a416e6e84122ac10fe1.tar.gz
vaadin-framework-d543e47becc77e5b18c69a416e6e84122ac10fe1.zip
Enable Maven plugin for Eclipse formatting (#10829)
Diffstat (limited to 'client')
-rw-r--r--client/pom.xml9
-rw-r--r--client/src/main/java/com/vaadin/client/ApplicationConfiguration.java16
-rw-r--r--client/src/main/java/com/vaadin/client/ComputedStyle.java4
-rw-r--r--client/src/main/java/com/vaadin/client/HasChildMeasurementHintConnector.java6
-rw-r--r--client/src/main/java/com/vaadin/client/VErrorMessage.java2
-rw-r--r--client/src/main/java/com/vaadin/client/WidgetSet.java7
-rw-r--r--client/src/main/java/com/vaadin/client/WidgetUtil.java24
-rw-r--r--client/src/main/java/com/vaadin/client/communication/AtmospherePushConnection.java19
-rw-r--r--client/src/main/java/com/vaadin/client/communication/DefaultConnectionStateHandler.java18
-rw-r--r--client/src/main/java/com/vaadin/client/communication/RpcManager.java14
-rw-r--r--client/src/main/java/com/vaadin/client/communication/XhrConnectionError.java4
-rw-r--r--client/src/main/java/com/vaadin/client/connectors/data/HierarchicalDataCommunicatorConnector.java8
-rw-r--r--client/src/main/java/com/vaadin/client/connectors/grid/AbstractGridRendererConnector.java13
-rw-r--r--client/src/main/java/com/vaadin/client/connectors/grid/ColumnConnector.java2
-rw-r--r--client/src/main/java/com/vaadin/client/connectors/grid/GridConnector.java4
-rw-r--r--client/src/main/java/com/vaadin/client/debug/internal/InfoSection.java4
-rw-r--r--client/src/main/java/com/vaadin/client/debug/internal/LogSection.java3
-rw-r--r--client/src/main/java/com/vaadin/client/extensions/FileDropTargetConnector.java12
-rw-r--r--client/src/main/java/com/vaadin/client/ui/AbstractComponentConnector.java33
-rw-r--r--client/src/main/java/com/vaadin/client/ui/FocusUtil.java9
-rw-r--r--client/src/main/java/com/vaadin/client/ui/HasErrorIndicatorElement.java4
-rw-r--r--client/src/main/java/com/vaadin/client/ui/JavaScriptComponentConnector.java3
-rw-r--r--client/src/main/java/com/vaadin/client/ui/TouchScrollDelegate.java11
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VAbstractCalendarPanel.java57
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VAbstractTextualDate.java16
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VComboBox.java4
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VDateField.java4
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VDragAndDropWrapper.java4
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VLink.java4
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VMenuBar.java11
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VNativeButton.java8
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VNotification.java20
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VPopupView.java5
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VTextArea.java3
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VTwinColSelect.java10
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VUpload.java3
-rw-r--r--client/src/main/java/com/vaadin/client/ui/aria/AriaHelper.java4
-rw-r--r--client/src/main/java/com/vaadin/client/ui/datefield/AbstractDateFieldConnector.java10
-rw-r--r--client/src/main/java/com/vaadin/client/ui/datefield/AbstractInlineDateFieldConnector.java36
-rw-r--r--client/src/main/java/com/vaadin/client/ui/datefield/DateTimeFieldConnector.java37
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VTargetDetailIs.java3
-rw-r--r--client/src/main/java/com/vaadin/client/ui/draganddropwrapper/DragAndDropWrapperConnector.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/embedded/EmbeddedConnector.java11
-rw-r--r--client/src/main/java/com/vaadin/client/ui/layout/ComponentConnectorLayoutSlot.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/layout/VLayoutSlot.java3
-rw-r--r--client/src/main/java/com/vaadin/client/ui/nativeselect/NativeSelectConnector.java4
-rw-r--r--client/src/main/java/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java17
-rw-r--r--client/src/main/java/com/vaadin/client/ui/panel/PanelConnector.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/popupview/PopupViewConnector.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/splitpanel/AbstractSplitPanelConnector.java3
-rw-r--r--client/src/main/java/com/vaadin/client/ui/tabsheet/TabsheetBaseConnector.java4
-rw-r--r--client/src/main/java/com/vaadin/client/ui/textfield/AbstractTextFieldConnector.java5
-rw-r--r--client/src/main/java/com/vaadin/client/ui/treegrid/TreeGridConnector.java9
-rw-r--r--client/src/main/java/com/vaadin/client/ui/ui/UIConnector.java17
-rw-r--r--client/src/main/java/com/vaadin/client/ui/upload/UploadConnector.java4
-rw-r--r--client/src/main/java/com/vaadin/client/widget/escalator/ColumnConfiguration.java4
-rw-r--r--client/src/main/java/com/vaadin/client/widget/escalator/EscalatorUpdater.java4
-rw-r--r--client/src/main/java/com/vaadin/client/widget/escalator/FlyweightRow.java6
-rw-r--r--client/src/main/java/com/vaadin/client/widget/escalator/events/SpacerVisibilityChangedEvent.java11
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/AutoScroller.java5
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/DataAvailableEvent.java4
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/selection/MultiSelectionRenderer.java10
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionModel.java4
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/selection/SpaceSelectHandler.java16
-rw-r--r--client/src/main/java/com/vaadin/client/widgets/Escalator.java28
-rwxr-xr-xclient/src/main/java/com/vaadin/client/widgets/Grid.java8
-rwxr-xr-xclient/src/main/resources/com/vaadin/DefaultWidgetSet.gwt.xml8
-rw-r--r--client/src/main/resources/com/vaadin/Vaadin.gwt.xml12
-rw-r--r--client/src/test/java/com/vaadin/client/ApplicationConnectionURLGenerationTest.java3
69 files changed, 343 insertions, 349 deletions
diff --git a/client/pom.xml b/client/pom.xml
index 323a5b54aa..f44821fd6d 100644
--- a/client/pom.xml
+++ b/client/pom.xml
@@ -47,6 +47,15 @@
<build>
<plugins>
<plugin>
+ <groupId>net.revelc.code.formatter</groupId>
+ <artifactId>formatter-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>com.github.dantwining.whitespace-maven-plugin</groupId>
+ <artifactId>whitespace-maven-plugin</artifactId>
+ </plugin>
+
+ <plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<!-- Copy .java files to package -->
diff --git a/client/src/main/java/com/vaadin/client/ApplicationConfiguration.java b/client/src/main/java/com/vaadin/client/ApplicationConfiguration.java
index e9245deff4..1e234eab5e 100644
--- a/client/src/main/java/com/vaadin/client/ApplicationConfiguration.java
+++ b/client/src/main/java/com/vaadin/client/ApplicationConfiguration.java
@@ -147,17 +147,15 @@ public class ApplicationConfiguration implements EntryPoint {
}-*/;
/**
- * Reads a configuration parameter as an {@link Element} object.
- * Please note
- * that the javascript value of the parameter should also be an Element
- * object,
- * or else an undefined exception may be thrown when calling this method
- * or methods on the returned object.
+ * Reads a configuration parameter as an {@link Element} object. Please
+ * note that the javascript value of the parameter should also be an
+ * Element object, or else an undefined exception may be thrown when
+ * calling this method or methods on the returned object.
*
* @param name
- * name of the configuration parameter
- * @return element for the configuration parameter, or <code>null</code> if no
- * value is defined
+ * name of the configuration parameter
+ * @return element for the configuration parameter, or <code>null</code>
+ * if no value is defined
* @since 8.4
*/
private native Element getConfigElement(String name)
diff --git a/client/src/main/java/com/vaadin/client/ComputedStyle.java b/client/src/main/java/com/vaadin/client/ComputedStyle.java
index 5be53155a3..fd137289cd 100644
--- a/client/src/main/java/com/vaadin/client/ComputedStyle.java
+++ b/client/src/main/java/com/vaadin/client/ComputedStyle.java
@@ -263,8 +263,8 @@ public class ComputedStyle {
*
* @param String
* a value starting with a number
- * @return the value from the string before any non-numeric characters.
- * If the value cannot be parsed to a number, returns 0.
+ * @return the value from the string before any non-numeric characters. If
+ * the value cannot be parsed to a number, returns 0.
*/
private static native int parseIntNative(final String value)
/*-{
diff --git a/client/src/main/java/com/vaadin/client/HasChildMeasurementHintConnector.java b/client/src/main/java/com/vaadin/client/HasChildMeasurementHintConnector.java
index cec4092bc6..453f199465 100644
--- a/client/src/main/java/com/vaadin/client/HasChildMeasurementHintConnector.java
+++ b/client/src/main/java/com/vaadin/client/HasChildMeasurementHintConnector.java
@@ -41,9 +41,9 @@ public interface HasChildMeasurementHintConnector
/**
* Measure child component only if child component is an
- * {@link com.vaadin.client.ui.AbstractLayoutConnector AbstractLayoutConnector}
- * or implements either {@link ManagedLayout} or
- * {@link ElementResizeListener}.
+ * {@link com.vaadin.client.ui.AbstractLayoutConnector
+ * AbstractLayoutConnector} or implements either {@link ManagedLayout}
+ * or {@link ElementResizeListener}.
*/
MEASURE_IF_NEEDED,
diff --git a/client/src/main/java/com/vaadin/client/VErrorMessage.java b/client/src/main/java/com/vaadin/client/VErrorMessage.java
index f888bf49bd..6e1d6c91ee 100644
--- a/client/src/main/java/com/vaadin/client/VErrorMessage.java
+++ b/client/src/main/java/com/vaadin/client/VErrorMessage.java
@@ -64,7 +64,7 @@ public class VErrorMessage extends FlowPanel {
* all previous style names.
*
* @param errorLevel
- * error level
+ * error level
* @since 8.2
*/
public void updateErrorLevel(ErrorLevel errorLevel) {
diff --git a/client/src/main/java/com/vaadin/client/WidgetSet.java b/client/src/main/java/com/vaadin/client/WidgetSet.java
index e40286bb63..ff84169b64 100644
--- a/client/src/main/java/com/vaadin/client/WidgetSet.java
+++ b/client/src/main/java/com/vaadin/client/WidgetSet.java
@@ -83,10 +83,9 @@ public class WidgetSet {
return connector;
}
} catch (NoDataException e) {
- throw new IllegalStateException(
- "There is no information about " + classType
- + ". Did you remember to compile the right widgetset?",
- e);
+ throw new IllegalStateException("There is no information about "
+ + classType
+ + ". Did you remember to compile the right widgetset?", e);
} finally {
Profiler.leave("WidgetSet.createConnector");
}
diff --git a/client/src/main/java/com/vaadin/client/WidgetUtil.java b/client/src/main/java/com/vaadin/client/WidgetUtil.java
index 2bbed2b92f..7a05241dca 100644
--- a/client/src/main/java/com/vaadin/client/WidgetUtil.java
+++ b/client/src/main/java/com/vaadin/client/WidgetUtil.java
@@ -53,7 +53,7 @@ public class WidgetUtil {
/**
* Simple object to store another object.
- *
+ *
* @param <T>
* the object type to store
* @since 8.4
@@ -64,7 +64,7 @@ public class WidgetUtil {
/**
* Gets the current object.
- *
+ *
* @return the stored object
*/
public T get() {
@@ -73,7 +73,7 @@ public class WidgetUtil {
/**
* Sets the current object.
- *
+ *
* @param reference
* the object to store
*/
@@ -809,7 +809,7 @@ public class WidgetUtil {
com.google.gwt.dom.client.Element el, String p)
/*-{
try {
-
+
if (el.currentStyle) {
// IE
return el.currentStyle[p];
@@ -824,7 +824,7 @@ public class WidgetUtil {
} catch (e) {
return "";
}
-
+
}-*/;
/**
@@ -838,7 +838,7 @@ public class WidgetUtil {
try {
el.focus();
} catch (e) {
-
+
}
}-*/;
@@ -1191,7 +1191,7 @@ public class WidgetUtil {
if ($wnd.document.activeElement) {
return $wnd.document.activeElement;
}
-
+
return null;
}-*/;
@@ -1262,11 +1262,11 @@ public class WidgetUtil {
/*-{
var top = elem.offsetTop;
var height = elem.offsetHeight;
-
+
if (elem.parentNode != elem.offsetParent) {
top -= elem.parentNode.offsetTop;
}
-
+
var cur = elem.parentNode;
while (cur && (cur.nodeType == 1)) {
if (top < cur.scrollTop) {
@@ -1275,12 +1275,12 @@ public class WidgetUtil {
if (top + height > cur.scrollTop + cur.clientHeight) {
cur.scrollTop = (top + height) - cur.clientHeight;
}
-
+
var offsetTop = cur.offsetTop;
if (cur.parentNode != cur.offsetParent) {
offsetTop -= cur.parentNode.offsetTop;
}
-
+
top += offsetTop - cur.scrollTop;
cur = cur.parentNode;
}
@@ -1729,7 +1729,7 @@ public class WidgetUtil {
}
var heightWithoutBorder = cloneElement.offsetHeight;
parentElement.removeChild(cloneElement);
-
+
return heightWithBorder - heightWithoutBorder;
}
}-*/;
diff --git a/client/src/main/java/com/vaadin/client/communication/AtmospherePushConnection.java b/client/src/main/java/com/vaadin/client/communication/AtmospherePushConnection.java
index d95d438f7d..2a396b6fe2 100644
--- a/client/src/main/java/com/vaadin/client/communication/AtmospherePushConnection.java
+++ b/client/src/main/java/com/vaadin/client/communication/AtmospherePushConnection.java
@@ -149,16 +149,15 @@ public class AtmospherePushConnection implements PushConnection {
final PushConfigurationState pushConfiguration) {
this.connection = connection;
- connection.addHandler(ApplicationStoppedEvent.TYPE,
- event -> {
- if (state == State.DISCONNECT_PENDING
- || state == State.DISCONNECTED) {
- return;
- }
-
- disconnect(() -> {
- });
- });
+ connection.addHandler(ApplicationStoppedEvent.TYPE, event -> {
+ if (state == State.DISCONNECT_PENDING
+ || state == State.DISCONNECTED) {
+ return;
+ }
+
+ disconnect(() -> {
+ });
+ });
config = createConfig();
String debugParameter = Location.getParameter("debug");
if ("push".equals(debugParameter)) {
diff --git a/client/src/main/java/com/vaadin/client/communication/DefaultConnectionStateHandler.java b/client/src/main/java/com/vaadin/client/communication/DefaultConnectionStateHandler.java
index b1765c1ced..27c7052d30 100644
--- a/client/src/main/java/com/vaadin/client/communication/DefaultConnectionStateHandler.java
+++ b/client/src/main/java/com/vaadin/client/communication/DefaultConnectionStateHandler.java
@@ -92,16 +92,14 @@ public class DefaultConnectionStateHandler implements ConnectionStateHandler {
public void setConnection(ApplicationConnection connection) {
this.connection = connection;
- connection.addHandler(ApplicationStoppedEvent.TYPE,
- event -> {
- if (isReconnecting()) {
- giveUp();
- }
- if (scheduledReconnect != null
- && scheduledReconnect.isRunning()) {
- scheduledReconnect.cancel();
- }
- });
+ connection.addHandler(ApplicationStoppedEvent.TYPE, event -> {
+ if (isReconnecting()) {
+ giveUp();
+ }
+ if (scheduledReconnect != null && scheduledReconnect.isRunning()) {
+ scheduledReconnect.cancel();
+ }
+ });
// Allow dialog to cache needed resources to make them available when we
// are offline
diff --git a/client/src/main/java/com/vaadin/client/communication/RpcManager.java b/client/src/main/java/com/vaadin/client/communication/RpcManager.java
index 55e6bde4f0..c9c478d62a 100644
--- a/client/src/main/java/com/vaadin/client/communication/RpcManager.java
+++ b/client/src/main/java/com/vaadin/client/communication/RpcManager.java
@@ -58,10 +58,9 @@ public class RpcManager {
method.invoke(clientRpc, invocation.getParameters());
}
} catch (NoDataException e) {
- throw new IllegalStateException(
- "There is no information about " + method.getSignature()
- + ". Did you remember to compile the right widgetset?",
- e);
+ throw new IllegalStateException("There is no information about "
+ + method.getSignature()
+ + ". Did you remember to compile the right widgetset?", e);
}
}
@@ -92,10 +91,9 @@ public class RpcManager {
Type[] parameterTypes = method.getParameterTypes();
return parameterTypes;
} catch (NoDataException e) {
- throw new IllegalStateException(
- "There is no information about " + method.getSignature()
- + ". Did you remember to compile the right widgetset?",
- e);
+ throw new IllegalStateException("There is no information about "
+ + method.getSignature()
+ + ". Did you remember to compile the right widgetset?", e);
}
}
diff --git a/client/src/main/java/com/vaadin/client/communication/XhrConnectionError.java b/client/src/main/java/com/vaadin/client/communication/XhrConnectionError.java
index 46c2b37102..f81793aa7a 100644
--- a/client/src/main/java/com/vaadin/client/communication/XhrConnectionError.java
+++ b/client/src/main/java/com/vaadin/client/communication/XhrConnectionError.java
@@ -21,8 +21,8 @@ import com.google.gwt.http.client.Response;
import elemental.json.JsonObject;
/**
- * XhrConnectionError provides detail about an error which occurred during
- * an XHR request to the server.
+ * XhrConnectionError provides detail about an error which occurred during an
+ * XHR request to the server.
*
* @since 7.6
* @author Vaadin Ltd
diff --git a/client/src/main/java/com/vaadin/client/connectors/data/HierarchicalDataCommunicatorConnector.java b/client/src/main/java/com/vaadin/client/connectors/data/HierarchicalDataCommunicatorConnector.java
index 9ebd11bdca..25b926e40a 100644
--- a/client/src/main/java/com/vaadin/client/connectors/data/HierarchicalDataCommunicatorConnector.java
+++ b/client/src/main/java/com/vaadin/client/connectors/data/HierarchicalDataCommunicatorConnector.java
@@ -46,11 +46,11 @@ public class HierarchicalDataCommunicatorConnector
*/
JsonObject hierarchyData = newRowData.getObject(
HierarchicalDataCommunicatorConstants.ROW_HIERARCHY_DESCRIPTION);
- if (!hierarchyData.hasKey(HierarchicalDataCommunicatorConstants.ROW_DEPTH)) {
+ if (!hierarchyData
+ .hasKey(HierarchicalDataCommunicatorConstants.ROW_DEPTH)) {
hierarchyData.put(HierarchicalDataCommunicatorConstants.ROW_DEPTH,
- oldRowData
- .getObject(
- HierarchicalDataCommunicatorConstants.ROW_HIERARCHY_DESCRIPTION)
+ oldRowData.getObject(
+ HierarchicalDataCommunicatorConstants.ROW_HIERARCHY_DESCRIPTION)
.getNumber(
HierarchicalDataCommunicatorConstants.ROW_DEPTH));
}
diff --git a/client/src/main/java/com/vaadin/client/connectors/grid/AbstractGridRendererConnector.java b/client/src/main/java/com/vaadin/client/connectors/grid/AbstractGridRendererConnector.java
index 032d02ae8c..ada6e22199 100644
--- a/client/src/main/java/com/vaadin/client/connectors/grid/AbstractGridRendererConnector.java
+++ b/client/src/main/java/com/vaadin/client/connectors/grid/AbstractGridRendererConnector.java
@@ -25,12 +25,13 @@ import elemental.json.JsonObject;
/**
* An abstract base class for renderer connectors. A renderer connector is used
- * to link a client-side {@link com.vaadin.client.renderers.Renderer Renderer} to a server-side
- * {@link com.vaadin.ui.renderers.Renderer Renderer}. As a connector, it can
- * use the regular Vaadin RPC and shared state mechanism to pass additional
- * state and information between the client and the server. This base class
- * itself only uses the basic {@link com.vaadin.shared.communication.SharedState
- * SharedState} and no RPC interfaces.
+ * to link a client-side {@link com.vaadin.client.renderers.Renderer Renderer}
+ * to a server-side {@link com.vaadin.ui.renderers.Renderer Renderer}. As a
+ * connector, it can use the regular Vaadin RPC and shared state mechanism to
+ * pass additional state and information between the client and the server. This
+ * base class itself only uses the basic
+ * {@link com.vaadin.shared.communication.SharedState SharedState} and no RPC
+ * interfaces.
*
* @param <T>
* the presentation type of the renderer
diff --git a/client/src/main/java/com/vaadin/client/connectors/grid/ColumnConnector.java b/client/src/main/java/com/vaadin/client/connectors/grid/ColumnConnector.java
index 9c2c2f09f9..3bd8609873 100644
--- a/client/src/main/java/com/vaadin/client/connectors/grid/ColumnConnector.java
+++ b/client/src/main/java/com/vaadin/client/connectors/grid/ColumnConnector.java
@@ -39,7 +39,7 @@ import elemental.json.JsonValue;
public class ColumnConnector extends AbstractExtensionConnector {
public abstract static class CustomColumn
- extends Column<Object, JsonObject> {
+ extends Column<Object, JsonObject> {
private final String connectorId;
private ContentMode tooltipContentMode;
diff --git a/client/src/main/java/com/vaadin/client/connectors/grid/GridConnector.java b/client/src/main/java/com/vaadin/client/connectors/grid/GridConnector.java
index c11be38814..62e04fdb9c 100644
--- a/client/src/main/java/com/vaadin/client/connectors/grid/GridConnector.java
+++ b/client/src/main/java/com/vaadin/client/connectors/grid/GridConnector.java
@@ -110,8 +110,8 @@ public class GridConnector extends AbstractListingConnector
String columnId = columnToIdMap.get(cell.getColumn());
int rowIndex = cell.getRowIndex();
getRpcProxy(GridServerRpc.class).itemClick(rowKey, columnId,
- MouseEventDetailsBuilder
- .buildMouseEventDetails(mouseEvent), rowIndex);
+ MouseEventDetailsBuilder.buildMouseEventDetails(mouseEvent),
+ rowIndex);
}
}
diff --git a/client/src/main/java/com/vaadin/client/debug/internal/InfoSection.java b/client/src/main/java/com/vaadin/client/debug/internal/InfoSection.java
index 57b5c0e6ce..78ad56abaa 100644
--- a/client/src/main/java/com/vaadin/client/debug/internal/InfoSection.java
+++ b/client/src/main/java/com/vaadin/client/debug/internal/InfoSection.java
@@ -54,7 +54,9 @@ public class InfoSection implements Section {
public void run() {
refresh();
}
- }; public InfoSection() {
+ };
+
+ public InfoSection() {
createContent();
}
diff --git a/client/src/main/java/com/vaadin/client/debug/internal/LogSection.java b/client/src/main/java/com/vaadin/client/debug/internal/LogSection.java
index 71d49e7015..38fb537822 100644
--- a/client/src/main/java/com/vaadin/client/debug/internal/LogSection.java
+++ b/client/src/main/java/com/vaadin/client/debug/internal/LogSection.java
@@ -223,7 +223,8 @@ public class LogSection implements Section {
/**
* Sets the log row limit.
*
- * @param limit The limit
+ * @param limit
+ * The limit
*/
public void setLimit(int limit) {
this.limit = limit;
diff --git a/client/src/main/java/com/vaadin/client/extensions/FileDropTargetConnector.java b/client/src/main/java/com/vaadin/client/extensions/FileDropTargetConnector.java
index acd73f7a5c..698518fe2c 100644
--- a/client/src/main/java/com/vaadin/client/extensions/FileDropTargetConnector.java
+++ b/client/src/main/java/com/vaadin/client/extensions/FileDropTargetConnector.java
@@ -144,9 +144,9 @@ public class FileDropTargetConnector extends DropTargetExtensionConnector {
* Returns the files parameter of the dataTransfer object.
*
* @param dataTransfer
- * DataTransfer object to retrieve files from.
+ * DataTransfer object to retrieve files from.
* @return {@code DataTransfer.files} parameter of the given dataTransfer
- * object.
+ * object.
*/
private native FileList getFiles(DataTransfer dataTransfer)
/*-{
@@ -157,13 +157,13 @@ public class FileDropTargetConnector extends DropTargetExtensionConnector {
* Checks whether the file on the given index is indeed a file or a folder.
*
* @param file
- * File object to prove it is not a folder.
+ * File object to prove it is not a folder.
* @param fileIndex
- * Index of the file object.
+ * Index of the file object.
* @param dataTransfer
- * DataTransfer object that contains the list of files.
+ * DataTransfer object that contains the list of files.
* @return {@code true} if the given file at the given index is not a
- * folder, {@code false} otherwise.
+ * folder, {@code false} otherwise.
*/
private native boolean isFile(File file, int fileIndex,
DataTransfer dataTransfer)
diff --git a/client/src/main/java/com/vaadin/client/ui/AbstractComponentConnector.java b/client/src/main/java/com/vaadin/client/ui/AbstractComponentConnector.java
index 0f42f1f834..c0ab5c7ab3 100644
--- a/client/src/main/java/com/vaadin/client/ui/AbstractComponentConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/AbstractComponentConnector.java
@@ -105,17 +105,16 @@ public abstract class AbstractComponentConnector extends AbstractConnector
@OnStateChange("registeredEventListeners")
void handleContextClickListenerChange() {
if (contextHandler == null && hasEventListener(EventId.CONTEXT_CLICK)) {
- contextHandler = getWidget()
- .addDomHandler(event -> {
- final MouseEventDetails mouseEventDetails = MouseEventDetailsBuilder
- .buildMouseEventDetails(event.getNativeEvent(),
- getWidget().getElement());
-
- event.preventDefault();
- event.stopPropagation();
- sendContextClickEvent(mouseEventDetails,
- event.getNativeEvent().getEventTarget());
- }, ContextMenuEvent.getType());
+ contextHandler = getWidget().addDomHandler(event -> {
+ final MouseEventDetails mouseEventDetails = MouseEventDetailsBuilder
+ .buildMouseEventDetails(event.getNativeEvent(),
+ getWidget().getElement());
+
+ event.preventDefault();
+ event.stopPropagation();
+ sendContextClickEvent(mouseEventDetails,
+ event.getNativeEvent().getEventTarget());
+ }, ContextMenuEvent.getType());
// if the widget has a contextclick listener, add touch support as
// well.
@@ -178,8 +177,7 @@ public abstract class AbstractComponentConnector extends AbstractConnector
}
// Prevent selection for the element while pending long tap.
- WidgetUtil.setTextSelectionEnabled(widget.getElement(),
- false);
+ WidgetUtil.setTextSelectionEnabled(widget.getElement(), false);
if (BrowserInfo.get().isAndroid()) {
// Android fires ContextMenu events automatically.
@@ -187,9 +185,9 @@ public abstract class AbstractComponentConnector extends AbstractConnector
}
/*
- * we need to build mouseEventDetails eagerly - the event won't
- * be guaranteed to be around when the timer executes. At least
- * this was the case with iOS devices.
+ * we need to build mouseEventDetails eagerly - the event won't be
+ * guaranteed to be around when the timer executes. At least this
+ * was the case with iOS devices.
*/
final MouseEventDetails mouseEventDetails = MouseEventDetailsBuilder
@@ -487,7 +485,8 @@ public abstract class AbstractComponentConnector extends AbstractConnector
HasErrorIndicatorElement hasErrorIndicatorElement = (HasErrorIndicatorElement) widget;
if (getState().errorMessage != null) {
hasErrorIndicatorElement.setErrorIndicatorElementVisible(true);
- ErrorUtil.setErrorLevelStyle(hasErrorIndicatorElement.getErrorIndicatorElement(),
+ ErrorUtil.setErrorLevelStyle(
+ hasErrorIndicatorElement.getErrorIndicatorElement(),
StyleConstants.STYLE_NAME_ERROR_INDICATOR,
getState().errorLevel);
} else {
diff --git a/client/src/main/java/com/vaadin/client/ui/FocusUtil.java b/client/src/main/java/com/vaadin/client/ui/FocusUtil.java
index 23a36f1303..7450d4894b 100644
--- a/client/src/main/java/com/vaadin/client/ui/FocusUtil.java
+++ b/client/src/main/java/com/vaadin/client/ui/FocusUtil.java
@@ -98,7 +98,7 @@ public class FocusUtil {
/**
* Finds all the focusable children of given parent element.
- *
+ *
* @param parent
* the parent element
* @return array of focusable children
@@ -112,7 +112,7 @@ public class FocusUtil {
/**
* Moves the focus to the first focusable child of given parent element.
- *
+ *
* @param parent
* the parent element
* @since 8.1.7
@@ -126,7 +126,8 @@ public class FocusUtil {
for (int i = 0; i < focusableChildren.length; i++) {
Element element = focusableChildren[i];
String classes = element.getAttribute("class");
- if (classes == null || !classes.toLowerCase().contains("disabled")) {
+ if (classes == null
+ || !classes.toLowerCase().contains("disabled")) {
element.focus();
return;
}
@@ -135,7 +136,7 @@ public class FocusUtil {
/**
* Moves the focus to the last focusable child of given parent element.
- *
+ *
* @param parent
* the parent element
* @since 8.1.7
diff --git a/client/src/main/java/com/vaadin/client/ui/HasErrorIndicatorElement.java b/client/src/main/java/com/vaadin/client/ui/HasErrorIndicatorElement.java
index 506732974c..6c82d71aab 100644
--- a/client/src/main/java/com/vaadin/client/ui/HasErrorIndicatorElement.java
+++ b/client/src/main/java/com/vaadin/client/ui/HasErrorIndicatorElement.java
@@ -35,8 +35,8 @@ public interface HasErrorIndicatorElement {
* Sets the visibility of the error indicator element.
*
* @param visible
- * {@code true} to show the error indicator element, {@code false}
- * to hide it
+ * {@code true} to show the error indicator element,
+ * {@code false} to hide it
*/
void setErrorIndicatorElementVisible(boolean visible);
}
diff --git a/client/src/main/java/com/vaadin/client/ui/JavaScriptComponentConnector.java b/client/src/main/java/com/vaadin/client/ui/JavaScriptComponentConnector.java
index 0d7738ce06..2374e2e426 100644
--- a/client/src/main/java/com/vaadin/client/ui/JavaScriptComponentConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/JavaScriptComponentConnector.java
@@ -31,8 +31,7 @@ public final class JavaScriptComponentConnector extends
private final JavaScriptConnectorHelper helper = new JavaScriptConnectorHelper(
this) {
@Override
- protected void showInitProblem(
- List<String> attemptedNames) {
+ protected void showInitProblem(List<String> attemptedNames) {
getWidget().showNoInitFound(attemptedNames);
}
};
diff --git a/client/src/main/java/com/vaadin/client/ui/TouchScrollDelegate.java b/client/src/main/java/com/vaadin/client/ui/TouchScrollDelegate.java
index 28237115a2..7dcfb45850 100644
--- a/client/src/main/java/com/vaadin/client/ui/TouchScrollDelegate.java
+++ b/client/src/main/java/com/vaadin/client/ui/TouchScrollDelegate.java
@@ -101,8 +101,8 @@ public class TouchScrollDelegate implements NativePreviewHandler {
private static TouchScrollDelegate activeScrollDelegate;
- private static final boolean ANDROID_WITH_BROKEN_SCROLL_TOP = BrowserInfo.get()
- .isAndroidWithBrokenScrollTop();
+ private static final boolean ANDROID_WITH_BROKEN_SCROLL_TOP = BrowserInfo
+ .get().isAndroidWithBrokenScrollTop();
/**
* A helper class for making a widget scrollable. Uses native scrolling if
@@ -562,8 +562,8 @@ public class TouchScrollDelegate implements NativePreviewHandler {
finalScrollTop = finalY;
if (Math.abs(pixelsToMove) < 3 || duration < 20) {
- getLogger().info("Small 'momentum' " + pixelsToMove + " | " + duration
- + " Skipping animation,");
+ getLogger().info("Small 'momentum' " + pixelsToMove + " | "
+ + duration + " Skipping animation,");
moveTransformationToScrolloffset();
return;
}
@@ -701,7 +701,8 @@ public class TouchScrollDelegate implements NativePreviewHandler {
}
break;
default:
- getLogger().info("Non touch event:" + event.getNativeEvent().getType());
+ getLogger().info(
+ "Non touch event:" + event.getNativeEvent().getType());
event.cancel();
break;
}
diff --git a/client/src/main/java/com/vaadin/client/ui/VAbstractCalendarPanel.java b/client/src/main/java/com/vaadin/client/ui/VAbstractCalendarPanel.java
index 67436339b5..8a3c6c3325 100644
--- a/client/src/main/java/com/vaadin/client/ui/VAbstractCalendarPanel.java
+++ b/client/src/main/java/com/vaadin/client/ui/VAbstractCalendarPanel.java
@@ -722,8 +722,8 @@ public abstract class VAbstractCalendarPanel<R extends Enum<R>>
}
String dateStrResolution = dateStrResolution(date, minResolution);
- return rangeStart.substring(0,dateStrResolution.length())
- .compareTo(dateStrResolution) <=0;
+ return rangeStart.substring(0, dateStrResolution.length())
+ .compareTo(dateStrResolution) <= 0;
}
private String dateStrResolution(Date date, R minResolution) {
@@ -760,7 +760,7 @@ public abstract class VAbstractCalendarPanel<R extends Enum<R>>
}
String dateStrResolution = dateStrResolution(date, minResolution);
- return rangeEnd.substring(0,dateStrResolution.length())
+ return rangeEnd.substring(0, dateStrResolution.length())
.compareTo(dateStrResolution) >= 0;
}
@@ -868,10 +868,9 @@ public abstract class VAbstractCalendarPanel<R extends Enum<R>>
// Set assistive label to read focused date and month/year
Roles.getButtonRole().set(day.getElement());
- Roles.getButtonRole()
- .setAriaLabelledbyProperty(day.getElement(),
- Id.of(day.getElement()),
- Id.of(getFlexCellFormatter().getElement(0, 2)));
+ Roles.getButtonRole().setAriaLabelledbyProperty(
+ day.getElement(), Id.of(day.getElement()),
+ Id.of(getFlexCellFormatter().getElement(0, 2)));
day.setStyleName(getDateField().getStylePrimaryName()
+ "-calendarpanel-day");
@@ -895,9 +894,8 @@ public abstract class VAbstractCalendarPanel<R extends Enum<R>>
day.addStyleDependentName(CN_FOCUSED);
// Reference focused day from calendar panel
- Roles.getGridRole()
- .setAriaActivedescendantProperty(getElement(),
- Id.of(day.getElement()));
+ Roles.getGridRole().setAriaActivedescendantProperty(
+ getElement(), Id.of(day.getElement()));
}
}
if (curr.getMonth() != displayedMonth.getMonth()) {
@@ -1682,30 +1680,33 @@ public abstract class VAbstractCalendarPanel<R extends Enum<R>>
* @param date
*/
private Date adjustDateToFitInsideRange(Date date) {
- if(!isAcceptedByRangeStart(date,resolution)) {
+ if (!isAcceptedByRangeStart(date, resolution)) {
date = parseRangeString(rangeStart);
- } else
- if(!isAcceptedByRangeEnd(date,resolution)) {
+ } else if (!isAcceptedByRangeEnd(date, resolution)) {
date = parseRangeString(rangeEnd);
}
return date;
}
private Date parseRangeString(String dateStr) {
- if(dateStr == null || "".equals(dateStr)) return null;
- int year = Integer.parseInt(dateStr.substring(0,4)) - 1900;
- int month = parsePart(dateStr, 5, 2,1) - 1;
- int day = parsePart(dateStr, 8, 2,1);
- int hrs = parsePart(dateStr, 11, 2,0);
- int min = parsePart(dateStr, 14, 2,0);
- int sec = parsePart(dateStr, 17, 2,0);
+ if (dateStr == null || "".equals(dateStr))
+ return null;
+ int year = Integer.parseInt(dateStr.substring(0, 4)) - 1900;
+ int month = parsePart(dateStr, 5, 2, 1) - 1;
+ int day = parsePart(dateStr, 8, 2, 1);
+ int hrs = parsePart(dateStr, 11, 2, 0);
+ int min = parsePart(dateStr, 14, 2, 0);
+ int sec = parsePart(dateStr, 17, 2, 0);
- return new Date(year,month,day,hrs,min,sec);
+ return new Date(year, month, day, hrs, min, sec);
}
- private int parsePart(String dateStr, int beginIndex, int length, int defValue) {
- if(dateStr.length() < beginIndex + length) return defValue;
- return Integer.parseInt(dateStr.substring(beginIndex, beginIndex + length));
+ private int parsePart(String dateStr, int beginIndex, int length,
+ int defValue) {
+ if (dateStr.length() < beginIndex + length)
+ return defValue;
+ return Integer
+ .parseInt(dateStr.substring(beginIndex, beginIndex + length));
}
/**
@@ -2112,7 +2113,7 @@ public abstract class VAbstractCalendarPanel<R extends Enum<R>>
* Set assistive label for the previous year element.
*
* @param label
- * the label to set
+ * the label to set
* @since 8.4
*/
public void setAssistiveLabelPreviousYear(String label) {
@@ -2123,7 +2124,7 @@ public abstract class VAbstractCalendarPanel<R extends Enum<R>>
* Set assistive label for the next year element.
*
* @param label
- * the label to set
+ * the label to set
* @since 8.4
*/
public void setAssistiveLabelNextYear(String label) {
@@ -2134,7 +2135,7 @@ public abstract class VAbstractCalendarPanel<R extends Enum<R>>
* Set assistive label for the previous month element.
*
* @param label
- * the label to set
+ * the label to set
* @since 8.4
*/
public void setAssistiveLabelPreviousMonth(String label) {
@@ -2145,7 +2146,7 @@ public abstract class VAbstractCalendarPanel<R extends Enum<R>>
* Set assistive label for the next month element.
*
* @param label
- * the label to set
+ * the label to set
* @since 8.4
*/
public void setAssistiveLabelNextMonth(String label) {
diff --git a/client/src/main/java/com/vaadin/client/ui/VAbstractTextualDate.java b/client/src/main/java/com/vaadin/client/ui/VAbstractTextualDate.java
index 18001b9ff0..bf79fec545 100644
--- a/client/src/main/java/com/vaadin/client/ui/VAbstractTextualDate.java
+++ b/client/src/main/java/com/vaadin/client/ui/VAbstractTextualDate.java
@@ -55,9 +55,8 @@ import com.vaadin.shared.EventId;
*/
public abstract class VAbstractTextualDate<R extends Enum<R>>
extends VDateField<R>
- implements ChangeHandler, Focusable,
- SubPartAware, HandlesAriaCaption, HandlesAriaInvalid,
- HandlesAriaRequired, KeyDownHandler {
+ implements ChangeHandler, Focusable, SubPartAware, HandlesAriaCaption,
+ HandlesAriaInvalid, HandlesAriaRequired, KeyDownHandler {
private static final String PARSE_ERROR_CLASSNAME = "-parseerror";
private static final String ISO_DATE_TIME_PATTERN = "yyyy-MM-dd'T'HH:mm:ss";
@@ -86,10 +85,8 @@ public abstract class VAbstractTextualDate<R extends Enum<R>>
super(resoluton);
text = new TextBox();
text.addChangeHandler(this);
- text.addFocusHandler(
- event -> fireBlurFocusEvent(event, true));
- text.addBlurHandler(
- event -> fireBlurFocusEvent(event, false));
+ text.addFocusHandler(event -> fireBlurFocusEvent(event, true));
+ text.addBlurHandler(event -> fireBlurFocusEvent(event, false));
if (BrowserInfo.get().isIE()) {
addDomHandler(this, KeyDownEvent.getType());
}
@@ -278,7 +275,7 @@ public abstract class VAbstractTextualDate<R extends Enum<R>>
*
* @since 8.2
* @deprecated Use {@link #updateBufferedResolutions()} and
- * {@link #sendBufferedValues()} instead.
+ * {@link #sendBufferedValues()} instead.
*/
@Deprecated
protected final void updateAndSendBufferedValues() {
@@ -409,8 +406,7 @@ public abstract class VAbstractTextualDate<R extends Enum<R>>
}
}
- private void fireBlurFocusEvent(DomEvent<?> event,
- boolean focus) {
+ private void fireBlurFocusEvent(DomEvent<?> event, boolean focus) {
String styleName = VTextField.CLASSNAME + "-"
+ VTextField.CLASSNAME_FOCUS;
if (focus) {
diff --git a/client/src/main/java/com/vaadin/client/ui/VComboBox.java b/client/src/main/java/com/vaadin/client/ui/VComboBox.java
index c29102cc4f..72797991d1 100644
--- a/client/src/main/java/com/vaadin/client/ui/VComboBox.java
+++ b/client/src/main/java/com/vaadin/client/ui/VComboBox.java
@@ -257,12 +257,12 @@ public class VComboBox extends Composite implements Field, KeyDownHandler,
return $entry(function(e) {
var deltaX = e.deltaX ? e.deltaX : -0.5*e.wheelDeltaX;
var deltaY = e.deltaY ? e.deltaY : -0.5*e.wheelDeltaY;
-
+
// IE8 has only delta y
if (isNaN(deltaY)) {
deltaY = -0.5*e.wheelDelta;
}
-
+
@com.vaadin.client.ui.VComboBox.JsniUtil::moveScrollFromEvent(*)(widget, deltaX, deltaY, e, e.deltaMode);
});
}-*/;
diff --git a/client/src/main/java/com/vaadin/client/ui/VDateField.java b/client/src/main/java/com/vaadin/client/ui/VDateField.java
index 0402875206..2d4136bd76 100644
--- a/client/src/main/java/com/vaadin/client/ui/VDateField.java
+++ b/client/src/main/java/com/vaadin/client/ui/VDateField.java
@@ -283,8 +283,8 @@ public abstract class VDateField<R extends Enum<R>> extends FlowPanel
*/
public void sendBufferedValues() {
rpc.update(bufferedDateString,
- bufferedResolutions.entrySet().stream().collect(Collectors
- .toMap(entry -> entry.getKey().name(),
+ bufferedResolutions.entrySet().stream().collect(
+ Collectors.toMap(entry -> entry.getKey().name(),
entry -> entry.getValue())));
bufferedDateString = null;
bufferedResolutions.clear();
diff --git a/client/src/main/java/com/vaadin/client/ui/VDragAndDropWrapper.java b/client/src/main/java/com/vaadin/client/ui/VDragAndDropWrapper.java
index 6ae3154f85..77e7b53c56 100644
--- a/client/src/main/java/com/vaadin/client/ui/VDragAndDropWrapper.java
+++ b/client/src/main/java/com/vaadin/client/ui/VDragAndDropWrapper.java
@@ -387,8 +387,8 @@ public class VDragAndDropWrapper extends VCustomComponent
if (event.isFile(i)) {
final int fileId = filecounter++;
final VHtml5File file = event.getFile(i);
- getLogger().info("Preparing to upload file " + file.getName()
- + " with id " + fileId + ", size="
+ getLogger().info("Preparing to upload file "
+ + file.getName() + " with id " + fileId + ", size="
+ file.getSize());
transferable.setData("fi" + fileIndex, "" + fileId);
transferable.setData("fn" + fileIndex, file.getName());
diff --git a/client/src/main/java/com/vaadin/client/ui/VLink.java b/client/src/main/java/com/vaadin/client/ui/VLink.java
index 7a75cdf765..26360bd6ab 100644
--- a/client/src/main/java/com/vaadin/client/ui/VLink.java
+++ b/client/src/main/java/com/vaadin/client/ui/VLink.java
@@ -28,8 +28,8 @@ import com.vaadin.client.Util;
import com.vaadin.client.WidgetUtil.ErrorUtil;
import com.vaadin.shared.ui.BorderStyle;
-public class VLink extends HTML implements ClickHandler, HasEnabled,
- HasErrorIndicatorElement {
+public class VLink extends HTML
+ implements ClickHandler, HasEnabled, HasErrorIndicatorElement {
public static final String CLASSNAME = "v-link";
diff --git a/client/src/main/java/com/vaadin/client/ui/VMenuBar.java b/client/src/main/java/com/vaadin/client/ui/VMenuBar.java
index 016e67e7da..70af301be0 100644
--- a/client/src/main/java/com/vaadin/client/ui/VMenuBar.java
+++ b/client/src/main/java/com/vaadin/client/ui/VMenuBar.java
@@ -60,9 +60,9 @@ import com.vaadin.client.extensions.EventTrigger;
import com.vaadin.shared.ui.ContentMode;
import com.vaadin.shared.ui.menubar.MenuBarConstants;
-public class VMenuBar extends FocusableFlowPanel
- implements CloseHandler<PopupPanel>, KeyPressHandler, KeyDownHandler,
- FocusHandler, SubPartAware, MouseOutHandler, MouseOverHandler, EventTrigger {
+public class VMenuBar extends FocusableFlowPanel implements
+ CloseHandler<PopupPanel>, KeyPressHandler, KeyDownHandler, FocusHandler,
+ SubPartAware, MouseOutHandler, MouseOverHandler, EventTrigger {
// The hierarchy of VMenuBar is a bit weird as VMenuBar is the Paintable,
// used for the root menu but also used for the sub menus.
@@ -803,7 +803,7 @@ public class VMenuBar extends FocusableFlowPanel
*
*/
public static class CustomMenuItem extends Widget
- implements HasHTML, SubPartAware {
+ implements HasHTML, SubPartAware {
protected String html = null;
protected Command command = null;
@@ -1924,7 +1924,8 @@ public class VMenuBar extends FocusableFlowPanel
"The 'partInformation' parameter must contain the menu item id");
}
- getTriggers().computeIfAbsent(partInformation, s-> new ArrayList<>()).add(command);
+ getTriggers().computeIfAbsent(partInformation, s -> new ArrayList<>())
+ .add(command);
return () -> {
List<Command> commands = getTriggers().get(partInformation);
if (commands != null) {
diff --git a/client/src/main/java/com/vaadin/client/ui/VNativeButton.java b/client/src/main/java/com/vaadin/client/ui/VNativeButton.java
index 2c6400cacb..ac0f728ffe 100644
--- a/client/src/main/java/com/vaadin/client/ui/VNativeButton.java
+++ b/client/src/main/java/com/vaadin/client/ui/VNativeButton.java
@@ -31,8 +31,8 @@ import com.vaadin.client.WidgetUtil.ErrorUtil;
import com.vaadin.shared.MouseEventDetails;
import com.vaadin.shared.ui.button.ButtonServerRpc;
-public class VNativeButton extends Button implements ClickHandler,
- HasErrorIndicatorElement {
+public class VNativeButton extends Button
+ implements ClickHandler, HasErrorIndicatorElement {
public static final String CLASSNAME = "v-nativebutton";
@@ -171,8 +171,8 @@ public class VNativeButton extends Button implements ClickHandler,
if (visible) {
if (errorIndicatorElement == null) {
errorIndicatorElement = ErrorUtil.createErrorIndicatorElement();
- getElement()
- .insertBefore(errorIndicatorElement, captionElement);
+ getElement().insertBefore(errorIndicatorElement,
+ captionElement);
}
} else if (errorIndicatorElement != null) {
getElement().removeChild(errorIndicatorElement);
diff --git a/client/src/main/java/com/vaadin/client/ui/VNotification.java b/client/src/main/java/com/vaadin/client/ui/VNotification.java
index 0be7b42c44..e2046d47e5 100644
--- a/client/src/main/java/com/vaadin/client/ui/VNotification.java
+++ b/client/src/main/java/com/vaadin/client/ui/VNotification.java
@@ -294,13 +294,12 @@ public class VNotification extends VOverlay {
// in some browsers)
if (getStyleName()
.contains(VOverlay.ADDITIONAL_CLASSNAME_ANIMATE_IN)) {
- AnimationUtil.addAnimationEndListener(getElement(),
- event -> {
- if (AnimationUtil.getAnimationName(event).contains(
- VOverlay.ADDITIONAL_CLASSNAME_ANIMATE_IN)) {
- VNotification.this.hide();
- }
- });
+ AnimationUtil.addAnimationEndListener(getElement(), event -> {
+ if (AnimationUtil.getAnimationName(event).contains(
+ VOverlay.ADDITIONAL_CLASSNAME_ANIMATE_IN)) {
+ VNotification.this.hide();
+ }
+ });
} else {
VNotification.super.hide();
fireEvent(new HideEvent(this));
@@ -481,8 +480,8 @@ public class VNotification extends VOverlay {
* @param description
* The Notification description, can be {@code null}.
* @param htmlContentAllowed
- * Whether {@code caption} and {@code description}
- * are interpreted as HTML or not.
+ * Whether {@code caption} and {@code description} are
+ * interpreted as HTML or not.
* @param iconUri
* The icon URI, can be {@code null}.
* @param styleName
@@ -496,7 +495,8 @@ public class VNotification extends VOverlay {
*/
public static VNotification showNotification(ApplicationConnection client,
String caption, String description, boolean htmlContentAllowed,
- String iconUri, String styleName, Position position, int delayMsec) {
+ String iconUri, String styleName, Position position,
+ int delayMsec) {
String html = "";
if (iconUri != null) {
html += client.getIcon(iconUri).getElement().getString();
diff --git a/client/src/main/java/com/vaadin/client/ui/VPopupView.java b/client/src/main/java/com/vaadin/client/ui/VPopupView.java
index e719a722a5..664c476ca6 100644
--- a/client/src/main/java/com/vaadin/client/ui/VPopupView.java
+++ b/client/src/main/java/com/vaadin/client/ui/VPopupView.java
@@ -245,9 +245,8 @@ public class VPopupView extends HTML
// directly attached to the RootPanel.
addDomHandler(event -> {
if (shortcutActionHandler != null) {
- shortcutActionHandler
- .handleKeyboardEvent(
- Event.as(event.getNativeEvent()));
+ shortcutActionHandler.handleKeyboardEvent(
+ Event.as(event.getNativeEvent()));
}
}, KeyDownEvent.getType());
}
diff --git a/client/src/main/java/com/vaadin/client/ui/VTextArea.java b/client/src/main/java/com/vaadin/client/ui/VTextArea.java
index 207ce4a1ee..c68505d4be 100644
--- a/client/src/main/java/com/vaadin/client/ui/VTextArea.java
+++ b/client/src/main/java/com/vaadin/client/ui/VTextArea.java
@@ -34,8 +34,7 @@ import com.vaadin.client.ui.dd.DragImageModifier;
* @author Vaadin Ltd.
*
*/
-public class VTextArea extends VTextField
- implements DragImageModifier {
+public class VTextArea extends VTextField implements DragImageModifier {
public static final String CLASSNAME = "v-textarea";
diff --git a/client/src/main/java/com/vaadin/client/ui/VTwinColSelect.java b/client/src/main/java/com/vaadin/client/ui/VTwinColSelect.java
index 1cf103f157..97167847a5 100644
--- a/client/src/main/java/com/vaadin/client/ui/VTwinColSelect.java
+++ b/client/src/main/java/com/vaadin/client/ui/VTwinColSelect.java
@@ -359,17 +359,15 @@ public class VTwinColSelect extends Composite implements MultiSelectWidget,
private void moveSelectedItemsLeftToRight() {
Set<String> movedItems = moveSelectedItems(optionsListBox,
selectionsListBox);
- selectionChangeListeners
- .forEach(listener -> listener.accept(movedItems,
- Collections.emptySet()));
+ selectionChangeListeners.forEach(listener -> listener.accept(movedItems,
+ Collections.emptySet()));
}
private void moveSelectedItemsRightToLeft() {
Set<String> movedItems = moveSelectedItems(selectionsListBox,
optionsListBox);
- selectionChangeListeners
- .forEach(listener -> listener.accept(Collections.emptySet(),
- movedItems));
+ selectionChangeListeners.forEach(listener -> listener
+ .accept(Collections.emptySet(), movedItems));
}
private static Set<String> moveSelectedItems(ListBox source,
diff --git a/client/src/main/java/com/vaadin/client/ui/VUpload.java b/client/src/main/java/com/vaadin/client/ui/VUpload.java
index 653cdc2400..ad50ca3115 100644
--- a/client/src/main/java/com/vaadin/client/ui/VUpload.java
+++ b/client/src/main/java/com/vaadin/client/ui/VUpload.java
@@ -318,7 +318,8 @@ public class VUpload extends SimplePanel {
/** For internal use only. May be removed or replaced in the future. */
public void submit() {
if (submitted || !enabled) {
- getLogger().info("Submit cancelled (disabled or already submitted)");
+ getLogger()
+ .info("Submit cancelled (disabled or already submitted)");
return;
}
if (fu.getFilename().isEmpty()) {
diff --git a/client/src/main/java/com/vaadin/client/ui/aria/AriaHelper.java b/client/src/main/java/com/vaadin/client/ui/aria/AriaHelper.java
index 5957364086..482ea781e4 100644
--- a/client/src/main/java/com/vaadin/client/ui/aria/AriaHelper.java
+++ b/client/src/main/java/com/vaadin/client/ui/aria/AriaHelper.java
@@ -176,8 +176,8 @@ public class AriaHelper {
* @param element
* Element to move out of sight
* @param assistiveOnly
- * {@code true} when element should only be visible for
- * assistive devices, {@code false} to make the element visible for all
+ * {@code true} when element should only be visible for assistive
+ * devices, {@code false} to make the element visible for all
*/
public static void setVisibleForAssistiveDevicesOnly(Element element,
boolean assistiveOnly) {
diff --git a/client/src/main/java/com/vaadin/client/ui/datefield/AbstractDateFieldConnector.java b/client/src/main/java/com/vaadin/client/ui/datefield/AbstractDateFieldConnector.java
index 02c0f85243..9057acefe4 100644
--- a/client/src/main/java/com/vaadin/client/ui/datefield/AbstractDateFieldConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/datefield/AbstractDateFieldConnector.java
@@ -150,17 +150,17 @@ public abstract class AbstractDateFieldConnector<R extends Enum<R>>
* updates these labels.
*
* @param calendar
- * the calendar panel for which to set the assistive labels
+ * the calendar panel for which to set the assistive labels
* @since 8.4
*/
protected void setAndUpdateAssistiveLabels(
VAbstractCalendarPanel calendar) {
- calendar.setAssistiveLabelPreviousMonth(
- getState().assistiveLabels.get(AccessibleElement.PREVIOUS_MONTH));
+ calendar.setAssistiveLabelPreviousMonth(getState().assistiveLabels
+ .get(AccessibleElement.PREVIOUS_MONTH));
calendar.setAssistiveLabelNextMonth(
getState().assistiveLabels.get(AccessibleElement.NEXT_MONTH));
- calendar.setAssistiveLabelPreviousYear(
- getState().assistiveLabels.get(AccessibleElement.PREVIOUS_YEAR));
+ calendar.setAssistiveLabelPreviousYear(getState().assistiveLabels
+ .get(AccessibleElement.PREVIOUS_YEAR));
calendar.setAssistiveLabelNextYear(
getState().assistiveLabels.get(AccessibleElement.NEXT_YEAR));
diff --git a/client/src/main/java/com/vaadin/client/ui/datefield/AbstractInlineDateFieldConnector.java b/client/src/main/java/com/vaadin/client/ui/datefield/AbstractInlineDateFieldConnector.java
index 46f3c81d31..baecff729c 100644
--- a/client/src/main/java/com/vaadin/client/ui/datefield/AbstractInlineDateFieldConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/datefield/AbstractInlineDateFieldConnector.java
@@ -51,24 +51,22 @@ public abstract class AbstractInlineDateFieldConnector<PANEL extends VAbstractCa
protected void updateListeners() {
VAbstractDateFieldCalendar<PANEL, R> widget = getWidget();
if (isResolutionMonthOrHigher()) {
- widget.calendarPanel
- .setFocusChangeListener(date -> {
- Date date2 = new Date();
- if (widget.calendarPanel.getDate() != null) {
- date2.setTime(widget.calendarPanel.getDate()
- .getTime());
- }
- /*
- * Update the value of calendarPanel
- */
- date2.setYear(date.getYear());
- date2.setMonth(date.getMonth());
- widget.calendarPanel.setDate(date2);
- /*
- * Then update the value from panel to server
- */
- widget.updateValueFromPanel();
- });
+ widget.calendarPanel.setFocusChangeListener(date -> {
+ Date date2 = new Date();
+ if (widget.calendarPanel.getDate() != null) {
+ date2.setTime(widget.calendarPanel.getDate().getTime());
+ }
+ /*
+ * Update the value of calendarPanel
+ */
+ date2.setYear(date.getYear());
+ date2.setMonth(date.getMonth());
+ widget.calendarPanel.setDate(date2);
+ /*
+ * Then update the value from panel to server
+ */
+ widget.updateValueFromPanel();
+ });
} else {
widget.calendarPanel.setFocusChangeListener(null);
}
@@ -124,4 +122,4 @@ public abstract class AbstractInlineDateFieldConnector<PANEL extends VAbstractCa
*/
protected abstract boolean isResolutionMonthOrHigher();
-} \ No newline at end of file
+}
diff --git a/client/src/main/java/com/vaadin/client/ui/datefield/DateTimeFieldConnector.java b/client/src/main/java/com/vaadin/client/ui/datefield/DateTimeFieldConnector.java
index 9a1ce33ff8..1b3362d006 100644
--- a/client/src/main/java/com/vaadin/client/ui/datefield/DateTimeFieldConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/datefield/DateTimeFieldConnector.java
@@ -57,26 +57,25 @@ public class DateTimeFieldConnector extends
VPopupTimeCalendar widget = getWidget();
if (widget.getCurrentResolution()
.compareTo(DateTimeResolution.DAY) < 0) {
- widget.calendar
- .setTimeChangeListener((hour, min, sec, msec) -> {
- Date d = widget.getDate();
- if (d == null) {
- // date currently null, use the value from
- // calendarPanel
- // (~ client time at the init of the widget)
- d = (Date) widget.calendar.getDate().clone();
- }
- d.setHours(hour);
- d.setMinutes(min);
- d.setSeconds(sec);
- DateTimeService.setMilliseconds(d, msec);
+ widget.calendar.setTimeChangeListener((hour, min, sec, msec) -> {
+ Date d = widget.getDate();
+ if (d == null) {
+ // date currently null, use the value from
+ // calendarPanel
+ // (~ client time at the init of the widget)
+ d = (Date) widget.calendar.getDate().clone();
+ }
+ d.setHours(hour);
+ d.setMinutes(min);
+ d.setSeconds(sec);
+ DateTimeService.setMilliseconds(d, msec);
- // Always update time changes to the server
- widget.updateValue(d);
+ // Always update time changes to the server
+ widget.updateValue(d);
- // Update text field
- widget.buildDate();
- });
+ // Update text field
+ widget.buildDate();
+ });
}
}
-} \ No newline at end of file
+}
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VTargetDetailIs.java b/client/src/main/java/com/vaadin/client/ui/dd/VTargetDetailIs.java
index 763f2b2aa7..728f96558b 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VTargetDetailIs.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VTargetDetailIs.java
@@ -34,7 +34,8 @@ public final class VTargetDetailIs extends VAcceptCriterion {
protected boolean accept(VDragEvent drag, UIDL configuration) {
String name = configuration.getStringAttribute("p");
String t = configuration.hasAttribute("t")
- ? configuration.getStringAttribute("t").intern() : "s";
+ ? configuration.getStringAttribute("t").intern()
+ : "s";
Object value = null;
if (t == "s") {
value = configuration.getStringAttribute("v");
diff --git a/client/src/main/java/com/vaadin/client/ui/draganddropwrapper/DragAndDropWrapperConnector.java b/client/src/main/java/com/vaadin/client/ui/draganddropwrapper/DragAndDropWrapperConnector.java
index af24f045ac..3f3247dd92 100644
--- a/client/src/main/java/com/vaadin/client/ui/draganddropwrapper/DragAndDropWrapperConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/draganddropwrapper/DragAndDropWrapperConnector.java
@@ -83,10 +83,8 @@ public class DragAndDropWrapperConnector extends CustomComponentConnector
}
} else {
if (widget.fileIdToReceiver.containsKey(fileId)
- && receiverUrl != null
- && !receiverUrl
- .equals(widget.fileIdToReceiver
- .get(fileId))) {
+ && receiverUrl != null && !receiverUrl.equals(
+ widget.fileIdToReceiver.get(fileId))) {
getLogger().severe(
"Overwriting file receiver mapping for fileId "
+ fileId + " . Old receiver URL: "
diff --git a/client/src/main/java/com/vaadin/client/ui/embedded/EmbeddedConnector.java b/client/src/main/java/com/vaadin/client/ui/embedded/EmbeddedConnector.java
index 92fcd441e9..3d7ef5f2ae 100644
--- a/client/src/main/java/com/vaadin/client/ui/embedded/EmbeddedConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/embedded/EmbeddedConnector.java
@@ -134,8 +134,8 @@ public class EmbeddedConnector extends AbstractComponentConnector {
setResourceUrl(getResourceUrl("src"));
clearBrowserElement = false;
} else {
- getLogger().severe(
- "Unknown Embedded type '" + widget.type + "'");
+ getLogger()
+ .severe("Unknown Embedded type '" + widget.type + "'");
}
} else if (state.mimeType != null) {
// remove old style name related to type
@@ -152,8 +152,8 @@ public class EmbeddedConnector extends AbstractComponentConnector {
widget.mimetype = "flash";
// Handle embedding of Flash
widget.addStyleName(VEmbedded.CLASSNAME + "-flash");
- widget.setHTML(widget.createFlashEmbed(state,
- getResourceUrl("src")));
+ widget.setHTML(
+ widget.createFlashEmbed(state, getResourceUrl("src")));
} else if (mime.equals("image/svg+xml")) {
widget.mimetype = "svg";
@@ -202,7 +202,8 @@ public class EmbeddedConnector extends AbstractComponentConnector {
getLogger().severe("Unknown Embedded mimetype '" + mime + "'");
}
} else {
- getLogger().severe("Unknown Embedded; no type or mimetype attribute");
+ getLogger()
+ .severe("Unknown Embedded; no type or mimetype attribute");
}
if (clearBrowserElement) {
diff --git a/client/src/main/java/com/vaadin/client/ui/layout/ComponentConnectorLayoutSlot.java b/client/src/main/java/com/vaadin/client/ui/layout/ComponentConnectorLayoutSlot.java
index 6d52e3ff84..046b27712c 100644
--- a/client/src/main/java/com/vaadin/client/ui/layout/ComponentConnectorLayoutSlot.java
+++ b/client/src/main/java/com/vaadin/client/ui/layout/ComponentConnectorLayoutSlot.java
@@ -40,14 +40,16 @@ public class ComponentConnectorLayoutSlot extends VLayoutSlot {
protected int getCaptionHeight() {
VCaption caption = getCaption();
return caption != null
- ? getLayoutManager().getOuterHeight(caption.getElement()) : 0;
+ ? getLayoutManager().getOuterHeight(caption.getElement())
+ : 0;
}
@Override
protected int getCaptionWidth() {
VCaption caption = getCaption();
return caption != null
- ? getLayoutManager().getOuterWidth(caption.getElement()) : 0;
+ ? getLayoutManager().getOuterWidth(caption.getElement())
+ : 0;
}
public LayoutManager getLayoutManager() {
diff --git a/client/src/main/java/com/vaadin/client/ui/layout/VLayoutSlot.java b/client/src/main/java/com/vaadin/client/ui/layout/VLayoutSlot.java
index ec08903149..7c39840b59 100644
--- a/client/src/main/java/com/vaadin/client/ui/layout/VLayoutSlot.java
+++ b/client/src/main/java/com/vaadin/client/ui/layout/VLayoutSlot.java
@@ -168,7 +168,8 @@ public abstract class VLayoutSlot {
int captionHeight;
VCaption caption = getCaption();
- Style captionStyle = caption == null ? null : caption.getElement().getStyle();
+ Style captionStyle = caption == null ? null
+ : caption.getElement().getStyle();
if (caption == null || caption.shouldBePlacedAfterComponent()) {
style.clearPaddingTop();
captionHeight = 0;
diff --git a/client/src/main/java/com/vaadin/client/ui/nativeselect/NativeSelectConnector.java b/client/src/main/java/com/vaadin/client/ui/nativeselect/NativeSelectConnector.java
index e0a390976b..44b6c3b831 100644
--- a/client/src/main/java/com/vaadin/client/ui/nativeselect/NativeSelectConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/nativeselect/NativeSelectConnector.java
@@ -158,8 +158,8 @@ public class NativeSelectConnector
if (widgetEnabled) {
getWidget().getListBox().getElement().removeAttribute("disabled");
} else {
- getWidget().getListBox().getElement()
- .setAttribute("disabled", "disabled");
+ getWidget().getListBox().getElement().setAttribute("disabled",
+ "disabled");
}
}
}
diff --git a/client/src/main/java/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java b/client/src/main/java/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java
index 7640e9b88a..5fd8c766b6 100644
--- a/client/src/main/java/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java
@@ -459,8 +459,7 @@ public abstract class AbstractOrderedLayoutConnector
// Update slot style names
List<String> childStyles = child.getState().styles;
if (childStyles == null) {
- widget.setSlotStyleNames(child.getWidget(),
- (String[]) null);
+ widget.setSlotStyleNames(child.getWidget(), (String[]) null);
} else {
widget.setSlotStyleNames(child.getWidget(),
childStyles.toArray(new String[childStyles.size()]));
@@ -489,11 +488,11 @@ public abstract class AbstractOrderedLayoutConnector
if (needsFixedHeight()) {
// Add resize listener to ensure the widget itself is measured
- getLayoutManager().addElementResizeListener(
- widget.getElement(), childComponentResizeListener);
+ getLayoutManager().addElementResizeListener(widget.getElement(),
+ childComponentResizeListener);
} else {
- getLayoutManager().removeElementResizeListener(
- widget.getElement(), childComponentResizeListener);
+ getLayoutManager().removeElementResizeListener(widget.getElement(),
+ childComponentResizeListener);
}
// Then update listeners based on bookkeeping
@@ -507,8 +506,8 @@ public abstract class AbstractOrderedLayoutConnector
// updateExpandedSizes causes fixed size components to temporarily
// lose their size. updateExpandCompensation must be delayed until
// the browser has a chance to measure them.
- Scheduler.get().scheduleFinally(
- () -> widget.updateExpandCompensation());
+ Scheduler.get()
+ .scheduleFinally(() -> widget.updateExpandCompensation());
} else {
widget.clearExpand();
}
@@ -694,4 +693,4 @@ public abstract class AbstractOrderedLayoutConnector
super.onUnregister();
}
-} \ No newline at end of file
+}
diff --git a/client/src/main/java/com/vaadin/client/ui/panel/PanelConnector.java b/client/src/main/java/com/vaadin/client/ui/panel/PanelConnector.java
index 64dd7f738b..f454e511be 100644
--- a/client/src/main/java/com/vaadin/client/ui/panel/PanelConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/panel/PanelConnector.java
@@ -93,16 +93,14 @@ public class PanelConnector extends AbstractSingleComponentContainerConnector
// Restore default stylenames
panel.contentNode.setClassName(VPanel.CLASSNAME + "-content");
- panel.bottomDecoration
- .setClassName(VPanel.CLASSNAME + "-deco");
+ panel.bottomDecoration.setClassName(VPanel.CLASSNAME + "-deco");
panel.captionNode.setClassName(VPanel.CLASSNAME + "-caption");
boolean hasCaption = hasCaption();
if (hasCaption) {
panel.setCaption(getState().caption);
} else {
panel.setCaption("");
- panel.captionNode
- .setClassName(VPanel.CLASSNAME + "-nocaption");
+ panel.captionNode.setClassName(VPanel.CLASSNAME + "-nocaption");
}
// Add proper stylenames for all elements. This way we can prevent
diff --git a/client/src/main/java/com/vaadin/client/ui/popupview/PopupViewConnector.java b/client/src/main/java/com/vaadin/client/ui/popupview/PopupViewConnector.java
index eecc6ac57b..03fad4e658 100644
--- a/client/src/main/java/com/vaadin/client/ui/popupview/PopupViewConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/popupview/PopupViewConnector.java
@@ -70,8 +70,8 @@ public class PopupViewConnector extends AbstractHasComponentsConnector
if (popup.captionWrapper != null) {
popup.captionWrapper.updateCaption();
} else {
- popup.captionWrapper = new VCaptionWrapper(
- childConnector, getConnection());
+ popup.captionWrapper = new VCaptionWrapper(childConnector,
+ getConnection());
popup.setWidget(popup.captionWrapper);
popup.captionWrapper.updateCaption();
}
@@ -135,7 +135,7 @@ public class PopupViewConnector extends AbstractHasComponentsConnector
} else {
// The popup shouldn't be visible, try to hide it.
- popup.hide(false,false,false);
+ popup.hide(false, false, false);
}
}
diff --git a/client/src/main/java/com/vaadin/client/ui/splitpanel/AbstractSplitPanelConnector.java b/client/src/main/java/com/vaadin/client/ui/splitpanel/AbstractSplitPanelConnector.java
index ba1558d857..9c5382c303 100644
--- a/client/src/main/java/com/vaadin/client/ui/splitpanel/AbstractSplitPanelConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/splitpanel/AbstractSplitPanelConnector.java
@@ -139,8 +139,7 @@ public abstract class AbstractSplitPanelConnector extends
panel.maximumPosition = splitterState.maxPosition
+ splitterState.maxPositionUnit;
- panel.position = splitterState.position
- + splitterState.positionUnit;
+ panel.position = splitterState.position + splitterState.positionUnit;
panel.setPositionReversed(splitterState.positionReversed);
diff --git a/client/src/main/java/com/vaadin/client/ui/tabsheet/TabsheetBaseConnector.java b/client/src/main/java/com/vaadin/client/ui/tabsheet/TabsheetBaseConnector.java
index ffb6ece368..d8f34e9917 100644
--- a/client/src/main/java/com/vaadin/client/ui/tabsheet/TabsheetBaseConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/tabsheet/TabsheetBaseConnector.java
@@ -59,8 +59,8 @@ public abstract class TabsheetBaseConnector
// Widgets in the TabSheet before update
List<Widget> oldWidgets = new ArrayList<>();
- for (Iterator<Widget> iterator = widget
- .getWidgetIterator(); iterator.hasNext();) {
+ for (Iterator<Widget> iterator = widget.getWidgetIterator(); iterator
+ .hasNext();) {
oldWidgets.add(iterator.next());
}
diff --git a/client/src/main/java/com/vaadin/client/ui/textfield/AbstractTextFieldConnector.java b/client/src/main/java/com/vaadin/client/ui/textfield/AbstractTextFieldConnector.java
index 4d678bfc65..978cc22c45 100644
--- a/client/src/main/java/com/vaadin/client/ui/textfield/AbstractTextFieldConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/textfield/AbstractTextFieldConnector.java
@@ -40,8 +40,9 @@ public abstract class AbstractTextFieldConnector extends AbstractFieldConnector
@Override
public void selectRange(int start, int length) {
int textLength = getAbstractTextField().getValue().length();
- //Enable setting cursor position after the last character
- start = restrictTo(start, 0, length == 0 ? textLength : (textLength - 1));
+ // Enable setting cursor position after the last character
+ start = restrictTo(start, 0,
+ length == 0 ? textLength : (textLength - 1));
length = restrictTo(length, 0, textLength - start);
getAbstractTextField().setSelectionRange(start, length);
}
diff --git a/client/src/main/java/com/vaadin/client/ui/treegrid/TreeGridConnector.java b/client/src/main/java/com/vaadin/client/ui/treegrid/TreeGridConnector.java
index ae967a28c8..b1d60734e8 100644
--- a/client/src/main/java/com/vaadin/client/ui/treegrid/TreeGridConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/treegrid/TreeGridConnector.java
@@ -421,12 +421,11 @@ public class TreeGridConnector extends GridConnector {
}
private static boolean isCollapsed(JsonObject rowData) {
- assert rowData
- .hasKey(HierarchicalDataCommunicatorConstants.ROW_HIERARCHY_DESCRIPTION) : "missing hierarchy data for row "
+ assert rowData.hasKey(
+ HierarchicalDataCommunicatorConstants.ROW_HIERARCHY_DESCRIPTION) : "missing hierarchy data for row "
+ rowData.asString();
- return rowData
- .getObject(
- HierarchicalDataCommunicatorConstants.ROW_HIERARCHY_DESCRIPTION)
+ return rowData.getObject(
+ HierarchicalDataCommunicatorConstants.ROW_HIERARCHY_DESCRIPTION)
.getBoolean(
HierarchicalDataCommunicatorConstants.ROW_COLLAPSED);
}
diff --git a/client/src/main/java/com/vaadin/client/ui/ui/UIConnector.java b/client/src/main/java/com/vaadin/client/ui/ui/UIConnector.java
index 1929f290b6..adb06a450a 100644
--- a/client/src/main/java/com/vaadin/client/ui/ui/UIConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/ui/UIConnector.java
@@ -511,16 +511,18 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
* Initialize UIConnector and attach UI to the rootPanelElement.
*
* @param rootPanelElement
- * element to attach ui into
+ * element to attach ui into
* @param applicationConnection
- * application connection
+ * application connection
* @since 8.4
*/
public void init(Element rootPanelElement,
ApplicationConnection applicationConnection) {
- Panel root = new AbsolutePanel(rootPanelElement) {{
- onAttach();
- }};
+ Panel root = new AbsolutePanel(rootPanelElement) {
+ {
+ onAttach();
+ }
+ };
initConnector(root, applicationConnection);
}
@@ -530,9 +532,9 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
* element.
*
* @param rootPanelId
- * root panel element id
+ * root panel element id
* @param applicationConnection
- * application connection
+ * application connection
*/
public void init(String rootPanelId,
ApplicationConnection applicationConnection) {
@@ -566,7 +568,6 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
DOM.sinkEvents(ui.getElement(), Event.ONSCROLL);
-
// Remove the v-app-loading or any splash screen added inside the div by
// the user
root.getElement().setInnerHTML("");
diff --git a/client/src/main/java/com/vaadin/client/ui/upload/UploadConnector.java b/client/src/main/java/com/vaadin/client/ui/upload/UploadConnector.java
index 5e9aa9ce58..400c61a4f5 100644
--- a/client/src/main/java/com/vaadin/client/ui/upload/UploadConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/upload/UploadConnector.java
@@ -70,8 +70,8 @@ public class UploadConnector extends AbstractComponentConnector
upload.submitButton
.setText(uidl.getStringAttribute("buttoncaption"));
if (uidl.hasAttribute("buttonstylename")) {
- upload.submitButton
- .setStyleName(uidl.getStringAttribute("buttonstylename"));
+ upload.submitButton.setStyleName(
+ uidl.getStringAttribute("buttonstylename"));
}
upload.submitButton.setVisible(true);
} else {
diff --git a/client/src/main/java/com/vaadin/client/widget/escalator/ColumnConfiguration.java b/client/src/main/java/com/vaadin/client/widget/escalator/ColumnConfiguration.java
index 34f43a682d..51e8663749 100644
--- a/client/src/main/java/com/vaadin/client/widget/escalator/ColumnConfiguration.java
+++ b/client/src/main/java/com/vaadin/client/widget/escalator/ColumnConfiguration.java
@@ -172,8 +172,8 @@ public interface ColumnConfiguration {
throws IllegalArgumentException;
/**
- * Refreshes a range of columns in the current row containers in each Escalator
- * section.
+ * Refreshes a range of columns in the current row containers in each
+ * Escalator section.
* <p>
* The data for the refreshed columns is queried from the current cell
* renderer.
diff --git a/client/src/main/java/com/vaadin/client/widget/escalator/EscalatorUpdater.java b/client/src/main/java/com/vaadin/client/widget/escalator/EscalatorUpdater.java
index 002e4681ea..7985555ac3 100644
--- a/client/src/main/java/com/vaadin/client/widget/escalator/EscalatorUpdater.java
+++ b/client/src/main/java/com/vaadin/client/widget/escalator/EscalatorUpdater.java
@@ -27,8 +27,8 @@ import com.vaadin.client.widgets.Escalator;
* should the displayed data need to be fetched remotely.
* <p>
* This has a similar function to {@link com.vaadin.client.widgets.Grid Grid's}
- * {@link com.vaadin.client.renderers.Renderer Renderers}
- * , although they operate on different abstraction levels.
+ * {@link com.vaadin.client.renderers.Renderer Renderers} , although they
+ * operate on different abstraction levels.
*
* @since 7.4
* @author Vaadin Ltd
diff --git a/client/src/main/java/com/vaadin/client/widget/escalator/FlyweightRow.java b/client/src/main/java/com/vaadin/client/widget/escalator/FlyweightRow.java
index 144b53891b..9b33c2205f 100644
--- a/client/src/main/java/com/vaadin/client/widget/escalator/FlyweightRow.java
+++ b/client/src/main/java/com/vaadin/client/widget/escalator/FlyweightRow.java
@@ -241,8 +241,7 @@ public class FlyweightRow implements Row {
assert offset >= 0 && offset + numberOfCells <= cells
.size() : "Invalid range of cells";
return () -> CellIterator
- .attached(
- cells.subList(offset, offset + numberOfCells));
+ .attached(cells.subList(offset, offset + numberOfCells));
}
/**
@@ -266,8 +265,7 @@ public class FlyweightRow implements Row {
assert offset >= 0 && offset + numberOfCells <= cells
.size() : "Invalid range of cells";
return () -> CellIterator
- .unattached(
- cells.subList(offset, offset + numberOfCells));
+ .unattached(cells.subList(offset, offset + numberOfCells));
}
/**
diff --git a/client/src/main/java/com/vaadin/client/widget/escalator/events/SpacerVisibilityChangedEvent.java b/client/src/main/java/com/vaadin/client/widget/escalator/events/SpacerVisibilityChangedEvent.java
index 7963854a21..443422978a 100644
--- a/client/src/main/java/com/vaadin/client/widget/escalator/events/SpacerVisibilityChangedEvent.java
+++ b/client/src/main/java/com/vaadin/client/widget/escalator/events/SpacerVisibilityChangedEvent.java
@@ -23,7 +23,8 @@ import com.google.gwt.event.shared.GwtEvent;
* @author Vaadin Ltd
* @since 8.3.2
*/
-public class SpacerVisibilityChangedEvent extends GwtEvent<SpacerVisibilityChangedHandler> {
+public class SpacerVisibilityChangedEvent
+ extends GwtEvent<SpacerVisibilityChangedHandler> {
/**
* Handler type.
@@ -41,10 +42,10 @@ public class SpacerVisibilityChangedEvent extends GwtEvent<SpacerVisibilityChang
* Creates a spacer visibility changed event.
*
* @param rowIndex
- * index of row to which the spacer belongs
+ * index of row to which the spacer belongs
* @param visible
- * {@code true} if the spacer element is shown, {@code false} if the
- * spacer element is hidden
+ * {@code true} if the spacer element is shown, {@code false} if
+ * the spacer element is hidden
*/
public SpacerVisibilityChangedEvent(int rowIndex, boolean visible) {
this.rowIndex = rowIndex;
@@ -64,7 +65,7 @@ public class SpacerVisibilityChangedEvent extends GwtEvent<SpacerVisibilityChang
* Gets whether the spacer element is displayed.
*
* @return {@code true} if the spacer element is shown, {@code false} if the
- * spacer element is hidden
+ * spacer element is hidden
*/
public boolean isSpacerVisible() {
return visible;
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/AutoScroller.java b/client/src/main/java/com/vaadin/client/widget/grid/AutoScroller.java
index d193769396..62032c9f51 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/AutoScroller.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/AutoScroller.java
@@ -356,8 +356,9 @@ public class AutoScroller {
endBound = Math.max(finalEndBound, pageCordinate);
} else {
/*
- * Subsequent runs make sure that the scroll area grows (but doesn't
- * shrink) with the finger, but no further than the final bound.
+ * Subsequent runs make sure that the scroll area grows (but
+ * doesn't shrink) with the finger, but no further than the
+ * final bound.
*/
int oldTopBound = startBound;
if (startBound < finalStartBound) {
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/DataAvailableEvent.java b/client/src/main/java/com/vaadin/client/widget/grid/DataAvailableEvent.java
index 4841b749c0..78d5224640 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/DataAvailableEvent.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/DataAvailableEvent.java
@@ -34,8 +34,8 @@ public class DataAvailableEvent extends GwtEvent<DataAvailableHandler> {
}
/**
- * Returns the range of available rows in {@link com.vaadin.client.data.DataSource DataSource}
- * for this event.
+ * Returns the range of available rows in
+ * {@link com.vaadin.client.data.DataSource DataSource} for this event.
*
* @return range of available rows
*/
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/selection/MultiSelectionRenderer.java b/client/src/main/java/com/vaadin/client/widget/grid/selection/MultiSelectionRenderer.java
index dc655443e6..3c95353a32 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/selection/MultiSelectionRenderer.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/selection/MultiSelectionRenderer.java
@@ -122,7 +122,8 @@ public class MultiSelectionRenderer<T>
@Override
public void onKeyUp(KeyUpEvent event) {
- if (event.getNativeKeyCode() != KeyCodes.KEY_SPACE || !checkBox.isEnabled()) {
+ if (event.getNativeKeyCode() != KeyCodes.KEY_SPACE
+ || !checkBox.isEnabled()) {
return;
}
int logicalRow = getLogicalRowIndex(grid, checkBox.getElement());
@@ -460,8 +461,9 @@ public class MultiSelectionRenderer<T>
bottomBound = Math.max(finalBottomBound, pageY);
} else {
/*
- * Subsequent runs make sure that the scroll area grows (but doesn't
- * shrink) with the finger, but no further than the final bound.
+ * Subsequent runs make sure that the scroll area grows (but
+ * doesn't shrink) with the finger, but no further than the
+ * final bound.
*/
int oldTopBound = topBound;
if (topBound < finalTopBound) {
@@ -645,7 +647,7 @@ public class MultiSelectionRenderer<T>
checkBox.setEnabled(grid.isEnabled() && !grid.isEditorActive());
}
- private int getDOMRowIndex(RendererCellReference cell){
+ private int getDOMRowIndex(RendererCellReference cell) {
// getRowIndex starts with zero, that's why we add an additional 1.
// getDOMRowIndex should include getHeaderRows as well, this number
// should be equals to aria-rowindex.
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionModel.java b/client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionModel.java
index 003a2263c2..05c47188ff 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionModel.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionModel.java
@@ -124,8 +124,8 @@ public interface SelectionModel<T> {
* Checks if the user is allowed to have more than on item selected.
* <p>
*
- * @return <code>true</code> if the user is allowed to select multiple items,
- * <code>false</code> otherwise
+ * @return <code>true</code> if the user is allowed to select multiple
+ * items, <code>false</code> otherwise
* @since 8.2
*/
boolean isMultiSelectionAllowed();
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/selection/SpaceSelectHandler.java b/client/src/main/java/com/vaadin/client/widget/grid/selection/SpaceSelectHandler.java
index a47297d34a..b19f8c7a6d 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/selection/SpaceSelectHandler.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/selection/SpaceSelectHandler.java
@@ -56,15 +56,13 @@ public class SpaceSelectHandler<T> {
scrollHandler = null;
}
- scrollHandler = grid
- .addDataAvailableHandler(dataAvailableEvent -> {
- if (dataAvailableEvent.getAvailableRows()
- .contains(rowIndex)) {
- setSelected(grid, rowIndex);
- scrollHandler.removeHandler();
- scrollHandler = null;
- }
- });
+ scrollHandler = grid.addDataAvailableHandler(dataAvailableEvent -> {
+ if (dataAvailableEvent.getAvailableRows().contains(rowIndex)) {
+ setSelected(grid, rowIndex);
+ scrollHandler.removeHandler();
+ scrollHandler = null;
+ }
+ });
grid.scrollToRow(rowIndex, ScrollDestination.ANY);
}
diff --git a/client/src/main/java/com/vaadin/client/widgets/Escalator.java b/client/src/main/java/com/vaadin/client/widgets/Escalator.java
index 785febc90c..fc7dc534f3 100644
--- a/client/src/main/java/com/vaadin/client/widgets/Escalator.java
+++ b/client/src/main/java/com/vaadin/client/widgets/Escalator.java
@@ -1150,8 +1150,8 @@ public class Escalator extends Widget
* The following WAI-ARIA attributes are added through this class:
*
* <ul>
- * <li>aria-rowcount (since 8.2)</li>
- * <li>roles provided by {@link AriaGridRole} (since 8.2)</li>
+ * <li>aria-rowcount (since 8.2)</li>
+ * <li>roles provided by {@link AriaGridRole} (since 8.2)</li>
* </ul>
*
* @since 8.2
@@ -1213,8 +1213,10 @@ public class Escalator extends Widget
/**
* Sets the {@code role} attribute to the given element.
*
- * @param element element that should get the role attribute
- * @param role role to be added
+ * @param element
+ * element that should get the role attribute
+ * @param role
+ * role to be added
*
* @since 8.2
*/
@@ -1230,15 +1232,11 @@ public class Escalator extends Widget
*/
public enum AriaGridRole {
- ROW("row"),
- ROWHEADER("rowheader"),
- ROWGROUP("rowgroup"),
- GRIDCELL("gridcell"),
- COLUMNHEADER("columnheader");
+ ROW("row"), ROWHEADER("rowheader"), ROWGROUP("rowgroup"), GRIDCELL(
+ "gridcell"), COLUMNHEADER("columnheader");
private final String name;
-
AriaGridRole(String name) {
this.name = name;
}
@@ -1304,8 +1302,8 @@ public class Escalator extends Widget
/**
* Gets the role attribute of an element to represent a cell in a row.
* <p>
- * Usually {@link AriaGridRole#GRIDCELL} except for a cell in
- * the header.
+ * Usually {@link AriaGridRole#GRIDCELL} except for a cell in the
+ * header.
*
* @return the role attribute for the element to represent cells
*
@@ -1318,8 +1316,7 @@ public class Escalator extends Widget
/**
* Gets the role attribute of an element to represent a row in a grid.
* <p>
- * Usually {@link AriaGridRole#ROW} except for a row in
- * the header.
+ * Usually {@link AriaGridRole#ROW} except for a row in the header.
*
* @return the role attribute for the element to represent rows
*
@@ -1573,7 +1570,8 @@ public class Escalator extends Widget
.getColumnCount(); col++) {
final double colWidth = columnConfiguration
.getColumnWidthActual(col);
- final TableCellElement cellElem = createCellElement(colWidth);
+ final TableCellElement cellElem = createCellElement(
+ colWidth);
tr.appendChild(cellElem);
// Set stylename and position if new cell is frozen
if (col < columnConfiguration.frozenColumns) {
diff --git a/client/src/main/java/com/vaadin/client/widgets/Grid.java b/client/src/main/java/com/vaadin/client/widgets/Grid.java
index 12bb50de0f..a8b070dbd0 100755
--- a/client/src/main/java/com/vaadin/client/widgets/Grid.java
+++ b/client/src/main/java/com/vaadin/client/widgets/Grid.java
@@ -5624,7 +5624,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
/**
* Returns whether Grid should handle events from Widgets in this
* Column.
- *
+ *
* @return {@code true} to handle events from widgets; {@code false} to
* not
* @since 8.3
@@ -7377,7 +7377,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
/**
* Helper method for making sure desired row is visible and it is properly
* rendered.
- *
+ *
* @param rowIndex
* the row to look for
* @param destination
@@ -7402,7 +7402,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
/**
* Helper method for making sure desired row is visible and it is properly
* rendered.
- *
+ *
* @param rowIndex
* the row to look for
* @param whenRendered
@@ -7452,7 +7452,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
/**
* Helper method for scrolling and making sure row is visible.
- *
+ *
* @param rowIndex
* the row index to make visible
* @param destination
diff --git a/client/src/main/resources/com/vaadin/DefaultWidgetSet.gwt.xml b/client/src/main/resources/com/vaadin/DefaultWidgetSet.gwt.xml
index 29e8b0ca9e..393e67b238 100755
--- a/client/src/main/resources/com/vaadin/DefaultWidgetSet.gwt.xml
+++ b/client/src/main/resources/com/vaadin/DefaultWidgetSet.gwt.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.8.1//EN" "http://gwtproject.org/doctype/2.8.1/gwt-module.dtd">
<module>
- <!-- This GWT module defines the Vaadin DefaultWidgetSet. This is the module
- you want to extend when creating an extended widget set, or when creating
+ <!-- This GWT module defines the Vaadin DefaultWidgetSet. This is the module
+ you want to extend when creating an extended widget set, or when creating
a specialized widget set with a subset of the components. -->
<!-- Hint for WidgetSetBuilder not to automatically update the file -->
@@ -35,8 +35,8 @@
<when-type-is class="com.vaadin.client.widgets.Overlay" />
</replace-with>
- <!-- Since 7.2. Compile all permutations (browser support) into one Javascript
- file. Speeds up compilation and does not make the Javascript significantly
+ <!-- Since 7.2. Compile all permutations (browser support) into one Javascript
+ file. Speeds up compilation and does not make the Javascript significantly
larger. -->
<collapse-all-properties />
diff --git a/client/src/main/resources/com/vaadin/Vaadin.gwt.xml b/client/src/main/resources/com/vaadin/Vaadin.gwt.xml
index ede232e101..347530db2c 100644
--- a/client/src/main/resources/com/vaadin/Vaadin.gwt.xml
+++ b/client/src/main/resources/com/vaadin/Vaadin.gwt.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.8.1//EN" "http://gwtproject.org/doctype/2.8.1/gwt-module.dtd">
<module>
- <!-- This GWT module inherits all Vaadin client side functionality modules.
- This is the module you want to inherit in your client side project to be
+ <!-- This GWT module inherits all Vaadin client side functionality modules.
+ This is the module you want to inherit in your client side project to be
able to use com.vaadin.* classes. -->
<!-- Hint for WidgetSetBuilder not to automatically update the file -->
@@ -18,7 +18,7 @@
<source path="client" />
<source path="shared" />
- <!-- Use own Scheduler implementation to be able to track if commands
+ <!-- Use own Scheduler implementation to be able to track if commands
are running -->
<replace-with class="com.vaadin.client.VSchedulerImpl">
<when-type-is class="com.google.gwt.core.client.impl.SchedulerImpl" />
@@ -29,7 +29,7 @@
<when-type-is class="com.vaadin.client.communication.PushConnection" />
</replace-with>
- <!-- Set vaadin.profiler to true to include profiling support in the
+ <!-- Set vaadin.profiler to true to include profiling support in the
module -->
<define-property name="vaadin.profiler" values="true,false" />
<set-property name="vaadin.profiler" value="false" />
@@ -59,11 +59,11 @@
<when-property-is name="user.agent" value="gecko1_8" />
</none>
</set-property>
-
+
<!-- If no proper user agent is found, at least try some, e.g. with crawlers -->
<set-property-fallback name="user.agent" value="safari" />
- <!-- Fall through to this rule when the browser doesn't support pointer
+ <!-- Fall through to this rule when the browser doesn't support pointer
event -->
<replace-with class="com.vaadin.client.event.PointerEventSupportImpl">
<when-type-is class="com.vaadin.client.event.PointerEventSupportImpl" />
diff --git a/client/src/test/java/com/vaadin/client/ApplicationConnectionURLGenerationTest.java b/client/src/test/java/com/vaadin/client/ApplicationConnectionURLGenerationTest.java
index b901cadf24..bb9291459c 100644
--- a/client/src/test/java/com/vaadin/client/ApplicationConnectionURLGenerationTest.java
+++ b/client/src/test/java/com/vaadin/client/ApplicationConnectionURLGenerationTest.java
@@ -8,8 +8,7 @@ import com.vaadin.shared.util.SharedUtil;
public class ApplicationConnectionURLGenerationTest {
- private static final String[] URIS = {
- "http://demo.vaadin.com/", //
+ private static final String[] URIS = { "http://demo.vaadin.com/", //
"https://demo.vaadin.com/", "http://demo.vaadin.com/foo",
"http://demo.vaadin.com/foo?f", "http://demo.vaadin.com/foo?f=1",
"http://demo.vaadin.com:1234/foo?a",