diff options
author | Leif Åstrand <legioth@gmail.com> | 2016-12-20 17:50:32 +0200 |
---|---|---|
committer | Ilia Motornyi <elmot@vaadin.com> | 2016-12-20 17:50:32 +0200 |
commit | 95d016c08569f74a2c76eac40c4f5656bb773951 (patch) | |
tree | 340977988748756ee4ace27860dc00b3358519ae /client/src | |
parent | 1407b8ddaea9a8aace0973864ad9ce093e20a566 (diff) | |
download | vaadin-framework-95d016c08569f74a2c76eac40c4f5656bb773951.tar.gz vaadin-framework-95d016c08569f74a2c76eac40c4f5656bb773951.zip |
Global java code cleanup using Eclipse Neon.1
Diffstat (limited to 'client/src')
36 files changed, 124 insertions, 123 deletions
diff --git a/client/src/main/java/com/vaadin/client/AnimationUtil.java b/client/src/main/java/com/vaadin/client/AnimationUtil.java index e2cf9e690a..d868122857 100644 --- a/client/src/main/java/com/vaadin/client/AnimationUtil.java +++ b/client/src/main/java/com/vaadin/client/AnimationUtil.java @@ -66,15 +66,15 @@ public class AnimationUtil { listener.@com.vaadin.client.AnimationUtil.AnimationEndListener::onAnimationEnd(Lcom/google/gwt/dom/client/NativeEvent;)(e); }); 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; }-*/; @@ -137,7 +137,7 @@ public class AnimationUtil { return event.mozAnimationName; else if(event.oAnimationName) return event.oAnimationName; - + return ""; }-*/; @@ -145,22 +145,22 @@ public class AnimationUtil { public static native String getAnimationName(ComputedStyle cstyle) /*-{ var cs = cstyle.@com.vaadin.client.ComputedStyle::computedStyle; - + if(!cs.getPropertyValue) return ""; - + if(cs.getPropertyValue("-webkit-animation-name")) return cs.getPropertyValue("-webkit-animation-name"); - + else if(cs.getPropertyValue("animation-name")) return cs.getPropertyValue("animation-name"); - + else if(cs.getPropertyValue("-moz-animation-name")) return cs.getPropertyValue("-moz-animation-name"); - + else if(cs.getPropertyValue("-o-animation-name")) return cs.getPropertyValue("-o-animation-name"); - + return ""; }-*/; @@ -175,7 +175,7 @@ public class AnimationUtil { 'MozAnimation': 'animationend', 'WebkitAnimation': 'webkitAnimationEnd' } - + for(var a in anims){ if( el.style[a] !== undefined ){ return anims[a]; @@ -194,7 +194,7 @@ public class AnimationUtil { 'mozAnimation', 'webkitAnimation' ] - + for(var i=0; i < anims.length; i++) { if( el.style[anims[i]] !== undefined ){ return anims[i]; diff --git a/client/src/main/java/com/vaadin/client/ComputedStyle.java b/client/src/main/java/com/vaadin/client/ComputedStyle.java index a170aef9ef..fbd6ef6ce9 100644 --- a/client/src/main/java/com/vaadin/client/ComputedStyle.java +++ b/client/src/main/java/com/vaadin/client/ComputedStyle.java @@ -66,8 +66,8 @@ 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 + // 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. if(name.indexOf("border") > -1 && name.indexOf("Width") > -1) { var borderStyleProp = name.substring(0,name.length-5) + "Style"; @@ -111,7 +111,7 @@ public class ComputedStyle { } - // Normalize margin values. This is not totally valid, but in most cases + // 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"; diff --git a/client/src/main/java/com/vaadin/client/ConnectorMap.java b/client/src/main/java/com/vaadin/client/ConnectorMap.java index ab31f0c1cb..d0dc4d9ab5 100644 --- a/client/src/main/java/com/vaadin/client/ConnectorMap.java +++ b/client/src/main/java/com/vaadin/client/ConnectorMap.java @@ -267,8 +267,7 @@ public class ConnectorMap { @Deprecated public Collection<? extends ServerConnector> getConnectors() { Collection<ComponentDetail> values = idToComponentDetail.values(); - ArrayList<ServerConnector> arrayList = new ArrayList<>( - values.size()); + ArrayList<ServerConnector> arrayList = new ArrayList<>(values.size()); for (ComponentDetail componentDetail : values) { arrayList.add(componentDetail.getConnector()); } diff --git a/client/src/main/java/com/vaadin/client/EventHelper.java b/client/src/main/java/com/vaadin/client/EventHelper.java index 0212fae26c..c1f15c26c5 100644 --- a/client/src/main/java/com/vaadin/client/EventHelper.java +++ b/client/src/main/java/com/vaadin/client/EventHelper.java @@ -46,7 +46,7 @@ import com.google.gwt.user.client.ui.Widget; * if registration is null * register paintable as as handler for event * return the registration - * else + * else * if registration is not null * remove the handler from paintable * return null @@ -149,7 +149,7 @@ public class EventHelper { * {@code handlerRegistration} and adds it via provided * {@code handlerProvider} if connector has event listener with * {@code eventIdentifier}. - * + * * @param connector * connector to check event listener presence * @param eventIdentifier diff --git a/client/src/main/java/com/vaadin/client/FastStringMap.java b/client/src/main/java/com/vaadin/client/FastStringMap.java index 382e2ea1dd..c7e0f82357 100644 --- a/client/src/main/java/com/vaadin/client/FastStringMap.java +++ b/client/src/main/java/com/vaadin/client/FastStringMap.java @@ -52,7 +52,7 @@ public final class FastStringMap<T> extends JavaScriptObject { for(var key in this) { if (Object.hasOwnProperty.call(this, key)) { keys.push(key); - } + } } return keys; }-*/; @@ -63,7 +63,7 @@ public final class FastStringMap<T> extends JavaScriptObject { for(var key in this) { if (Object.hasOwnProperty.call(this, key)) { size++; - } + } } return size; }-*/; diff --git a/client/src/main/java/com/vaadin/client/JavaScriptConnectorHelper.java b/client/src/main/java/com/vaadin/client/JavaScriptConnectorHelper.java index 4a6e474a59..b9f4ae8962 100644 --- a/client/src/main/java/com/vaadin/client/JavaScriptConnectorHelper.java +++ b/client/src/main/java/com/vaadin/client/JavaScriptConnectorHelper.java @@ -402,7 +402,7 @@ public class JavaScriptConnectorHelper { private static native void updateNativeState(JavaScriptObject state, JavaScriptObject input) /*-{ - // Copy all fields to existing state object + // Copy all fields to existing state object for(var key in state) { if (state.hasOwnProperty(key)) { delete state[key]; diff --git a/client/src/main/java/com/vaadin/client/WidgetSet.java b/client/src/main/java/com/vaadin/client/WidgetSet.java index 8c232de019..cf3db7aaa9 100644 --- a/client/src/main/java/com/vaadin/client/WidgetSet.java +++ b/client/src/main/java/com/vaadin/client/WidgetSet.java @@ -27,7 +27,6 @@ import com.vaadin.client.metadata.NoDataException; import com.vaadin.client.metadata.TypeData; import com.vaadin.client.ui.UnknownComponentConnector; import com.vaadin.client.ui.UnknownExtensionConnector; -import com.vaadin.client.ui.UnknownExtensionConnector; public class WidgetSet { /** diff --git a/client/src/main/java/com/vaadin/client/communication/StateChangeEvent.java b/client/src/main/java/com/vaadin/client/communication/StateChangeEvent.java index 0795d69b32..0012138ad9 100644 --- a/client/src/main/java/com/vaadin/client/communication/StateChangeEvent.java +++ b/client/src/main/java/com/vaadin/client/communication/StateChangeEvent.java @@ -251,7 +251,7 @@ public class StateChangeEvent target = target[nextSegment]; } } - // Not defined if we reach something that isn't an object + // Not defined if we reach something that isn't an object return false; }-*/; diff --git a/client/src/main/java/com/vaadin/client/connectors/AbstractFocusableListingConnector.java b/client/src/main/java/com/vaadin/client/connectors/AbstractFocusableListingConnector.java index 9ce7dc194c..67ff070eb0 100644 --- a/client/src/main/java/com/vaadin/client/connectors/AbstractFocusableListingConnector.java +++ b/client/src/main/java/com/vaadin/client/connectors/AbstractFocusableListingConnector.java @@ -22,7 +22,7 @@ import com.vaadin.client.ui.ConnectorFocusAndBlurHandler; /** * Abstract class for listing widget connectors that contains focusable children * to track their focus/blur events. - * + * * @author Vaadin Ltd * * @param <WIDGET> diff --git a/client/src/main/java/com/vaadin/client/connectors/JavaScriptRendererConnector.java b/client/src/main/java/com/vaadin/client/connectors/JavaScriptRendererConnector.java index 90ced5e095..9596d7cbe4 100644 --- a/client/src/main/java/com/vaadin/client/connectors/JavaScriptRendererConnector.java +++ b/client/src/main/java/com/vaadin/client/connectors/JavaScriptRendererConnector.java @@ -64,7 +64,7 @@ public class JavaScriptRendererConnector private static native JavaScriptObject createCellReferenceWrapper() /*-{ var reference = {}; - + var setProperty = function(name, getter, setter) { var descriptor = { get: getter @@ -74,25 +74,25 @@ public class JavaScriptRendererConnector } Object.defineProperty(reference, name, descriptor); }; - + setProperty("element", function() { return reference.target.@CellReference::getElement()(); }, null); - + setProperty("rowIndex", function() { return reference.target.@CellReference::getRowIndex()(); }, null); - + setProperty("columnIndex", function() { return reference.target.@CellReference::getColumnIndex()(); }, null); - + setProperty("colSpan", function() { return reference.target.@RendererCellReference::getColSpan()(); }, function(colSpan) { reference.target.@RendererCellReference::setColSpan(*)(colSpan); }); - + return reference; }-*/; diff --git a/client/src/main/java/com/vaadin/client/connectors/data/HasDataSource.java b/client/src/main/java/com/vaadin/client/connectors/data/HasDataSource.java index f32dae4ac0..e64d3e0025 100644 --- a/client/src/main/java/com/vaadin/client/connectors/data/HasDataSource.java +++ b/client/src/main/java/com/vaadin/client/connectors/data/HasDataSource.java @@ -21,7 +21,7 @@ import elemental.json.JsonObject; /** * A marker interface for connectors that have a data source. - * + * * @author Vaadin Ltd. * @see DataSource * @since 8.0 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 38504ff867..65300d1faf 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 @@ -73,7 +73,7 @@ public abstract class AbstractGridRendererConnector<T> /** * Gets the grid connector for this renderer connector. - * + * * @return the parent grid connector. */ protected GridConnector getGridConnector() { diff --git a/client/src/main/java/com/vaadin/client/data/AbstractRemoteDataSource.java b/client/src/main/java/com/vaadin/client/data/AbstractRemoteDataSource.java index 4ca363ea3c..cf7a121190 100644 --- a/client/src/main/java/com/vaadin/client/data/AbstractRemoteDataSource.java +++ b/client/src/main/java/com/vaadin/client/data/AbstractRemoteDataSource.java @@ -803,7 +803,7 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> { /** * Checks if it is possible to currently fetch data from the remote data * source. - * + * * @return <code>true</code> if it is ok to try to fetch data, * <code>false</code> if it is known that fetching data will fail * and should not be tried right now. diff --git a/client/src/main/java/com/vaadin/client/event/InputEvent.java b/client/src/main/java/com/vaadin/client/event/InputEvent.java index b8e14dc756..3a387d6792 100644 --- a/client/src/main/java/com/vaadin/client/event/InputEvent.java +++ b/client/src/main/java/com/vaadin/client/event/InputEvent.java @@ -28,8 +28,8 @@ public class InputEvent extends DomEvent<InputHandler> { * Event type for InputEvent. Represents the meta-data associated with this * event. */ - private static final Type<InputHandler> TYPE = new Type<>( - "input", new InputEvent()); + private static final Type<InputHandler> TYPE = new Type<>("input", + new InputEvent()); protected InputEvent() { } diff --git a/client/src/main/java/com/vaadin/client/extensions/AbstractExtensionConnector.java b/client/src/main/java/com/vaadin/client/extensions/AbstractExtensionConnector.java index d98b7d65b6..626cb42847 100644 --- a/client/src/main/java/com/vaadin/client/extensions/AbstractExtensionConnector.java +++ b/client/src/main/java/com/vaadin/client/extensions/AbstractExtensionConnector.java @@ -21,7 +21,7 @@ import com.vaadin.client.ui.AbstractConnector; /** * An abstract implementation for extension connectors. - * + * * @author Vaadin Ltd. * @since 7.0 */ diff --git a/client/src/main/java/com/vaadin/client/extensions/ResponsiveConnector.java b/client/src/main/java/com/vaadin/client/extensions/ResponsiveConnector.java index 314d167bfe..5a3d57c55e 100644 --- a/client/src/main/java/com/vaadin/client/extensions/ResponsiveConnector.java +++ b/client/src/main/java/com/vaadin/client/extensions/ResponsiveConnector.java @@ -165,26 +165,26 @@ public class ResponsiveConnector extends AbstractExtensionConnector */ private static native void searchForBreakPointsNative() /*-{ - + // Initialize variables @com.vaadin.client.extensions.ResponsiveConnector::widthRangeCache = []; @com.vaadin.client.extensions.ResponsiveConnector::heightRangeCache = []; - + var widthRanges = @com.vaadin.client.extensions.ResponsiveConnector::widthRangeCache; var heightRanges = @com.vaadin.client.extensions.ResponsiveConnector::heightRangeCache; - + // Can't do squat if we can't parse stylesheets if(!$doc.styleSheets) return; - + var sheets = $doc.styleSheets; - + // Loop all stylesheets on the page and process them individually for(var i = 0, len = sheets.length; i < len; i++) { var sheet = sheets[i]; @com.vaadin.client.extensions.ResponsiveConnector::searchStylesheetForBreakPoints(Lcom/google/gwt/core/client/JavaScriptObject;)(sheet); } - + }-*/; /** @@ -197,15 +197,15 @@ public class ResponsiveConnector extends AbstractExtensionConnector private static native void searchStylesheetForBreakPoints( final JavaScriptObject sheet) /*-{ - + // Inline variables for easier reading var widthRanges = @com.vaadin.client.extensions.ResponsiveConnector::widthRangeCache; var heightRanges = @com.vaadin.client.extensions.ResponsiveConnector::heightRangeCache; - + // Get all the rulesets from the stylesheet var theRules = new Array(); var IEOrEdge = @com.vaadin.client.BrowserInfo::get()().@com.vaadin.client.BrowserInfo::isIE()() || @com.vaadin.client.BrowserInfo::get()().@com.vaadin.client.BrowserInfo::isEdge()(); - + try { if (sheet.cssRules) { theRules = sheet.cssRules @@ -218,18 +218,18 @@ public class ResponsiveConnector extends AbstractExtensionConnector ", probably because of cross domain issues: " + e); return; } - + // Loop through the rulesets for(var i = 0, len = theRules.length; i < len; i++) { var rule = theRules[i]; - + if(rule.type == 3) { // @import rule, traverse recursively @com.vaadin.client.extensions.ResponsiveConnector::searchStylesheetForBreakPoints(Lcom/google/gwt/core/client/JavaScriptObject;)(rule.styleSheet); - + } else if(rule.type == 1 || !rule.type) { // Regular selector rule - + // Helper function var pushToCache = function(ranges, selector, min, max) { // Avoid adding duplicates @@ -245,46 +245,46 @@ public class ResponsiveConnector extends AbstractExtensionConnector ranges.push([selector, min, max]); } }; - + // Array of all of the separate selectors in this ruleset var haystack = rule.selectorText.split(","); - + // IE/Edge parses CSS like .class[attr="val"] into [attr="val"].class so we need to check for both var selectorRegEx = IEOrEdge ? /\[.*\]([\.|#]\S+)/ : /([\.|#]\S+?)\[.*\]/; - + // Loop all the selectors in this ruleset for(var k = 0, len2 = haystack.length; k < len2; k++) { - + // Split the haystack into parts. var widthRange = haystack[k].match(/\[width-range.*?\]/); var heightRange = haystack[k].match(/\[height-range.*?\]/); var selector = haystack[k].match(selectorRegEx); - + if (selector != null) { selector = selector[1]; - + // Check for width-ranges. if (widthRange != null) { var minMax = widthRange[0].match(/\[width-range~?=["|'](.*?)-(.*?)["|']\]/i); var min = minMax[1]; var max = minMax[2]; - + pushToCache(widthRanges, selector, min, max); } - + // Check for height-ranges. if (heightRange != null) { var minMax = heightRange[0].match(/\[height-range~?=["|'](.*?)-(.*?)["|']\]/i); var min = minMax[1]; var max = minMax[2]; - + pushToCache(heightRanges, selector, min, max); } } } } } - + }-*/; /** @@ -294,15 +294,15 @@ public class ResponsiveConnector extends AbstractExtensionConnector */ private native void getBreakPointsFor(final String selectors) /*-{ - + var selectors = selectors.split(","); - + var widthBreakpoints = this.@com.vaadin.client.extensions.ResponsiveConnector::widthBreakpoints = []; var heightBreakpoints = this.@com.vaadin.client.extensions.ResponsiveConnector::heightBreakpoints = []; - + var widthRanges = @com.vaadin.client.extensions.ResponsiveConnector::widthRangeCache; var heightRanges = @com.vaadin.client.extensions.ResponsiveConnector::heightRangeCache; - + for(var i = 0, len = widthRanges.length; i < len; i++) { var bp = widthRanges[i]; for(var j = 0, len2 = selectors.length; j < len2; j++) { @@ -310,7 +310,7 @@ public class ResponsiveConnector extends AbstractExtensionConnector widthBreakpoints.push(bp); } } - + for(var i = 0, len = heightRanges.length; i < len; i++) { var bp = heightRanges[i]; for(var j = 0, len2 = selectors.length; j < len2; j++) { @@ -318,10 +318,10 @@ public class ResponsiveConnector extends AbstractExtensionConnector heightBreakpoints.push(bp); } } - + // Only for debugging // console.log("Breakpoints for", selectors.join(","), widthBreakpoints, heightBreakpoints); - + }-*/; private String currentWidthRanges = ""; @@ -376,24 +376,24 @@ public class ResponsiveConnector extends AbstractExtensionConnector private native String resolveBreakpoint(String which, int size) /*-{ - + // Default to "width" breakpoints var breakpoints = this.@com.vaadin.client.extensions.ResponsiveConnector::widthBreakpoints; - + // Use height breakpoints if we're measuring the height if(which == "height") breakpoints = this.@com.vaadin.client.extensions.ResponsiveConnector::heightBreakpoints; - + // Output string that goes into either the "width-range" or "height-range" attribute in the element var ranges = ""; - + // Loop the breakpoints for(var i = 0, len = breakpoints.length; i < len; i++) { var bp = breakpoints[i]; - + var min = parseInt(bp[1]); var max = parseInt(bp[2]); - + if(!isNaN(min) && !isNaN(max)) { if(min <= size && size <= max) { ranges += " " + bp[1] + "-" + bp[2]; @@ -408,10 +408,10 @@ public class ResponsiveConnector extends AbstractExtensionConnector } } } - + // Trim the output and return it return ranges.replace(/^\s+/, ""); - + }-*/; } diff --git a/client/src/main/java/com/vaadin/client/metadata/ConnectorBundleLoader.java b/client/src/main/java/com/vaadin/client/metadata/ConnectorBundleLoader.java index 91e85305ca..6a0bd3c030 100644 --- a/client/src/main/java/com/vaadin/client/metadata/ConnectorBundleLoader.java +++ b/client/src/main/java/com/vaadin/client/metadata/ConnectorBundleLoader.java @@ -165,11 +165,13 @@ public abstract class ConnectorBundleLoader { if (notice == null) { notice = new HTML(); notice.addClickHandler(new ClickHandler() { + @Override public void onClick(ClickEvent event) { notice.removeFromParent(); } }); notice.addTouchStartHandler(new TouchStartHandler() { + @Override public void onTouchStart(TouchStartEvent event) { notice.removeFromParent(); } diff --git a/client/src/main/java/com/vaadin/client/metadata/TypeDataStore.java b/client/src/main/java/com/vaadin/client/metadata/TypeDataStore.java index f8d6475ed7..1c85c752cf 100644 --- a/client/src/main/java/com/vaadin/client/metadata/TypeDataStore.java +++ b/client/src/main/java/com/vaadin/client/metadata/TypeDataStore.java @@ -354,7 +354,7 @@ public class TypeDataStore { } else { typeData[baseClassName] = {}; - } + } }-*/; private static native boolean hasGetter(JavaScriptObject typeData, diff --git a/client/src/main/java/com/vaadin/client/renderers/ClickableRenderer.java b/client/src/main/java/com/vaadin/client/renderers/ClickableRenderer.java index c356affcb1..91c81dece0 100644 --- a/client/src/main/java/com/vaadin/client/renderers/ClickableRenderer.java +++ b/client/src/main/java/com/vaadin/client/renderers/ClickableRenderer.java @@ -161,7 +161,7 @@ public abstract class ClickableRenderer<T, W extends Widget> } private native static Escalator getEscalator(Grid<?> grid) - /*-{ + /*-{ return grid.@com.vaadin.client.widgets.Grid::escalator; }-*/; diff --git a/client/src/main/java/com/vaadin/client/ui/ConnectorFocusAndBlurHandler.java b/client/src/main/java/com/vaadin/client/ui/ConnectorFocusAndBlurHandler.java index a023f152cf..05ac2dd451 100644 --- a/client/src/main/java/com/vaadin/client/ui/ConnectorFocusAndBlurHandler.java +++ b/client/src/main/java/com/vaadin/client/ui/ConnectorFocusAndBlurHandler.java @@ -47,7 +47,7 @@ public class ConnectorFocusAndBlurHandler /** * Add focus/blur handlers to the widget of the {@code connector}. - * + * * @param connector * connector whose widget is a target to add focus/blur handlers * @return ConnectorFocusAndBlurHandler instance to remove all registered @@ -61,7 +61,7 @@ public class ConnectorFocusAndBlurHandler /** * Add focus/blur handlers to the widget and a state change handler for the * {@code connector}. - * + * * @param connector * connector to register state change handler * @param widget 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 6ecea2d116..df4d67e258 100644 --- a/client/src/main/java/com/vaadin/client/ui/VComboBox.java +++ b/client/src/main/java/com/vaadin/client/ui/VComboBox.java @@ -241,12 +241,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/VPopupCalendar.java b/client/src/main/java/com/vaadin/client/ui/VPopupCalendar.java index f56228f26e..eece76b39a 100644 --- a/client/src/main/java/com/vaadin/client/ui/VPopupCalendar.java +++ b/client/src/main/java/com/vaadin/client/ui/VPopupCalendar.java @@ -129,8 +129,8 @@ public class VPopupCalendar extends VTextualDate // Description of the usage of the widget for assisitve device users descriptionForAssisitveDevicesElement = DOM.createDiv(); - descriptionForAssisitveDevicesElement.setInnerText( - DateFieldState.DESCRIPTION_FOR_ASSISTIVE_DEVICES); + descriptionForAssisitveDevicesElement + .setInnerText(DateFieldState.DESCRIPTION_FOR_ASSISTIVE_DEVICES); AriaHelper.ensureHasId(descriptionForAssisitveDevicesElement); Roles.getTextboxRole().setAriaDescribedbyProperty(text.getElement(), Id.of(descriptionForAssisitveDevicesElement)); diff --git a/client/src/main/java/com/vaadin/client/ui/VWindow.java b/client/src/main/java/com/vaadin/client/ui/VWindow.java index 8d64bb6b4f..9656378f58 100644 --- a/client/src/main/java/com/vaadin/client/ui/VWindow.java +++ b/client/src/main/java/com/vaadin/client/ui/VWindow.java @@ -355,7 +355,7 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner, /** * Returns window position in list of opened and shown windows. - * + * * @since 8.0.0 */ public final int getWindowOrder() { @@ -1509,7 +1509,7 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner, /** * Adds a Handler for window order change event. - * + * * @since 8.0.0 * * @return registration object to deregister the handler @@ -1522,7 +1522,7 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner, /** * Checks if a modal window is currently open. - * + * * @return <code>true</code> if a modal window is open, <code>false</code> * otherwise. */ diff --git a/client/src/main/java/com/vaadin/client/ui/colorpicker/ColorPickerGridConnector.java b/client/src/main/java/com/vaadin/client/ui/colorpicker/ColorPickerGridConnector.java index 2b57968e3b..cd0a3d1466 100644 --- a/client/src/main/java/com/vaadin/client/ui/colorpicker/ColorPickerGridConnector.java +++ b/client/src/main/java/com/vaadin/client/ui/colorpicker/ColorPickerGridConnector.java @@ -31,8 +31,8 @@ import com.vaadin.ui.components.colorpicker.ColorPickerGrid; /** * A class that defines the default implementation for a color picker grid * connector. Connects the server side - * {@link com.vaadin.ui.components.colorpicker.ColorPickerGrid} with the - * client side counterpart {@link VColorPickerGrid} + * {@link com.vaadin.ui.components.colorpicker.ColorPickerGrid} with the client + * side counterpart {@link VColorPickerGrid} * * @since 7.0.0 */ diff --git a/client/src/main/java/com/vaadin/client/ui/colorpicker/VColorPickerGrid.java b/client/src/main/java/com/vaadin/client/ui/colorpicker/VColorPickerGrid.java index 6d8eb2c9c1..e91949191d 100644 --- a/client/src/main/java/com/vaadin/client/ui/colorpicker/VColorPickerGrid.java +++ b/client/src/main/java/com/vaadin/client/ui/colorpicker/VColorPickerGrid.java @@ -70,7 +70,7 @@ public class VColorPickerGrid extends AbsolutePanel * The new grid replaces the old grid if one existed. * <p> * For internal use only. May be renamed or removed in a future release. - * + * * @param rowCount * @param columnCount */ diff --git a/client/src/main/java/com/vaadin/client/ui/datefield/DateFieldConnector.java b/client/src/main/java/com/vaadin/client/ui/datefield/DateFieldConnector.java index 4a08399bdf..7161283176 100644 --- a/client/src/main/java/com/vaadin/client/ui/datefield/DateFieldConnector.java +++ b/client/src/main/java/com/vaadin/client/ui/datefield/DateFieldConnector.java @@ -23,7 +23,6 @@ import com.google.gwt.event.logical.shared.CloseHandler; import com.google.gwt.user.client.ui.PopupPanel; import com.vaadin.client.ApplicationConnection; import com.vaadin.client.UIDL; -import com.vaadin.client.annotations.OnStateChange; import com.vaadin.client.communication.StateChangeEvent; import com.vaadin.client.ui.VCalendarPanel.FocusChangeListener; import com.vaadin.client.ui.VPopupCalendar; diff --git a/client/src/main/java/com/vaadin/client/ui/layout/LayoutDependencyTree.java b/client/src/main/java/com/vaadin/client/ui/layout/LayoutDependencyTree.java index 03c7693979..26aaf837f5 100644 --- a/client/src/main/java/com/vaadin/client/ui/layout/LayoutDependencyTree.java +++ b/client/src/main/java/com/vaadin/client/ui/layout/LayoutDependencyTree.java @@ -725,8 +725,7 @@ public class LayoutDependencyTree { public Collection<ComponentConnector> getMeasureTargets() { JsArrayString targetIds = getMeasureTargetsJsArray(); int length = targetIds.length(); - ArrayList<ComponentConnector> targets = new ArrayList<>( - length); + ArrayList<ComponentConnector> targets = new ArrayList<>(length); ConnectorMap connectorMap = ConnectorMap.get(connection); for (int i = 0; i < length; i++) { diff --git a/client/src/main/java/com/vaadin/client/ui/window/WindowOrderEvent.java b/client/src/main/java/com/vaadin/client/ui/window/WindowOrderEvent.java index 33517462ea..d17e28dc39 100644 --- a/client/src/main/java/com/vaadin/client/ui/window/WindowOrderEvent.java +++ b/client/src/main/java/com/vaadin/client/ui/window/WindowOrderEvent.java @@ -1,12 +1,12 @@ /* * Copyright 2000-2016 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 @@ -22,9 +22,9 @@ import com.vaadin.client.ui.VWindow; /** * Event for window order position updates. - * + * * @since 8.0.0 - * + * * @author Vaadin Ltd */ public class WindowOrderEvent extends GwtEvent<WindowOrderHandler> { @@ -35,7 +35,7 @@ public class WindowOrderEvent extends GwtEvent<WindowOrderHandler> { /** * Creates a new event with the given order. - * + * * @param windows * The new order position for the VWindow */ @@ -50,7 +50,7 @@ public class WindowOrderEvent extends GwtEvent<WindowOrderHandler> { /** * Returns windows in order. - * + * * @return windows in the specific order */ public VWindow[] getWindows() { @@ -64,7 +64,7 @@ public class WindowOrderEvent extends GwtEvent<WindowOrderHandler> { /** * Gets the type of the event. - * + * * @return the type of the event */ public static Type<WindowOrderHandler> getType() { diff --git a/client/src/main/java/com/vaadin/client/ui/window/WindowOrderHandler.java b/client/src/main/java/com/vaadin/client/ui/window/WindowOrderHandler.java index 3a492ef27e..f3cffce63c 100644 --- a/client/src/main/java/com/vaadin/client/ui/window/WindowOrderHandler.java +++ b/client/src/main/java/com/vaadin/client/ui/window/WindowOrderHandler.java @@ -1,12 +1,12 @@ /* * Copyright 2000-2016 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,16 +19,16 @@ import com.google.gwt.event.shared.EventHandler; /** * Handler for {@link WindowOrderEvent}s. - * + * * @since 8.0.0 - * + * * @author Vaadin Ltd */ public interface WindowOrderHandler extends EventHandler { /** * Called when the VWindow instances changed their order position. - * + * * @param event * Contains windows whose position has changed */ diff --git a/client/src/main/java/com/vaadin/client/widget/escalator/ScrollbarBundle.java b/client/src/main/java/com/vaadin/client/widget/escalator/ScrollbarBundle.java index ed8d3cd57b..b5aaa5d894 100644 --- a/client/src/main/java/com/vaadin/client/widget/escalator/ScrollbarBundle.java +++ b/client/src/main/java/com/vaadin/client/widget/escalator/ScrollbarBundle.java @@ -645,7 +645,7 @@ public abstract class ScrollbarBundle implements DeferredWorker { * This needs to be made step-by-step because IE8 flat-out refuses to * fire a scroll event when the scroll size becomes smaller than the * offset size. All other browser need to suffer alongside. - * + * * This really should be changed to not use any temporary scroll * handlers at all once IE8 support is dropped, like now done only for * Firefox. diff --git a/client/src/main/java/com/vaadin/client/widget/grid/EventCellReference.java b/client/src/main/java/com/vaadin/client/widget/grid/EventCellReference.java index a77f4ec86a..9f98e3e500 100644 --- a/client/src/main/java/com/vaadin/client/widget/grid/EventCellReference.java +++ b/client/src/main/java/com/vaadin/client/widget/grid/EventCellReference.java @@ -87,7 +87,7 @@ public class EventCellReference<T> extends CellReference<T> { * Is the cell reference for a cell in the header of the Grid. * * @since 7.5 - * @return <code>true</true> if referenced cell is in the header, + * @return <code>true</true> if referenced cell is in the header, * <code>false</code> if not */ public boolean isHeader() { @@ -98,7 +98,7 @@ public class EventCellReference<T> extends CellReference<T> { * Is the cell reference for a cell in the body of the Grid. * * @since 7.5 - * @return <code>true</true> if referenced cell is in the body, + * @return <code>true</true> if referenced cell is in the body, * <code>false</code> if not */ public boolean isBody() { @@ -109,7 +109,7 @@ public class EventCellReference<T> extends CellReference<T> { * Is the cell reference for a cell in the footer of the Grid. * * @since 7.5 - * @return <code>true</true> if referenced cell is in the footer, + * @return <code>true</true> if referenced cell is in the footer, * <code>false</code> if not */ public boolean isFooter() { diff --git a/client/src/main/java/com/vaadin/client/widget/grid/events/GridSelectionAllowedHandler.java b/client/src/main/java/com/vaadin/client/widget/grid/events/GridSelectionAllowedHandler.java index 23788b329b..fcbc9c8bb0 100644 --- a/client/src/main/java/com/vaadin/client/widget/grid/events/GridSelectionAllowedHandler.java +++ b/client/src/main/java/com/vaadin/client/widget/grid/events/GridSelectionAllowedHandler.java @@ -20,7 +20,7 @@ import com.google.gwt.event.shared.EventHandler; /** * Handler for a Grid {@link GridSelectionAllowedEvent}, called when the Grid is * becomes allowed for selection or disallowed. - * + * * @see GridSelectionAllowedEvent * @author Vaadin Ltd * @since 8.0 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 28499621df..17763b0a94 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 @@ -97,7 +97,7 @@ public interface SelectionModel<T> { * <p> * The check is done only for the client side actions. It doesn't affect * selection requests sent from the server side. - * + * * @param selectionAllowed * <code>true</code> if the user is allowed to change the * selection, <code>false</code> otherwise @@ -109,7 +109,7 @@ public interface SelectionModel<T> { * <p> * The check is done only for the client side actions. It doesn't affect * selection requests sent from the server side. - * + * * @return <code>true</code> if the user is allowed to change the selection, * <code>false</code> otherwise */ diff --git a/client/src/main/java/com/vaadin/client/widgets/ChildFocusAwareFlowPanel.java b/client/src/main/java/com/vaadin/client/widgets/ChildFocusAwareFlowPanel.java index 1f801f5838..56a6164901 100644 --- a/client/src/main/java/com/vaadin/client/widgets/ChildFocusAwareFlowPanel.java +++ b/client/src/main/java/com/vaadin/client/widgets/ChildFocusAwareFlowPanel.java @@ -37,7 +37,7 @@ import com.vaadin.client.ui.FocusableFlowPanel; * Focusable flow panel which fires focus/blur events if it or any of its child * is focused/blured, but doesn't fire events if it happens between its content * (child) elements. - * + * * @author Vaadin Ltd * */ 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 e3953b436a..d0de3957d9 100644 --- a/client/src/main/java/com/vaadin/client/widgets/Escalator.java +++ b/client/src/main/java/com/vaadin/client/widgets/Escalator.java @@ -468,9 +468,9 @@ public class Escalator extends Widget if (isCurrentBrowserIE11OrEdge()) { return vertical ? event.getNativeEvent().getClientY() - + Window.getScrollTop() + + Window.getScrollTop() : event.getNativeEvent().getClientX() - + Window.getScrollLeft(); + + Window.getScrollLeft(); } JsArray<Touch> a = event.getNativeEvent().getTouches(); return vertical ? a.get(0).getPageY() : a.get(0).getPageX(); @@ -563,9 +563,11 @@ public class Escalator extends Widget // (#18737), // otherwise allow touch only if there is a single touch in the // event - private boolean allowTouch(final TouchHandlerBundle.CustomTouchEvent event) { + private boolean allowTouch( + final TouchHandlerBundle.CustomTouchEvent event) { if (isCurrentBrowserIE11OrEdge()) { - return (POINTER_EVENT_TYPE_TOUCH.equals(event.getPointerType())); + return (POINTER_EVENT_TYPE_TOUCH + .equals(event.getPointerType())); } else { return (event.getNativeEvent().getTouches().length() == 1); } @@ -987,8 +989,8 @@ public class Escalator extends Widget }-*/; /** - * Using pointerdown, pointermove, pointerup, and pointercancel for IE11 and Edge instead of - * touch* listeners (#18737) + * Using pointerdown, pointermove, pointerup, and pointercancel for IE11 + * and Edge instead of touch* listeners (#18737) * * @param element */ @@ -1009,8 +1011,8 @@ public class Escalator extends Widget }-*/; /** - * Using pointerdown, pointermove, pointerup, and pointercancel for IE11 and Edge instead of - * touch* listeners (#18737) + * Using pointerdown, pointermove, pointerup, and pointercancel for IE11 + * and Edge instead of touch* listeners (#18737) * * @param element */ @@ -6859,6 +6861,7 @@ public class Escalator extends Widget /** * Internal method for checking whether the browser is IE11 or Edge + * * @return true only if the current browser is IE11, or Edge */ private static boolean isCurrentBrowserIE11OrEdge() { diff --git a/client/src/main/java/com/vaadin/client/widgets/FocusableFlowPanelComposite.java b/client/src/main/java/com/vaadin/client/widgets/FocusableFlowPanelComposite.java index 7a24549664..eb7640de61 100644 --- a/client/src/main/java/com/vaadin/client/widgets/FocusableFlowPanelComposite.java +++ b/client/src/main/java/com/vaadin/client/widgets/FocusableFlowPanelComposite.java @@ -25,7 +25,7 @@ import com.vaadin.client.Focusable; /** * Focusable composite whose widget is {@link ChildFocusAwareFlowPanel} (flow * panel that tracks focus/blur events from its children). - * + * * @author Vaadin Ltd * */ |